Development¶
python -m venv .venv && .venv/bin/pip install -e ".[envs,test,dev]"
.venv/bin/python -m pytest -q # about 30 s
.venv/bin/ruff check src tests scripts examples
.venv/bin/mkdocs build --strict # the documentation site
The core tests need only numpy and scipy. The environment tests are skipped
when gymnasium or pettingzoo is missing. Continuous integration
(.github/workflows/ci.yml) runs four jobs:
- the core tests on Python 3.10 to 3.13;
- the full tests with the environments;
- lint;
- the docs build, plus a wheel check that every bundled data file is
packaged.
On macOS, a file-sync service can set the hidden flag on the virtual
environment's .pth files, and Python then skips them. The tests don't
depend on them (pythonpath = ["src"]), and
chflags nohidden .venv/lib/*/site-packages/*.pth restores the editable
install.
Publishing the documentation¶
The site at https://mhaomou.github.io/interconnection-gym/docs/ is built by
the personal website's deploy workflow (MhaoMou/MhaoMou.github.io). That
workflow checks out this repository and runs mkdocs build --strict into the
site. It runs on every push to the website. After changing the docs here,
refresh them with:
gh workflow run deploy.yml -R MhaoMou/MhaoMou.github.io
Release checklist¶
- Run the tests, lint, and docs build. Run
python -m buildand check the wheel in a fresh environment. - Update
CHANGELOG.mdand the version inpyproject.tomlandsrc/icgym/__init__.py. - Regenerate
benchmarks/RESULTS.md(icgym-bench --seeds 3 --json benchmarks/results.json) if the engine or the baselines changed. - For double-blind review, either:
- mirror the repository on https://anonymous.4open.science, listing the author's name, GitHub handle, and institution as terms to anonymize; or
- build a local copy with
python scripts/make_anonymous.py OUT_DIR --name <github-handle> --name <institution>and check its report.
The author names in pyproject.toml are always included. The GitHub
handle must be given, because it appears in links.
5. Tag the release.