Skip to content

Commit 2ae1b3c

Browse files
authored
add devcontainer and related dependabot config (#104)
* add devcontainer and related dependabot config * dependabot interval for gha monthly * devcontainer uses OS Python
1 parent 0c7a9ce commit 2ae1b3c

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
6+
"features": {
7+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
8+
"ghcr.io/devcontainers/features/git:1": "latest",
9+
"ghcr.io/devcontainers/features/github-cli:1": {},
10+
"ghcr.io/devcontainers/features/python:1": "none",
11+
"ghcr.io/devcontainers-contrib/features/act:1": {},
12+
"ghcr.io/devcontainers-contrib/features/ruff:1": {}
13+
},
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
// "forwardPorts": [],
17+
18+
// Use 'postCreateCommand' to run commands after the container is created.
19+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
20+
21+
"onCreateCommand": "bash .devcontainer/on_create_command.sh",
22+
23+
// Configure tool-specific properties.
24+
// "customizations": {},
25+
"customizations": {
26+
// Configure properties specific to VS Code.
27+
"vscode": {
28+
// Add the IDs of extensions you want installed when the container is created.
29+
"extensions": [
30+
"ms-python.python",
31+
"charliermarsh.ruff"
32+
],
33+
// Set *default* container specific settings.json values on container create.
34+
"settings": {
35+
"ruff.path": ["/usr/local/py-utils/bin/ruff"]
36+
}
37+
}
38+
},
39+
40+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
41+
// "remoteUser": "root"
42+
}

.devcontainer/on_create_command.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# setup
2+
3+
sudo pip install -U pip setuptools wheel setuptools_scm
4+
sudo pip install -r requirements-dev.txt
5+
6+
# Install Transifex CLI tool
7+
# refer to Installation instructions https://github.com/transifex/cli#installation
8+
9+
(cd `mktemp -d` && curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash && sudo mv ./tx /usr/local/bin )

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
groups:
9+
# Name for the group, which will be used in PR titles and branch names
10+
all-github-actions:
11+
# Group all updates together
12+
patterns:
13+
- "*"
14+
- package-ecosystem: "devcontainers"
15+
directory: "/"
16+
schedule:
17+
interval: "monthly"

0 commit comments

Comments
 (0)