Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PiranhaSa authored Nov 8, 2023
0 parents commit cbff35d
Show file tree
Hide file tree
Showing 17 changed files with 945 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.dockerignore
Dockerfile
requirements.txt
.github
tests
.pylintrc
README.md
50 changes: 50 additions & 0 deletions .github/workflows/pylint.yml
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
44 changes: 44 additions & 0 deletions .github/workflows/pytest.yml
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"
53 changes: 53 additions & 0 deletions .gitignore
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*/
23 changes: 23 additions & 0 deletions .mypy.ini
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

Loading

0 comments on commit cbff35d

Please sign in to comment.