Skip to content

Commit

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

Co-authored-by: GitHub <noreply@github.com>
  • Loading branch information
pre-commit-ci[bot] and web-flow authored Jan 13, 2025
1 parent 5e8e7b0 commit a5829da
Show file tree
Hide file tree
Showing 12 changed files with 934 additions and 796 deletions.
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
".pre-commit-config.yaml",
".prettierignore",
".readthedocs.yml",
".taplo.toml",
".vscode/*",
"CITATION.cff",
"codecov.yml",
Expand Down Expand Up @@ -58,7 +59,6 @@
"classmethod",
"cmap",
"cmin",
"codacy",
"codecov",
"codemirror",
"colab",
Expand Down
2 changes: 0 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
uv sync --all-extras --quiet
source .venv/bin/activate

export PYTHONHASHSEED=0
2 changes: 0 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name: Benchmark
env:
PYTHONHASHSEED: "0"

on:
push:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ concurrency:
cancel-in-progress: |-
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
env:
PYTHONHASHSEED: "0"

on:
push:
branches:
Expand Down Expand Up @@ -42,6 +39,8 @@ jobs:
macos-python-version: "3.9"
specific-pip-packages: ${{ inputs.specific-pip-packages }}
test-output-path: tests/output/
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
style:
if: inputs.specific-pip-packages == ''
secrets:
Expand Down
9 changes: 4 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ 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:
- --doc-apt-packages=graphviz
- --environment-variables=PYTHONHASHSEED=0
- --repo-name=tensorwaves
- --repo-title=TensorWaves
- --update-lock-files=outsource
Expand Down Expand Up @@ -61,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 +113,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 +157,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/tensorwaves
cd tensorwaves
```

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/tensorwaves/workflows/pytest/badge.svg)](https://github.com/ComPWA/tensorwaves/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/tensorwaves/branch/main/graph/badge.svg)](https://codecov.io/gh/ComPWA/tensorwaves)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/db8f89e5588041d8a995968262c224ef)](https://www.codacy.com/gh/ComPWA/tensorwaves)
[![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: 85% # can't go below this percentage
threshold: 3% # allow drops by this percentage
target: 85%
threshold: 3%
base: auto
# advanced
branches: null
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags: null
paths: null
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 a5829da

Please sign in to comment.