Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 15 additions & 7 deletions tools/releasing/README.md → .dev-tools/releasing/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Releasing helpers

## Config visualization

The `visualize-configs.sh` script iterates over all tutorial cases and updates the visualizations of the `precice-config.xml` files.

Run it from the root tutorials directory in serial (`./visualize-configs.sh`) or in parallel (`./visualize-configs.sh -parallel`).

If not already available, the script will install the `precice-config-visualizer` in a Python virtual environment.

## Python dependency reference files

Each Python participant lists dependencies in its local `requirements.txt` using loose version ranges (for example `numpy >1, <2`, `pyprecice~=3.0`). Tutorial `run.sh` scripts install from these files as before.
Expand All @@ -10,20 +18,20 @@ Next to each `requirements.txt`, a sibling `requirements-reference.txt` records
pip install -r requirements-reference.txt
```

This tool lives under `tools/releasing/` and depends on:
This tool lives under `.dev-tools/releasing/` and depends on:

```bash
pip install -r tools/releasing/requirements.txt
pip install -r .dev-tools/releasing/requirements.txt
```

Update reference files after changing `requirements.txt` files. By default, only files whose resolved package pins changed are rewritten (timestamps alone do not create a diff). Use `--all` to force a full refresh, or pass a path to limit the update to one directory:

```bash
python3 tools/releasing/update-requirements-reference.py
python3 tools/releasing/update-requirements-reference.py path/to/participant
python3 tools/releasing/update-requirements-reference.py --all
python3 tools/releasing/update-requirements-reference.py --check
python3 tools/releasing/update-requirements-reference.py --check --fail-on-outdated
python3 .dev-tools/releasing/update-requirements-reference.py
python3 .dev-tools/releasing/update-requirements-reference.py path/to/participant
python3 .dev-tools/releasing/update-requirements-reference.py --all
python3 .dev-tools/releasing/update-requirements-reference.py --check
python3 .dev-tools/releasing/update-requirements-reference.py --check --fail-on-outdated
```

With `--check`, the tool fails when a sibling `requirements-reference.txt` is missing, and warns when pins are outdated. The `--fail-on-outdated` option turns outdated pins into errors (used for release PRs to `master`).
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
requirements-reference.txt next to each file.

Run from the repository root:
python3 tools/releasing/update-requirements-reference.py
python3 tools/releasing/update-requirements-reference.py --all
python3 tools/releasing/update-requirements-reference.py path/to/dir
python3 tools/releasing/update-requirements-reference.py --check
python3 tools/releasing/update-requirements-reference.py --check --fail-on-outdated
python3 .dev-tools/releasing/update-requirements-reference.py
python3 .dev-tools/releasing/update-requirements-reference.py --all
python3 .dev-tools/releasing/update-requirements-reference.py path/to/dir
python3 .dev-tools/releasing/update-requirements-reference.py --check
python3 .dev-tools/releasing/update-requirements-reference.py --check --fail-on-outdated
"""
from __future__ import annotations

Expand All @@ -31,7 +31,7 @@

REPO_ROOT = Path(__file__).resolve().parent.parent.parent
REFERENCE_NAME = "requirements-reference.txt"
SCRIPT_RELATIVE = "tools/releasing/update-requirements-reference.py"
SCRIPT_RELATIVE = ".dev-tools/releasing/update-requirements-reference.py"
# Empty by default: every tracked requirements.txt gets a sibling reference file.
EXCLUDED_RELATIVE: set[str] = set()

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TODO: Summarize and motivate the changes, link to issues, remove the checklist e
## Checklist

- [ ] I added a summary of any user-facing changes (compared to the last release) in the `changelog-entries/<PRnumber>.md`.
- [ ] If I changed `requirements.txt` files, I regenerated sibling `requirements-reference.txt` files with `python3 tools/releasing/update-requirements-reference.py` (pass a path to update only that directory, or `--all` to refresh everything).
- [ ] If I changed `requirements.txt` files, I regenerated sibling `requirements-reference.txt` files with `python3 .dev-tools/releasing/update-requirements-reference.py` (pass a path to update only that directory, or `--all` to refresh everything).

For new tutorials or tutorial cases:

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check-requirements-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
paths:
- '**/requirements.txt'
- '**/requirements-reference.txt'
- tools/releasing/update-requirements-reference.py
- tools/releasing/requirements.txt
- .dev-tools/releasing/update-requirements-reference.py
- .dev-tools/releasing/requirements.txt
jobs:
check:
runs-on: ubuntu-latest
Expand All @@ -20,10 +20,10 @@ jobs:
with:
python-version: '3.10'
- name: Install packaging
run: pip install -r tools/releasing/requirements.txt
run: pip install -r .dev-tools/releasing/requirements.txt
- name: Check requirements-reference.txt files exist
if: github.base_ref == 'develop'
run: python3 tools/releasing/update-requirements-reference.py --check
run: python3 .dev-tools/releasing/update-requirements-reference.py --check
- name: Check requirements-reference.txt files are up to date
if: github.base_ref == 'master'
run: python3 tools/releasing/update-requirements-reference.py --check --fail-on-outdated
run: python3 .dev-tools/releasing/update-requirements-reference.py --check --fail-on-outdated
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ repos:
- id: check-image-naming
name: check image names
language: python
entry: tools/check-image-names.py
entry: .dev-tools/linting/check-image-names.py
files: ".*/images/.*"
- id: check-size
name: check sizes
language: script
entry: tools/check-size.sh
entry: .dev-tools/linting/check-size.sh
pass_filenames: false
- id: check-names
name: check file names
language: script
entry: tools/check.sh
entry: .dev-tools/linting/check-filenames-permalinks.sh
pass_filenames: false
- id: check-links-to-precice
name: check links to precice.org
language: script
entry: tools/check-links-to-precice.sh
entry: .dev-tools/linting/check-links-to-precice.sh
types_or: ["markdown", "html"]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Contributions to this repository are very welcome. Please refer to the page [Con

Note that we use [Git LFS](https://git-lfs.com/) to version reference results. These will appear as seemingly empty files containing URLs if you don't have Git LFS installed (optional, mainly useful for our system tests).

For Python dependency ranges and the sibling `requirements-reference.txt` files used for reproducible installs, see [`tools/releasing/README.md`](tools/releasing/README.md).
For Python dependency ranges and the sibling `requirements-reference.txt` files used for reproducible installs, see [`.dev-tools/releasing/README.md`](.dev-tools/releasing/README.md).
2 changes: 1 addition & 1 deletion changelog-entries/610.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Add loose version constraints to tutorial `requirements.txt` files and sibling `requirements-reference.txt` pins generated from PyPI via `tools/releasing/update-requirements-reference.py`, with a CI check that requires reference files on `develop` and up-to-date pins on release PRs to `master` ([#871](https://github.com/precice/tutorials/pull/871)).
- Add loose version constraints to tutorial `requirements.txt` files and sibling `requirements-reference.txt` pins generated from PyPI via `.dev-tools/releasing/update-requirements-reference.py`, with a CI check that requires reference files on `develop` and up-to-date pins on release PRs to `master` ([#871](https://github.com/precice/tutorials/pull/871)).
Empty file modified tools/cleaning-tools.sh
100755 → 100644
Empty file.
Empty file modified tools/openfoam-remove-empty-dirs.sh
100755 → 100644
Empty file.