diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index ad0247bd..00000000 --- a/.coveragerc +++ /dev/null @@ -1,22 +0,0 @@ -[run] -branch = True -omit = - */setup.py -source = . - -[report] -omit = - */setup.py -fail_under = 80 -show_missing = True -skip_covered = False -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - - # Don't complain if tests don't hit defensive assertion code: - raise AssertionError - raise NotImplementedError - - # Don't complain if non-runnable code isn't run: - if __name__ == .__main__.: \ No newline at end of file diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index 0c72808f..9185289e 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -15,7 +15,7 @@ jobs: permissions: read-all strategy: matrix: - python-version: [ '3.10' ] + python-version: [ "3.12" ] steps: - uses: actions/checkout@v7 @@ -25,13 +25,15 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - cache: 'pip' - - name: Install the requirements - run: pip install -r requirements.txt + - name: Install uv + uses: astral-sh/setup-uv@v2 + + - name: Install the project with dev dependencies + run: uv sync --extra dev - name: Execute the integrationtests (http1.1) - run: python3 -m unittest discover tests/integrationtest + run: uv run pytest tests/integrationtest env: GRAFANA_HOST: ${{ secrets.GRAFANA_HOST }} GRAFANA_TOKEN: ${{ secrets.GRAFANA_TOKEN }} @@ -45,7 +47,7 @@ jobs: run: sleep 20 - name: Execute the integrationtests (http2) - run: python3 -m unittest discover tests/integrationtest + run: uv run pytest tests/integrationtest env: GRAFANA_HOST: ${{ secrets.GRAFANA_HOST }} GRAFANA_TOKEN: ${{ secrets.GRAFANA_TOKEN }} diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index f74cfa3b..d060e791 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.x'] + python-version: ["3.12"] steps: - name: Checkout the repository and the branch @@ -21,17 +21,12 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - cache: 'pip' - - name: Install the requirements - run: pip install -r requirements.txt && pip install setuptools~=65.5.1 mkdocs mkdocs-material + - name: Install uv + uses: astral-sh/setup-uv@v2 - - name: Install pypa/build - run: >- - python -m - pip install - build - --user + - name: Install build tools and documentation dependencies + run: uv sync --extra dev - name: Build a binary wheel and a source tarball run: >- diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml index b15476f6..9b1b6b64 100644 --- a/.github/workflows/pull-request-checks.yml +++ b/.github/workflows/pull-request-checks.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.10' ] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: - uses: actions/checkout@v7 @@ -20,20 +20,22 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - cache: 'pip' - - name: Install the requirements - run: pip install -r requirements.txt + - name: Install uv + uses: astral-sh/setup-uv@v2 + + - name: Install the project with dev dependencies + run: uv sync --extra dev - name: Execute the unittests - run: python3 -m unittest discover tests/unittests + run: uv run pytest tests/unittests pr-lint: runs-on: ubuntu-latest permissions: write-all strategy: matrix: - python-version: [ '3.10' ] + python-version: [ "3.12" ] steps: - uses: actions/checkout@v7 @@ -43,21 +45,22 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - cache: 'pip' - - name: Execute the linting checks - uses: reviewdog/action-flake8@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - flake8_args: --config=.flake8 - fail_on_error: true + - name: Install uv + uses: astral-sh/setup-uv@v2 + + - name: Install ruff + run: uv sync --extra dev + + - name: Execute the linting checks with ruff + run: uv run ruff check . pr-coverage: runs-on: ubuntu-latest permissions: write-all strategy: matrix: - python-version: [ '3.10' ] + python-version: [ "3.12" ] steps: - uses: actions/checkout@v7 @@ -70,13 +73,15 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - cache: 'pip' - - name: Install the requirements - run: pip install -r requirements.txt && pip install pytest-cov coverage-badge + - name: Install uv + uses: astral-sh/setup-uv@v2 + + - name: Install the project and coverage tools + run: uv sync --extra dev - name: Generate the coverage report - run: export PYTHONPATH=$PWD && pytest --junitxml=pytest.xml --cov=. tests/unittests | tee pytest-coverage.txt + run: export PYTHONPATH=$PWD && uv run pytest --junitxml=pytest.xml --cov=. tests/unittests | tee pytest-coverage.txt - name: Execute the coverage checks uses: MishaKav/pytest-coverage-comment@v1.8.0 @@ -88,7 +93,7 @@ jobs: create-new-comment: true - name: Generate coverage badge - run: coverage-badge -f -o docs/coverage.svg + run: uv run coverage-badge -f -o docs/coverage.svg - name: Check changed files uses: tj-actions/verify-changed-files@v20 @@ -117,7 +122,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.9' ] + python-version: [ "3.12" ] steps: - uses: actions/checkout@v7 @@ -130,13 +135,15 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - cache: 'pip' - - name: Install the requirements - run: pip install pydoc-markdown==4.6.3 mkdocs mkdocs-material + - name: Install uv + uses: astral-sh/setup-uv@v2 + + - name: Install documentation tools + run: uv sync --extra docs - name: Generate documentation - run: pydoc-markdown --render-toc && rm -rf docs/content && mv build/docs/* docs + run: uv run pydoc-markdown --build --site-dir build/docs && rm -rf docs/build docs/content docs/mkdocs.yml && mv build/docs/* docs - name: Check changed files uses: tj-actions/verify-changed-files@v20 diff --git a/.gitignore b/.gitignore index bd1dc81b..e7414108 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,4 @@ dmypy.json # Pyre type checker .pyre/ +.superpowers/ diff --git a/docs/build/docs/404.html b/docs/build/docs/404.html new file mode 100644 index 00000000..627ca018 --- /dev/null +++ b/docs/build/docs/404.html @@ -0,0 +1,1230 @@ + + + +
+ + + + + + + + + + + + + + + + + +0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function K(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(a){s={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i}function B(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o