Skip to content

Commit

Permalink
Add initial set of files
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed Jun 11, 2024
1 parent b2e2730 commit 9aaebba
Show file tree
Hide file tree
Showing 33 changed files with 1,484 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PORT_PREFIX=${PORT_PREFIX}
CONTAINER_PREFIX=${USER}
57 changes: 57 additions & 0 deletions .devcontainer/python-3.10/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "python-3.10",
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.10",
"forwardPorts": [],
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/weatherman",
"remoteEnv": {},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"installOhMyZsh": true,
"configureZshAsDefaultShell": true,
"username": "vscode",
"userUid": "1000",
"userGid": "1000"
},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": true
},
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/robbert229/devcontainer-features/postgresql-client:1": {}
},
"updateContentCommand": "bash .devcontainer/setup.sh",
"postCreateCommand": [],
"customizations": {
"vscode": {
"settings": {
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"[python]": {
"editor.defaultFormatter": "ms-python.vscode-pylance"
},
"editor.rulers": [
80
]
},
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-python.vscode-pylance"
]
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/python-3.10/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

services:
python-3.10: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.10
container_name: $USER-python-3.10-weatherman
volumes:
- ../../:/workspaces/weatherman:cached
command: sleep infinity
env_file:
- ../devcontainer.env
platform: linux/amd64
networks:
- weatherman-network

networks:
weatherman-network:
name: "${USER}-weatherman-network"
57 changes: 57 additions & 0 deletions .devcontainer/python-3.11/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "python-3.11",
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.11",
"forwardPorts": [],
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/weatherman",
"remoteEnv": {},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"installOhMyZsh": true,
"configureZshAsDefaultShell": true,
"username": "vscode",
"userUid": "1000",
"userGid": "1000"
},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": true
},
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/robbert229/devcontainer-features/postgresql-client:1": {}
},
"updateContentCommand": "bash .devcontainer/setup.sh",
"postCreateCommand": [],
"customizations": {
"vscode": {
"settings": {
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"[python]": {
"editor.defaultFormatter": "ms-python.vscode-pylance"
},
"editor.rulers": [
80
]
},
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-python.vscode-pylance"
]
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/python-3.11/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

services:
python-3.11: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.11
container_name: $USER-python-3.11-weatherman
volumes:
- ../../:/workspaces/weatherman:cached
command: sleep infinity
env_file:
- ../devcontainer.env
platform: linux/amd64
networks:
- weatherman-network

networks:
weatherman-network:
name: "${USER}-weatherman-network"
57 changes: 57 additions & 0 deletions .devcontainer/python-3.12/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "python-3.12",
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.12",
"forwardPorts": [],
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/weatherman",
"remoteEnv": {},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"installOhMyZsh": true,
"configureZshAsDefaultShell": true,
"username": "vscode",
"userUid": "1000",
"userGid": "1000"
},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": true
},
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/robbert229/devcontainer-features/postgresql-client:1": {}
},
"updateContentCommand": "bash .devcontainer/setup.sh",
"postCreateCommand": [],
"customizations": {
"vscode": {
"settings": {
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"[python]": {
"editor.defaultFormatter": "ms-python.vscode-pylance"
},
"editor.rulers": [
80
]
},
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-python.vscode-pylance"
]
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/python-3.12/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

services:
python-3.12: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.12
container_name: $USER-python-3.12-weatherman
volumes:
- ../../:/workspaces/weatherman:cached
command: sleep infinity
env_file:
- ../devcontainer.env
platform: linux/amd64
networks:
- weatherman-network

networks:
weatherman-network:
name: "${USER}-weatherman-network"
57 changes: 57 additions & 0 deletions .devcontainer/python-3.9/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "python-3.9",
"dockerComposeFile": [
"./docker-compose.yml"
],
"service": "python-3.9",
"forwardPorts": [],
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/weatherman",
"remoteEnv": {},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"installOhMyZsh": true,
"configureZshAsDefaultShell": true,
"username": "vscode",
"userUid": "1000",
"userGid": "1000"
},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": true
},
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/robbert229/devcontainer-features/postgresql-client:1": {}
},
"updateContentCommand": "bash .devcontainer/setup.sh",
"postCreateCommand": [],
"customizations": {
"vscode": {
"settings": {
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"[python]": {
"editor.defaultFormatter": "ms-python.vscode-pylance"
},
"editor.rulers": [
80
]
},
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-python.vscode-pylance"
]
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/python-3.9/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

services:
python-3.9: # nosemgrep
image: mcr.microsoft.com/devcontainers/python:3.9
container_name: $USER-python-3.9-weatherman
volumes:
- ../../:/workspaces/weatherman:cached
command: sleep infinity
env_file:
- ../devcontainer.env
platform: linux/amd64
networks:
- weatherman-network

networks:
weatherman-network:
name: "${USER}-weatherman-network"
8 changes: 8 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# update pip
pip install --upgrade pip

# install dev packages
pip install -e ".[dev]"

# install pre-commit hook if not installed already
pre-commit install
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
__pycache__
dist
.idea
venv*
.venv*
.env
.env*
*.lock
.vscode
.pypirc
.pytest_cache
.ruff_cache
.mypy_cache
.coverage*
.cache
htmlcov
token
.DS_Store
49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: |
(?x)^(
docs/docs/SUMMARY.md|
docs/docs/en/api/.meta.yml
)$
- id: check-yaml
exclude: "docs/mkdocs.yml"
- id: check-added-large-files
exclude: |
(?x)^(
blog/package-lock.json
)$
- repo: local
hooks:
- id: lint
name: Linter
entry: "scripts/lint-pre-commit.sh"
language: python
# language_version: python3.9
types: [python]
require_serial: true
verbose: true

- repo: local
hooks:
- id: static-analysis
name: Static analysis
entry: "scripts/static-pre-commit.sh"
language: python
# language_version: python3.9
types: [python]
require_serial: true
verbose: true

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
exclude: package.lock.json
Loading

0 comments on commit 9aaebba

Please sign in to comment.