-
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
Tom Bourton
committed
Dec 21, 2023
1 parent
8814502
commit 419bc8b
Showing
93 changed files
with
8,144 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,4 @@ | ||
*__pycache__/* | ||
*.egg-info/* | ||
*.pytest_cache/* | ||
*.coverage* |
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,10 @@ | ||
[flake8] | ||
ignore = E203,W503 | ||
max-line-length = 79 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
build, | ||
dist, | ||
.cache, | ||
docs, |
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,61 @@ | ||
--- | ||
name: python-tests | ||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
# runs-on: ubuntu-latest | ||
container: python:3.10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip install -r lint-requirements.txt -r test-requirements.txt -r requirements.txt | ||
pip install .[linting,testing,consumer,producer] | ||
- name: isort | ||
run: isort --check . | ||
|
||
- name: black | ||
run: black --check . | ||
|
||
- name: flake8 | ||
run: flake8 . | ||
|
||
- name: pylint | ||
run: pylint src tests e2e_test | ||
|
||
- name: pydocstyle | ||
run: pydocstyle src | ||
|
||
- name: bandit | ||
run: bandit -r src | ||
|
||
- name: pyright | ||
run: pyright | ||
|
||
- name: yamllint | ||
run: yamllint . | ||
|
||
test: | ||
container: python:3.10 | ||
services: | ||
dynamodb: | ||
image: amazon/dynamodb-local | ||
sqs: | ||
image: softwaremill/elasticmq | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip install -r requirements.txt -r test-requirements.txt | ||
pip install .[testing,consumer,producer] | ||
- name: test | ||
run: pytest --cov-report=xml --cov=src --junitxml=report.xml --cov-fail-under=80 tests | ||
env: | ||
SQS_ENDPOINT_URL: "http://sqs:9324" | ||
DDB_ENDPOINT_URL: "http://dynamodb:8000" |
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,115 @@ | ||
# Temporary and binary files | ||
*~ | ||
*.py[cod] | ||
*.so | ||
*.cfg | ||
!.isort.cfg | ||
!setup.cfg | ||
*.orig | ||
*.log | ||
*.pot | ||
__pycache__/* | ||
.cache/* | ||
.*.swp | ||
*/.ipynb_checkpoints/* | ||
*.xml | ||
|
||
# Project files | ||
.ropeproject | ||
.project | ||
.pydevproject | ||
.settings | ||
.idea | ||
.vscode | ||
tags | ||
|
||
# Package files | ||
*.egg | ||
*.eggs/ | ||
.installed.cfg | ||
*.egg-info | ||
|
||
# Unittest and coverage | ||
htmlcov/* | ||
.coverage | ||
.tox | ||
.nox | ||
junit.xml | ||
coverage.xml | ||
.pytest_cache/ | ||
*.zip | ||
|
||
# Build and docs folder/files | ||
build/* | ||
dist/* | ||
sdist/* | ||
docs/api/* | ||
docs/_rst/* | ||
docs/_build/* | ||
cover/* | ||
|
||
# Per-project virtualenvs | ||
.venv*/ | ||
.env | ||
|
||
|
||
# Mac OS-specific storage files | ||
.DS_Store | ||
|
||
# secret | ||
.secret | ||
|
||
postgres-data | ||
|
||
|
||
src/*/.yarn/* | ||
!src/*/.yarn/patches | ||
!src/*/.yarn/plugins | ||
!src/*/.yarn/releases | ||
!src/*/.yarn/sdks | ||
!src/*/.yarn/versions | ||
src/**/node_modules | ||
*.idea | ||
|
||
.env.* | ||
!example.env | ||
temp | ||
.hypothesis | ||
|
||
src/system-view/node_modules/* | ||
|
||
dynamodb-data | ||
|
||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# .tfstate files | ||
*.tfstate | ||
*.tfstate.* | ||
|
||
# Crash log files | ||
crash.log | ||
|
||
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most | ||
# .tfvars files are managed as part of configuration and so should be included in | ||
# version control. | ||
# | ||
# example.tfvars | ||
|
||
# Ignore override files as they are usually used to override resources locally and so | ||
# are not checked in | ||
override.tf | ||
override.tf.json | ||
*_override.tf | ||
*_override.tf.json | ||
|
||
# Include override files you do wish to add to version control using negated pattern | ||
# | ||
# !example_override.tf | ||
|
||
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan | ||
# example: *tfplan* | ||
.coverage.* | ||
|
||
|
||
ct-inference-engine |
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,92 @@ | ||
--- | ||
exclude: '^(build|docs)' | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.33.0 | ||
hooks: | ||
- id: yamllint | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/pycqa/pydocstyle | ||
rev: 6.3.0 | ||
hooks: | ||
- id: pydocstyle | ||
additional_dependencies: ['pydocstyle[toml]'] | ||
files: src | ||
|
||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.5 | ||
hooks: | ||
- id: bandit | ||
args: ["-c", "pyproject.toml"] | ||
additional_dependencies: ["bandit[toml]"] | ||
exclude: ^(tests/|e2e_test/) | ||
|
||
- repo: https://github.com/gruntwork-io/pre-commit | ||
rev: v0.1.22 | ||
hooks: | ||
- id: tflint | ||
- id: terraform-fmt | ||
|
||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.79.1 | ||
hooks: | ||
- id: terraform_tfsec | ||
|
||
- repo: https://github.com/terraform-docs/terraform-docs | ||
rev: v0.16.0 | ||
hooks: | ||
- id: terraform-docs-go | ||
name: terraform-docs-infra | ||
args: ["markdown", "table", "--output-file", "./README.md", "--output-mode", "inject", "--recursive", "terraform/infra"] | ||
- id: terraform-docs-go | ||
name: terraform-docs-endpoints | ||
args: ["markdown", "table", "--output-file", "./README.md", "--output-mode", "inject", "terraform/endpoints"] | ||
|
||
- repo: local | ||
hooks: | ||
- id: pyright | ||
name: pyright | ||
files: \.py$ | ||
stages: [commit] | ||
language: system | ||
entry: pyright | ||
- id: pylint | ||
name: pylint | ||
entry: pylint | ||
language: system | ||
types: [python] | ||
exclude: ^(dev/|terraform/) | ||
args: | ||
[ | ||
"-rn", # Only display messages | ||
"-sn", # Don't display the score | ||
] |
Oops, something went wrong.