Skip to content
Merged
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
16 changes: 12 additions & 4 deletions docs/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ changes: `README.md` (overview, under 300 lines), `doc/` (one file per topic), a

## Releasing

`fz/_version.py` is stamped by CI (`scripts/stamp_version.py`) and must not be edited by
hand; `pyproject.toml` reads the version dynamically. A release commit folds `## Unreleased` into a dated `## Version X.Y` section in
`NEWS.md`, and aligns the Claude Code plugin version. Publishing a GitHub Release with
the matching tag triggers `release.yml`, which pushes to PyPI.
The version number lives in `fz/__init__.py` only (`pyproject.toml`, `fz --version` and
`manifest.json` read it). `fz/_version.py` holds the commit date and hash; `release.yml`
stamps it (`scripts/stamp_version.py`) and it must not be edited by hand. A release
commit folds `## Unreleased` into a dated `## Version X.Y` section in `NEWS.md`, and
aligns the Claude Code plugin version.

Publishing a GitHub Release triggers `release.yml`. It builds the wheel and the sdist
once, checks them with `scripts/check_dist.py` (one pure-Python wheel, `twine check`,
release tag equal to `fz.__version__`, a leading `v` being allowed), installs the wheel
on the CI OS × Python matrix with a smoke test, then publishes to PyPI and attaches the
files to the release. A tag that does not match the version stops the release before
anything is published.

## See Also

