diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..9fa4f38 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +## PR Details + + + +## Issues reported: + + diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 0000000..07902a4 --- /dev/null +++ b/.github/workflows/linters.yml @@ -0,0 +1,33 @@ +name: Code Linters + +on: + pull_request: + branches: + - master + +jobs: + linters: + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v4 + with: + python-version: '3.12' + cache: 'pip' + + - name: Set up virtual environment + run: | + python -m venv .venv + echo ".venv/bin" >> $GITHUB_PATH # Add virtualenv to PATH for subsequent steps + + - name: Install dependencies based on requirements.txt + run: pip install -r requirements.txt + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit hooks + run: pre-commit run --all-files \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a525861 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +repos: +- repo: https://github.com/psf/black + rev: 23.7.0 + hooks: + - id: black + args: [--line-length=150] + +- repo: https://github.com/RobertCraigie/pyright-python + rev: v1.1.326 + hooks: + - id: pyright diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 0000000..85c22da --- /dev/null +++ b/pyrightconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["src", "tests"], + "reportMissingImports": true, + "reportOptionalMemberAccess": false, + "reportGeneralTypeIssues": false, + "reportInvalidStringEscapeSequence": false, + "reportWildcardImportFromLibrary": false, + "venvPath": ".", + "venv": ".venv", + "typeCheckingMode": "off" +} \ No newline at end of file diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..a876cae --- /dev/null +++ b/pytest.ini @@ -0,0 +1,8 @@ +[pytest] +addopts = -s --instafail --tb=short --color=auto +log_level = DEBUG +log_cli = True +log_file = log/test.log +log_cli_format = %(asctime)s %(name)s %(levelname)s %(message)s +log_file_format = %(asctime)s %(name)s %(levelname)s %(message)s +timeout = 300