diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 47d32ed..0f39326 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,10 +1,10 @@ name: Dependabot auto-approve on: pull_request_target - + permissions: contents: write pull-requests: write - + jobs: dependabot: runs-on: ubuntu-latest @@ -12,11 +12,14 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.1.1 + uses: dependabot/fetch-metadata@v2.1.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-merge for Dependabot PRs - if: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}} + if: + ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') + && steps.metadata.outputs.update-type == + 'version-update:semver-patch'}} run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02dd98b..5f9d7b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,9 @@ jobs: run: python -m pip install .[test] - name: Test package - run: python -m pytest -ra --cov --cov-report=xml --cov-report=term --durations=20 + run: + python -m pytest -ra --cov --cov-report=xml --cov-report=term + --durations=20 - name: Upload coverage report uses: codecov/codecov-action@v4.3.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8254c91..bc2c60b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -162,4 +162,4 @@ repos: args: [--fix, --unsafe-fixes, --show-fixes] # Run the formatter. - id: ruff-format - types_or: [python, pyi, jupyter] \ No newline at end of file + types_or: [python, pyi, jupyter] diff --git a/noxfile.py b/noxfile.py index 091bd9d..4047589 100644 --- a/noxfile.py +++ b/noxfile.py @@ -13,9 +13,7 @@ @nox.session def lint(session: nox.Session) -> None: - """ - Run the linter. - """ + """Run the linter.""" session.install("pre-commit") session.run( "pre-commit", "run", "--all-files", "--show-diff-on-failure", *session.posargs @@ -24,9 +22,7 @@ def lint(session: nox.Session) -> None: @nox.session def pylint(session: nox.Session) -> None: - """ - Run PyLint. - """ + """Run PyLint.""" # This needs to be installed into the package environment, and is slower # than a pre-commit check session.install(".", "pylint") @@ -35,17 +31,16 @@ def pylint(session: nox.Session) -> None: @nox.session def tests(session: nox.Session) -> None: - """ - Run the unit and regular tests. - """ + """Run the unit and regular tests.""" session.install(".[test]") session.run("pytest", *session.posargs) @nox.session(reuse_venv=True) def docs(session: nox.Session) -> None: - """ - Build the docs. Pass "--serve" to serve. Pass "-b linkcheck" to check links. + """Build the docs. + + Pass "--serve" to serve. Pass "-b linkcheck" to check links. """ parser = argparse.ArgumentParser() @@ -86,9 +81,7 @@ def docs(session: nox.Session) -> None: @nox.session def build_api_docs(session: nox.Session) -> None: - """ - Build (regenerate) API docs. - """ + """Build (regenerate) API docs.""" session.install("sphinx") session.chdir("docs") @@ -105,9 +98,7 @@ def build_api_docs(session: nox.Session) -> None: @nox.session def build(session: nox.Session) -> None: - """ - Build an SDist and wheel. - """ + """Build an SDist and wheel.""" build_path = DIR.joinpath("build") if build_path.exists(): diff --git a/src/zfit_astro/__init__.py b/src/zfit_astro/__init__.py index bdf5cca..4a747dd 100644 --- a/src/zfit_astro/__init__.py +++ b/src/zfit_astro/__init__.py @@ -1,10 +1,8 @@ -""" -Copyright (c) 2024 Jonas Eschle. All rights reserved. +"""Copyright (c) 2024 Jonas Eschle. All rights reserved. zfit-astro: Astrophysics extensions for zfit """ - from __future__ import annotations from ._version import version as __version__