generated from Ostorlab/template_agent
-
Notifications
You must be signed in to change notification settings - Fork 5
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
0 parents
commit cbff35d
Showing
17 changed files
with
945 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,7 @@ | ||
.dockerignore | ||
Dockerfile | ||
requirements.txt | ||
.github | ||
tests | ||
.pylintrc | ||
README.md |
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,50 @@ | ||
--- | ||
# This workflow use pylint: | ||
# - Install Python dependencies. | ||
# - Run pylint for each of the supported Python versions. | ||
# Pylint will only fail without fixing any of the errors or warnings. | ||
|
||
name: Pylint & Mypy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
**/requirement.txt | ||
**/test-requirement.txt | ||
- name: Install dependencies. | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirement.txt | ||
python -m pip install -r tests/test-requirement.txt | ||
- name: Running Black. | ||
uses: psf/black@stable | ||
with: | ||
options: "--check" | ||
- name: Running linter. | ||
run: | | ||
pylint --rcfile=.pylintrc --ignore=tests/ agent/ | ||
pylint --rcfile=.pylintrc -d C0103,W0613 tests/ | ||
- name: Running static types checker. | ||
run: | | ||
mypy |
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,44 @@ | ||
--- | ||
# This workflow use pytest: | ||
# - Install Python dependencies. | ||
# - Run pytest for each of the supported Python versions ["3.8", "3.9", "3.10"]. | ||
# Running pytest with -m "no docker" to disable test that require a docker installation. | ||
|
||
name: Pytest. | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies. | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirement.txt | ||
python -m pip install -r tests/test-requirement.txt | ||
- name: Runnning tests with pytest. | ||
run: | | ||
set -o pipefail | ||
pytest -m "not docker" |
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,53 @@ | ||
# Temporary and binary files | ||
*~ | ||
*.py[cod] | ||
*.so | ||
*.cfg | ||
!.isort.cfg | ||
!setup.cfg | ||
*.orig | ||
*.log | ||
*.pot | ||
__pycache__/* | ||
.cache/* | ||
.*.swp | ||
*/.ipynb_checkpoints/* | ||
.DS_Store | ||
|
||
# Project files | ||
.ropeproject | ||
.project | ||
.pydevproject | ||
.settings | ||
.idea | ||
.vscode | ||
tags | ||
|
||
# Package files | ||
*.egg | ||
*.eggs/ | ||
.installed.cfg | ||
*.egg-info | ||
|
||
# Unittest and coverage | ||
htmlcov/* | ||
.coverage | ||
.coverage.* | ||
.tox | ||
junit*.xml | ||
coverage.xml | ||
.pytest_cache/ | ||
|
||
# Build and docs folder/files | ||
build/* | ||
dist/* | ||
sdist/* | ||
docs/api/* | ||
docs/_rst/* | ||
docs/_build/* | ||
cover/* | ||
MANIFEST | ||
|
||
# Per-project virtualenvs | ||
.venv*/ | ||
.conda*/ |
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,23 @@ | ||
[mypy] | ||
files = agent, tests | ||
check_untyped_defs = True | ||
follow_imports_for_stubs = True | ||
#disallow_any_decorated = True | ||
disallow_any_generics = True | ||
disallow_incomplete_defs = True | ||
disallow_subclassing_any = True | ||
disallow_untyped_calls = True | ||
disallow_untyped_decorators = True | ||
disallow_untyped_defs = True | ||
implicit_reexport = False | ||
no_implicit_optional = True | ||
show_error_codes = True | ||
strict_equality = True | ||
warn_incomplete_stub = True | ||
warn_redundant_casts = True | ||
#warn_unreachable = True | ||
warn_unused_ignores = True | ||
disallow_any_unimported = True | ||
warn_return_any = True | ||
exclude = .*_pb2.py | ||
|
Oops, something went wrong.