Skip to content

Commit

Permalink
Merge pull request #16 from danstis/python-base
Browse files Browse the repository at this point in the history
feat: add python base version
  • Loading branch information
danstis committed Aug 17, 2023
2 parents 3abf79d + f43c57c commit 2667e88
Show file tree
Hide file tree
Showing 22 changed files with 674 additions and 313 deletions.
105 changes: 59 additions & 46 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,63 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Go",
"image": "mcr.microsoft.com/devcontainers/go:0-1-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go"
},
"extensions": [
"GitHub.vscode-pull-request-github",
"EditorConfig.EditorConfig",
"golang.go",
"ms-vscode.makefile-tools",
"hbenl.vscode-test-explorer",
"Gruntfuggly.todo-tree",
"dakara.transformer"
]
}
},
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/guiyomh/features/golangci-lint:0": {},
"ghcr.io/guiyomh/features/goreleaser:0": {},
"ghcr.io/guiyomh/features/gotestsum:0": {},
"ghcr.io/devcontainers/features/docker-in-docker": {},
"ghcr.io/danstis/devcontainers-features/gitversion:0": {
"version": "5.11.1"
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.10",
"runArgs": [
"--env-file",
".env"
],
"features": {
// https://containers.dev/features
"ghcr.io/devcontainers-contrib/features/black:2": {},
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/devcontainers-contrib/features/pylint:2": {},
"ghcr.io/devcontainers/features/docker-in-docker": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/danstis/devcontainers-features/gitversion:1.0.0": {
"version": "5.11.1"
}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": ".devcontainer/postCreate.sh",
"remoteEnv": {
"OPENAI_API_KEY": "${localEnv:OPENAI_API_KEY}"
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
},
"extensions": [
"Codeium.codeium",
"dakara.transformer",
"EditorConfig.EditorConfig",
"GitHub.copilot",
"GitHub.vscode-pull-request-github",
"Gruntfuggly.todo-tree",
"hbenl.vscode-test-explorer",
"ms-azuretools.vscode-docker",
"ms-vscode.makefile-tools",
"sourcegraph.cody-ai",
"streetsidesoftware.code-spell-checker",
"mhutchie.git-graph",
"github.vscode-github-actions",
"eamodio.gitlens",
"SonarSource.sonarlint-vscode",
"ms-python.black-formatter"
]
}

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
5 changes: 5 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

pip install --upgrade pip
pip install -r requirements.txt
pip install aider-chat
41 changes: 24 additions & 17 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
root = true

[*]
indent_style = space
tab_width = 4
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2
indent_style = space

[*.js]
indent_size = 2
indent_style = space
root = true

[*]
indent_style = space
tab_width = 4
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

# 4 space indentation
[*.{py,java,r,R}]
indent_style = space
indent_size = 4

# 2 space indentation
[*.{js,json,y{a,}ml,html,cwl}]
indent_style = space
indent_size = 2

[*.{md,Rmd,rst}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2
34 changes: 17 additions & 17 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Update go modules
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates#supported-repositories-and-ecosystems

version: 2
updates:
# Update go modules
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
Loading

0 comments on commit 2667e88

Please sign in to comment.