From 6db7ad3d2d174c7ebde195f2692d116fca41dfd6 Mon Sep 17 00:00:00 2001 From: Wes John-Alder Date: Sat, 14 Nov 2026 11:13:38 -0500 Subject: [PATCH 1/2] Add AGENTS.md for coding agents AGENTS.md gives coding agents the repo layout, the setup, lint, and test commands that CI runs, and the conventions a PR must follow. CLAUDE.md imports it for Claude Code. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 66 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..bcbe4e5ae --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,65 @@ +# AGENTS.md + +`citrine-python` is the Python SDK for the Citrine Platform. Users install it from PyPI as `citrine`. It calls the platform REST APIs and builds on the `gemd` package from `gemd-python`. + +## Layout + +| Path | Contents | +|------|----------| +| `src/citrine/citrine.py` | `Citrine`, the client entry point | +| `src/citrine/_session.py` | HTTP session, auth, and request logging | +| `src/citrine/resources/` | Platform resources and their collections, such as projects, teams, and datasets | +| `src/citrine/informatics/` | AI Engine models: predictors, design spaces, constraints, and workflows | +| `src/citrine/gemtables/`, `src/citrine/gemd_queries/` | GEM Table definitions and GEMD query criteria | +| `src/citrine/_rest/`, `src/citrine/_serialization/` | Base collection and pagination classes, and the base classes for serialization | +| `src/citrine/__version__.py` | Package version, read by setuptools | +| `tests/` | Unit tests, which mirror `src/citrine/`. Shared fakes and factories are in `tests/utils/` | +| `docs/source/` | Sphinx source in `.rst` | +| `scripts/` | Test runner, version-bump check, and docs build | + +## Commands + +CI installs dependencies with pip from `requirements.txt` and `test_requirements.txt`, which pin exact versions. The repo has no `uv.lock`, and CI uses none of the dependency groups in `pyproject.toml`. Set up a virtual environment the same way: + +```bash +pip install -r requirements.txt -r test_requirements.txt +pip install --no-deps -e . +``` + +| Task | Command | +|------|---------| +| Lint | `flake8 src/citrine` | +| Format | `ruff format src tests` | +| Expired deprecations | `derp src src/citrine/__version__.py` | +| Tests with coverage | `pytest --cov=src/citrine --cov-report term-missing:skip-covered --cov-config=tox.ini --no-cov-on-fail --cov-fail-under=100 tests/` | +| Version-bump check | `python scripts/validate_version_bump.py`. It runs `git fetch origin` first. | +| Version check, lint, deprecations, and tests | `scripts/run_tests.sh`. It exits with an error on `main`. | +| Docs | `pip install -r doc_requirements.txt`, then `make -C docs html` | + +## CI gates + +Pull requests into `main` and `release/**` run `.github/workflows/pr-checks.yml` and `pr-tests.yml`. Both call shared workflows in `CitrineInformatics/common-gh-actions`. To pass, a PR needs: + +1. A higher version in `src/citrine/__version__.py` than `origin/main` has. +2. A clean `flake8` run on `src/citrine`. +3. No `removed_in` deprecation at or below the current version, checked by `derp`. +4. Passing tests at 100% line coverage, on Python 3.10 through 3.14, on Linux, macOS, and Windows. + +The docs job builds with `-W` but has `continue-on-error`, so doc warnings do not block. Publishing a GitHub release deploys to PyPI and GitHub Pages. + +## Conventions + +- Style is PEP 8 with a 99-character code limit and a 119-character docstring limit. `tox.ini` holds the flake8 config and its ignore list. +- Lint with `flake8` and format with `ruff format`. `pyproject.toml` holds the ruff config. +- Write Numpy-style docstrings. Sphinx autogenerates `docs/source/reference/`, which git ignores. +- Make arguments keyword-only, except a first argument that is required, obvious, and shared by similar methods. +- Name an object's own identifier `uid`. Name the identifier of another type `_id`, such as `bar_id`. +- Mark unsupported experimental APIs with `[ALPHA]` at the start of the docstring. +- Add runtime dependencies to `pyproject.toml` and pin them in `requirements.txt`. Pin test-only dependencies in `test_requirements.txt`. +- `Citrine()` reads `CITRINE_API_KEY` and `CITRINE_API_HOST` when the caller passes no `api_key` or `host`. Unit tests use fake sessions from `tests/utils/` and run offline. + +## Further reading + +- `CONTRIBUTING.md`: style rules, logging, docs layout, and the release-notes template +- `.github/pull_request_template.md`: the PR checklist +- Published docs: https://citrineinformatics.github.io/citrine-python/ diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..43c994c2d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md From d560ac6e38746a61026dba72f68f363ba1663bb3 Mon Sep 17 00:00:00 2001 From: Ken Kroenlein Date: Wed, 18 Nov 2026 08:47:43 -0700 Subject: [PATCH 2/2] Bump version to 5.3.2 Co-Authored-By: Claude Opus 5.5 --- src/citrine/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/citrine/__version__.py b/src/citrine/__version__.py index 0419a93d2..07f0e9e28 100644 --- a/src/citrine/__version__.py +++ b/src/citrine/__version__.py @@ -1 +1 @@ -__version__ = "5.3.1" +__version__ = "5.3.2"