Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
dontseyit committed Oct 30, 2023
1 parent e1b80fd commit 01d0e29
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 80 deletions.
1 change: 1 addition & 0 deletions .deprecated_files
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ setup.cfg

.pylintrc
.flake8
.editorconfig
122 changes: 64 additions & 58 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,75 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/python-3
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/python-3-postgres
// Update the VARIANT arg in docker-compose.yml to pick a Python version: 3, 3.8, 3.7, 3.6
{
"name": "hexkit",
"name": "${localWorkspaceFolderBasename}",
"dockerComposeFile": "docker-compose.yml",
"service": "hexkit",
"service": "app",
"workspaceFolder": "/workspace",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
"python.testing.pytestPath": "/usr/local/py-utils/bin/pytest",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"editor.renderWhitespace": "all",
"editor.rulers": [
88
],
"licenser.license": "Custom",
"licenser.customHeaderFile": "/workspace/.devcontainer/license_header.txt"
"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"files.eol": "\n",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "basic",
"python.testing.pytestPath": "/usr/local/py-utils/bin/pytest",
"python.testing.pytestArgs": [
"--profile"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"editor.rulers": [
88
],
"editor.defaultFormatter": "ms-python.black-formatter",
"licenser.license": "Custom",
"licenser.customHeaderFile": "/workspace/.devcontainer/license_header.txt"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"mikestead.dotenv",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"njpwerner.autodocstring",
"redhat.vscode-yaml",
"42crunch.vscode-openapi",
"arjun.swagger-viewer",
"eamodio.gitlens",
"github.vscode-pull-request-github",
"streetsidesoftware.code-spell-checker",
"yzhang.markdown-all-in-one",
"visualstudioexptteam.vscodeintellicode",
"ymotongpoo.licenser",
"charliermarsh.ruff",
"ms-python.black-formatter",
"ms-python.mypy-type-checker"
]
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"42crunch.vscode-openapi",
"eamodio.gitlens",
"formulahendry.terminal",
"tyriar.terminal-tabs",
"alexcvzz.vscode-sqlite",
"njpwerner.autodocstring",
"arjun.swagger-viewer",
"ms-toolsai.jupyter",
"redhat.vscode-yaml",
"ymotongpoo.licenser",
"ms-azuretools.vscode-docker"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// "forwardPorts": [5000, 5432],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "dev_install",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"enableNonRootDocker": "true",
"moby": true,
"azureDnsAutoDetection": false
}
"containerEnv": {
// for testcontainers to connect to the docker host:
"TC_HOST": "host.docker.internal",
"DOCKER_HOST": "unix:///var/run/docker.sock"
},
"forwardPorts": [
"kafka-ui:8080"
]
}
"features": {
// details can be found here: https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
}
}
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"

services:
hexkit:
app:
build:
context: .
dockerfile: ./Dockerfile
Expand Down
14 changes: 0 additions & 14 deletions .editorconfig

This file was deleted.

2 changes: 0 additions & 2 deletions .mandatory_files
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
# may differ from that of the template repository.

.devcontainer/dev_launcher
.devcontainer/devcontainer.json
.devcontainer/docker-compose.yml
.devcontainer/Dockerfile

tests/__init__.py
tests/fixtures/__init__.py
Expand Down
2 changes: 1 addition & 1 deletion .static_files
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.devcontainer/dev_install
.devcontainer/license_header.txt
.devcontainer/Dockerfile
.devcontainer/devcontainer.json

scripts/script_utils/__init__.py
scripts/script_utils/cli.py
Expand Down Expand Up @@ -39,7 +40,6 @@ scripts/README.md
example_data/README.md

.coveragerc
.editorconfig
.gitattributes
.gitignore
.mypy.ini
Expand Down
10 changes: 7 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --all-extras --generate-hashes --output-file=/workspace/requirements-dev.txt /tmp/tmpkllxpg08/pyproject.toml /workspace/requirements-dev.in
# pip-compile --all-extras --generate-hashes --output-file=/workspace/requirements-dev.txt /tmp/tmpye1zf3r4/pyproject.toml /workspace/requirements-dev.in
#
aiokafka==0.8.1 \
--hash=sha256:1e24839088fd6d3ff481cc09a48ea487b997328df11630bc0a1b88255edbcfe9 \
Expand Down Expand Up @@ -252,7 +252,9 @@ coverage[toml]==7.3.2 \
--hash=sha256:f94b734214ea6a36fe16e96a70d941af80ff3bfd716c141300d95ebc85339738 \
--hash=sha256:fa28e909776dc69efb6ed975a63691bc8172b64ff357e663a1bb06ff3c9b589a \
--hash=sha256:fe494faa90ce6381770746077243231e0b83ff3f17069d748f645617cefe19d4
# via pytest-cov
# via
# coverage
# pytest-cov
dependency-injector==4.41.0 \
--hash=sha256:02620454ee8101f77a317f3229935ce687480883d72a40858ff4b0c87c935cce \
--hash=sha256:059fbb48333148143e8667a5323d162628dfe27c386bd0ed3deeecfc390338bf \
Expand Down Expand Up @@ -944,7 +946,9 @@ stringcase==1.2.0 \
# via -r /workspace/requirements-dev-common.in
testcontainers[kafka,mongo]==3.7.1 \
--hash=sha256:7f48cef4bf0ccd78f1a4534d4b701a003a3bace851f24eae58a32f9e3f0aeba0
# via hexkit (pyproject.toml)
# via
# hexkit (pyproject.toml)
# testcontainers
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --all-extras --constraint=/workspace/requirements-dev.txt --generate-hashes --output-file=/workspace/requirements.txt /tmp/tmpkllxpg08/pyproject.toml
# pip-compile --all-extras --constraint=/workspace/requirements-dev.txt --generate-hashes --output-file=/workspace/requirements.txt /tmp/tmpye1zf3r4/pyproject.toml
#
aiokafka==0.8.1 \
--hash=sha256:1e24839088fd6d3ff481cc09a48ea487b997328df11630bc0a1b88255edbcfe9 \
Expand Down Expand Up @@ -714,6 +714,7 @@ testcontainers[kafka,mongo]==3.7.1 \
# via
# -c /workspace/requirements-dev.txt
# hexkit (pyproject.toml)
# testcontainers
typing-extensions==4.8.0 \
--hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \
--hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef
Expand Down

0 comments on commit 01d0e29

Please sign in to comment.