Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from zfit/dependabot/github_actions/actions-67c…
Browse files Browse the repository at this point in the history
…f71b959

Bump dependabot/fetch-metadata from 1.1.1 to 2.1.0 in the actions group
  • Loading branch information
jonas-eschle authored Apr 29, 2024
2 parents 9470d0f + f00bc40 commit e3feaaa
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 26 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
name: Dependabot auto-approve
on: pull_request_target

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
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}}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ repos:
args: [--fix, --unsafe-fixes, --show-fixes]
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
types_or: [python, pyi, jupyter]
25 changes: 8 additions & 17 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand All @@ -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()
Expand Down Expand Up @@ -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")
Expand All @@ -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():
Expand Down
4 changes: 1 addition & 3 deletions src/zfit_astro/__init__.py
Original file line number Diff line number Diff line change
@@ -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__
Expand Down

0 comments on commit e3feaaa

Please sign in to comment.