diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33f1ba5..e57a778 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,14 +19,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: recursive persist-credentials: false - name: Setup Python id: setup-python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -67,7 +67,7 @@ jobs: } - name: Cache pip wheels - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/.cache/pip @@ -91,7 +91,7 @@ jobs: run: poetry run coverage xml -o coverage.xml - name: Upload coverage.xml - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: coverage-${{ matrix.os }}-py${{ matrix.python-version }} path: coverage.xml @@ -102,13 +102,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: recursive persist-credentials: false - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" @@ -138,7 +138,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: recursive persist-credentials: false @@ -147,7 +147,7 @@ jobs: uses: pypa/cibuildwheel@v3.4.1 - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: wheels-${{ matrix.os }} path: wheelhouse/*.whl diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index e81ed63..8342e42 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -21,12 +21,12 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive persist-credentials: false - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.12" cache: "pip" @@ -46,10 +46,10 @@ jobs: touch docs/build/html/.nojekyll - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 with: path: docs/build/html - id: deployment name: Deploy to GitHub Pages - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/docs_preview.yml b/.github/workflows/docs_preview.yml index 38455e9..1cba1c4 100644 --- a/.github/workflows/docs_preview.yml +++ b/.github/workflows/docs_preview.yml @@ -11,12 +11,12 @@ jobs: build-preview: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive persist-credentials: false - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.12" cache: "pip" @@ -36,7 +36,7 @@ jobs: touch docs/build/html/.nojekyll - name: Upload docs preview artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: docs-html-preview path: docs/build/html diff --git a/pyproject.toml b/pyproject.toml index 03717f2..9234230 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] build-backend = "poetry.core.masonry.api" - requires = [ "cffi>=1.16", "poetry-core>=1.9", @@ -84,7 +83,7 @@ pytest-cov = ">=5" coverage = { version = ">=7.5", extras = [ "toml" ] } pre-commit = ">=3.6" codespell = ">=2.3" -pyproject-fmt = "==2.3.1" +pyproject-fmt = "==2.21.2" readme-renderer = ">=43,<44" twine = ">=6.2,<7" types-setuptools = "*" @@ -95,7 +94,7 @@ types-cffi = ">=1.17.0.0" jupyter = "^1.1.1" matplotlib = "^3.10.6" sphinx = "^7.3" -sphinx-rtd-theme = "^2.0" +sphinx-rtd-theme = "^3.1" sphinxcontrib-napoleon = "^0.7" sphinx-autodoc-typehints = "^2.0" sphinx-copybutton = "^0.5" @@ -112,15 +111,12 @@ test-command = 'python -c "from pysatl_core.sampling.unuran.bindings import _unu target-version = "py312" line-length = 100 exclude = [ "subprojects" ] - format.line-ending = "lf" - lint.select = [ "B", "C4", "E", "F", "I", "ISC", "PIE", "SIM", "TID", "UP" ] lint.ignore = [ "B008", "E203" ] lint.per-file-ignores."**/__init__.py" = [ "F403" ] lint.fixable = [ "ALL" ] -lint.unfixable = [ ] - +lint.unfixable = [] lint.isort.combine-as-imports = true lint.isort.force-single-line = false lint.isort.known-first-party = [ "pysatl_core" ] @@ -129,22 +125,17 @@ lint.isort.order-by-type = true [tool.codespell] skip = "subprojects/**" -[tool.pytest.ini_options] -addopts = "-q --cov=pysatl_core --cov-report=term-missing" -testpaths = [ "tests" ] - -[tool.coverage.run] -source = [ "pysatl_core" ] -branch = true -parallel = true - -[tool.coverage.report] -show_missing = true -skip_covered = false -exclude_lines = [ - "pragma: no cover", - "if __name__ == .__main__.:", +[tool.pyproject-fmt] +expand_tables = [ + "tool.coverage.report", + "tool.coverage.run", + "tool.poetry.build", + "tool.poetry.dependencies", + "tool.poetry.group.dev.dependencies", + "tool.poetry.group.docs.dependencies", + "tool.pytest.ini_options", ] +skip_wrap_for_keys = [ "tool.cibuildwheel.test-command" ] [tool.mypy] files = [ "src", "tests" ] @@ -165,3 +156,20 @@ disallow_untyped_defs = false check_untyped_defs = true warn_return_any = false implicit_reexport = true + +[tool.pytest.ini_options] +addopts = "-q --cov=pysatl_core --cov-report=term-missing" +testpaths = [ "tests" ] + +[tool.coverage.report] +show_missing = true +skip_covered = false +exclude_lines = [ + "pragma: no cover", + "if __name__ == .__main__.:", +] + +[tool.coverage.run] +source = [ "pysatl_core" ] +branch = true +parallel = true