Expand Down
10 changes: 7 additions & 3 deletions docs/reference/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
This page lists the behaviors of fz that most often surprise users. Each item states the
rule, the consequence, and what to do instead. Items were checked against the code of fz (`fz/core.py`,
`fz/helpers.py`, `fz/runners/`, `fz/config.py`, `fz/cli.py`) and by running it. They
describe fz after Funz/fz#99; fz ≤ 1.2 differs on timeouts `0`, default delimiters,
describe fz 2.0; fz ≤ 1.2 differs on timeouts `0`, default delimiters,
`fz list` and global installs. Source:
[`doc/limitations.md`](https://github.com/Funz/fz/blob/main/doc/limitations.md).

## Platform and dependencies

- **Python ≥ 3.9.** 3.9–3.13 are tested in CI; 3.14 is exercised as a pre-release only.
- **Python ≥ 3.9.** 3.9–3.14 are tested in CI on Linux, macOS and Windows (3.9 not on
Windows).
- **bash is required everywhere.** Calculator commands and shell output parsers run
through bash. On Windows, install MSYS2 or Git Bash and point `FZ_SHELL_PATH` at its
`bin` directories (see [Environment Variables](environment.md#general)). Shell-free output parsers
Expand All @@ -26,7 +27,10 @@ describe fz after Funz/fz#99; fz ≤ 1.2 differs on timeouts `0`, default delimi
- **Default delimiters.** A model without `delim` (nor `var_delim`) accepts both `$(x)`
and `${x}` for variables and uses `@{...}` for formulas; the CLI without `--model` uses
the same default. Setting `"delim": "{}"` or `"()"` restricts variables to one form.
Templates that contain other `${...}` text (shell snippets) should set `delim`.
Templates that contain other `${...}` text (shell snippets) should set `delim`:
`fzi` (hence `fzc`/`fzr`) logs a warning (`FZ_LOG_LEVEL=WARNING` or lower) when
`${...}` names sit next to `$(...)` variables in a model without `delim`, and the
`input_variables is required` error names the `${...}`-only variables.
- **No automatic `?var` conversion.** `?var` is a variable only with `"varprefix": "?"`.
- A variable absent from `input_variables` and without `~default` is left as-is in the
compiled file (no error from `fzc`).
Expand Down
29 changes: 26 additions & 3 deletions docs/reference/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
Complete, authoritative notes: [NEWS.md](https://github.com/Funz/fz/blob/main/NEWS.md)
in the fz repository.

## Unreleased (main branch, after 1.2)
## Version 2.0 (2026-11-08)

2.0 is a major version because it changes behavior in ways that are not backward
compatible (summary below). It also fixes wrong results with some `sh://` commands and
a command-injection issue present in 1.2: upgrading is recommended.

!!! warning "Behavior changes when upgrading from 1.2"
- Python 3.8 is no longer supported (`requires-python >= 3.9`).
Expand Down Expand Up @@ -55,8 +59,27 @@ in the fz repository.
- An unexpected exception in one case no longer aborts a sequential campaign: the case
gets `status="error"` with the message in the `error` column (Funz/fz#100).
- `fzo` decodes percent-encoded case directory names when rebuilding variable columns.
- Claude Code plugin / Agent Skill updated for all the above (plugin manifests to be
bumped with the release).
- Claude Code plugin / Agent Skill updated for all the above; plugin version 2.0.0. The
skill now documents every name exported by `fz` and every `fz` subcommand (checked by
`tests/test_skill_static.py`).
- **Default delimiters warning** (Funz/fz#104): when a model without `delim` has `${...}`
names next to `$(...)` variables (typically shell text such as `${HOME}`), `fzi` (hence
`fzc`/`fzr`/`fzd`) logs a warning (visible with `FZ_LOG_LEVEL=WARNING` or lower), and
the `input_variables is required` error names the `${...}`-only variables. Results are
unchanged.
- `manifest.json` (`fz_version`, RO-Crate) reported version `1.0`; it now reports the
installed version (Funz/fz#103).
- **Release tooling** (Funz/fz#105): the pure-Python wheel and the sdist are built once
and checked (`scripts/check_dist.py`: one `py3-none-any` wheel, `twine check`, release
tag equal to the version); `release.yml` installs and smoke-tests the wheel on the CI
OS × Python matrix before publishing, and `ci.yml` installs it in a fresh venv on every
push and pull request.
- `fzd` with a file-based model no longer leaves an empty `iterNNN_<timestamp>/`
directory next to each `iterNNN/` of its `analysis_dir` (Funz/fz#108).
- A failed `#require:` auto-install of an algorithm now reports pip's output; the error
ended with an empty `Error:` (Funz/fz#111).
- The Agent Skill was audited against the code (Funz/fz#107): among others, the `fzd`
example passed `max_iterations` to `bfgs.py`, which reads `max_iter`.
- Error reports no longer blame the command for a "not found" printed by the code.
- `fz/runners.py` split into the `fz.runners` package (no behavior change; code patching
`fz.runners.run_command` must patch `fz.runners.sh.run_command`).
Expand Down
1 change: 1 addition & 0 deletions docs/reference/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fz.set_log_level("DEBUG") # or FZ_LOG_LEVEL=DEBUG before starting Python
| `Permission denied ... ./input.txt` | No calculator: fz fell back to an empty `sh://` | Give `calculators`, or install a calculator alias matching the model `id` |
| `fzi` misses `${x}` (fz ≤ 1.2) or `$(x)` variables | Model sets `delim` to the other pair (or fz ≤ 1.2 default `()`) | Fix `delim`, or remove it to accept both forms |
| `fzi` reports unexpected variables | `varprefix` collides with the code's syntax | Change `varprefix` (e.g. `%`) |
| `fzi` lists `HOME` (or other shell `${...}` names); warning `The model sets no "delim"` | A model without `delim` reads `${x}` as well as `$(x)` | Set `"delim": "()"` (or `"{}"`) in the model |
| Case `done` but output `None` and `error` = `Missing output: ...` | Extractor found nothing: wrong file/pattern, file written elsewhere, locale | Test the extractor with `fzo` on the case directory |
| Output value equals the program's stdout | The code writes `out.txt` (reserved, overwritten by stdout) | Rename the code's output file |
| Result file contains the input twice, or the command gets unexpected arguments | The compiled input names are appended to the end of the `sh://` command line | Move file handling into a script run as `sh://bash script.sh` |
Expand Down
5 changes: 3 additions & 2 deletions docs/user-guide/templates/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ in the [model](../models/definition.md); this page uses `varprefix="$"`,
A model **without** `delim` accepts both `$(x)` (Java Funz convention) and `${x}` for
variables, and `@{...}` for formulas; the CLI without `--model` does the same. Set
`delim` when the code's own text contains `${...}` or `$(...)` that must not be read
as variables. In fz ≤ 1.2, a model without `delim` only recognized `$(x)` and the CLI
only `${x}`.
as variables. fz logs a warning (`FZ_LOG_LEVEL=WARNING` or lower) when, in a model
without `delim`, `${...}` names appear next to `$(...)` variables. In fz ≤ 1.2, a model
without `delim` only recognized `$(x)` and the CLI only `${x}`.

## Variables

Expand Down
Loading