Skip to content

Commit

Permalink
MAINT: update lock files (#447)
Browse files Browse the repository at this point in the history
* DX: convert Tox config to native TOML
* DX: run benchmarks in default tox job
* FIX: downgrade `pygments` and `sphinx-codeautolink`
* FIX: remove Codacy badge
* FIX: update link to `uv.lock` file explanation
* FIX: set `CODECOV_TOKEN`
* FIX: set `sphinx.configuration`
* MAINT: clean up Codecov config

Co-authored-by: GitHub <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and web-flow authored Jan 13, 2025
1 parent 9fc6c9e commit 5d573b6
Show file tree
Hide file tree
Showing 10 changed files with 816 additions and 701 deletions.
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
".pre-commit-config.yaml",
".prettierignore",
".readthedocs.yml",
".taplo.toml",
".vscode/*",
"CITATION.cff",
"codecov.yml",
Expand Down Expand Up @@ -61,7 +62,6 @@
"celltoolbar",
"clim",
"cmap",
"codacy",
"codecov",
"codemirror",
"colab",
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
coverage-target: ampform
macos-python-version: "3.9"
specific-pip-packages: ${{ inputs.specific-pip-packages }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
style:
if: inputs.specific-pip-packages == ''
secrets:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.8
rev: 0.5.15
hooks:
- id: check-dev-files
args:
Expand Down Expand Up @@ -60,7 +60,7 @@ repos:
metadata.vscode
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -114,7 +114,7 @@ repos:
- --in-place

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
rev: 0.31.0
hooks:
- id: check-jsonschema
name: Check CITATION.cff
Expand Down Expand Up @@ -158,6 +158,6 @@ repos:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.11
rev: 0.5.18
hooks:
- id: uv-lock
4 changes: 3 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ build:
export UV_LINK_MODE=copy
uv run \
--group doc \
--locked \
--no-dev \
--with tox \
tox -e doc
mkdir -p $READTHEDOCS_OUTPUT
mv docs/_build/html $READTHEDOCS_OUTPUT
sphinx:
configuration: docs/conf.py
7 changes: 7 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ compact_inline_tables = true
indent_string = " "
reorder_arrays = true
reorder_keys = true

[[rule]]
include = ["**/pyproject.toml"]
keys = ["tool.tox"]

[rule.formatting]
reorder_arrays = false
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git clone https://github.com/ComPWA/ampform
cd ampform
```

Now it's simply a matter of creating and activating the [virtual environment](https://docs.astral.sh/uv/pip/environments) with [`uv sync`](https://docs.astral.sh/uv/reference/cli/#uv-sync). The dependencies for the project are 'pinned' in each commit through the [`uv.lock` file](https://docs.astral.sh/uv/concepts/projects/#project-lockfile).
Now it's simply a matter of creating and activating the [virtual environment](https://docs.astral.sh/uv/pip/environments) with [`uv sync`](https://docs.astral.sh/uv/reference/cli/#uv-sync). The dependencies for the project are 'pinned' in each commit through the [`uv.lock` file](https://docs.astral.sh/uv/concepts/projects/layout/#the-lockfile).

```shell
uv sync --all-extras
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
[![pytest](https://github.com/ComPWA/ampform/workflows/pytest/badge.svg)](https://github.com/ComPWA/ampform/actions?query=branch%3Amain+workflow%3Apytest)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy.readthedocs.io)
[![Test coverage](https://codecov.io/gh/ComPWA/ampform/branch/main/graph/badge.svg)](https://codecov.io/gh/ComPWA/ampform)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/70fc5fb0f3954a9d82d142efeff4df31)](https://www.codacy.com/gh/ComPWA/ampform)
[![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
Expand Down
14 changes: 2 additions & 12 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,22 @@ coverage:
status:
project:
default:
# basic
target: 75% # can't go below this percentage
threshold: 1% # allow drops by this percentage
target: 75%
threshold: 1%
base: auto
# advanced
branches: []
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags: []
paths: []
patch:
default:
# basic
target: 0
threshold: 5%
base: auto
# advanced
branches: null
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags: null
paths: null
changes: false

parsers:
Expand Down
Loading

0 comments on commit 5d573b6

Please sign in to comment.