-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/python:3.10-bullseye", | ||
"features": { | ||
"ghcr.io/devcontainers/features/azure-cli:1": {}, | ||
"ghcr.io/jlaundry/devcontainer-features/azure-functions-core-tools:1": { | ||
"version": "4" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/poetry:2": { | ||
"version": "1.6.1" | ||
}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "lts" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-azuretools.vscode-azurefunctions", | ||
"ms-vscode.azure-account", | ||
"ms-python.python", | ||
"ms-vscode-remote.vscode-remote-extensionpack", | ||
"GitHub.codespaces", | ||
"ms-azuretools.vscode-azureresourcegroups", | ||
"ms-python.flake8", | ||
"ms-python.black-formatter", | ||
"ms-python.isort", | ||
"GitHub.copilot", | ||
"GitHub.copilot-labs", | ||
"github.vscode-github-actions", | ||
"dotenv.dotenv-vscode" | ||
] | ||
} | ||
}, | ||
"postAttachCommand": "python3 -m venv venv && source venv/bin/activate && poetry install --with test,dev --no-interaction --no-root --sync" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#/-------------------.env.vault---------------------/ | ||
#/ cloud-agnostic vaulting standard / | ||
#/ [how it works](https://dotenv.org/env-vault) / | ||
#/--------------------------------------------------/ | ||
|
||
# | ||
# Hello 👋, | ||
# | ||
# Your environment variables will be encrypted and | ||
# safely stored in this .env.vault file, after you | ||
# run the login, push, and build commands. | ||
# | ||
# Next run: | ||
# | ||
# $ npx dotenv-vault@latest login | ||
# | ||
# | ||
# You can safely commit this file to code. | ||
# | ||
# Enjoy. 🌴 | ||
# | ||
|
||
#/----------------settings/metadata-----------------/ | ||
DOTENV_VAULT="vlt_74a0d969328c24c44288572b0b90e05a3a6f0377d071632083d71c74c28ab188" | ||
DOTENV_API_URL="https://vault.dotenv.org" | ||
DOTENV_CLI="npx dotenv-vault@latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Run pytest | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11"] | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: snok/install-poetry@93ada01c735cc8a383ce0ce2ae205a21c415379b # v1 | ||
with: | ||
version: 1.6.1 # pin the version as they keep changing their APIs | ||
virtualenvs-create: false | ||
virtualenvs-in-project: false | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
poetry install --with test --without dev --no-interaction --no-root --sync | ||
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV | ||
python -c "import os; print(os.environ['VIRTUAL_ENV'])" | ||
- name: Lint with flake8 | ||
run: | | ||
. venv/bin/activate | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
env: | ||
DOTENV_KEY: ${{ secrets.DOTENV_KEY }} | ||
run: | | ||
. venv/bin/activate | ||
pytest --cov-report=xml | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[tool.poetry] | ||
name = "ohme-client" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["mnbf9rca <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">3.9,<3.12" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |