Repository navigation
Conversation
Generated with `copier copy` from https://github.com/DiamondLightSource/python-copier-template (5.5.0) and reconciled by hand with the existing project: - Move metadata from setup.cfg into pyproject.toml [project]. setup.py still builds the setuptools_dso extension and sets install_requires, declared dynamic, so the epicscorelibs ABI pin from abi_requires() is kept. - Replace _version_git.py with setuptools_scm. - Require Python >= 3.11. - Replace flake8 with ruff check, using the template's rule selection and ignores so the existing code passes unchanged; the temporary ignores are to be fixed in a follow-up (#214). ruff format is not used. - Configure pyright in basic mode with the rules the existing code violates turned off. - Replace code.yml/docs.yml with the template's ci.yml and reusable workflows. _dist.yml is custom: it builds the sdist and cibuildwheel wheels for cp311-cp314 on Linux, Windows and macOS and tests them as before. Checkouts include the iocStats submodule. The weekly test against upstream master branches moves to periodic.yml. - Switch the docs theme to pydata-sphinx-theme with myst, keeping the existing .rst pages and index. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz5t8qhYupzSkLkFc5K
Lock all dependencies, including the dev dependency group, at their latest versions with `uv lock`. pip-audit and `uv audit` report no known vulnerabilities in the locked packages (certifi is 2026.10.23). Supersedes #213. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz5t8qhYupzSkLkFc5K
- Add [tool.uv] build-constraint-dependencies pinning epicscorelibs to the locked version, so the ABI pin softioc's metadata gets from abi_requires() doesn't change (and break `uv run --locked`) whenever a new epicscorelibs is released. - CHANGELOG: note the dev extra is now a dev dependency group. - CONTRIBUTING: replace the Pipfile.lock copy in the DLS release steps with a uv export of the requirements. - Point the deferred pyright and pytest warning config at #215. - Drop the sphinx-rtd-theme-only rules from theme_overrides.css, keeping the two-column rules that index.rst uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz5t8qhYupzSkLkFc5K
- .vscode: turn off format on save and organize imports, until #214, so saving a file doesn't reformat it. - CONTRIBUTING: export the DLS release requirements without the dev group, and document that the epicscorelibs build constraint must be bumped by hand. - Pass the pypi_token secret to _pypi.yml explicitly instead of inheriting all secrets. - Give the periodic master_branch_test job read-only permissions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz5t8qhYupzSkLkFc5K
The ubuntu runner's system python 3.14 is 3.14.4, on which cothread segfaults in the tests; reproduced locally with uv's 3.14.4, while 3.14.5, 3.14.6 and 3.14.7 pass. Use uv-managed python so the latest patch release is tested. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz5t8qhYupzSkLkFc5K
AlexanderWells-diamond
left a comment
There was a problem hiding this comment.
Is it customary to include the full git tree in an sdist? I don't see why we now include so much more in there
A few miscellaneous points:
-
The Docs haven't been properly integrated into the new format. Every page appears in one flat list. The usual sections of "Tutorial" etc. are not sub-pages, they're just text, so are not working as categories. The "Section Navigation" header on each page is blank.
-
I'd argue that migrating the source files to a
srclayout should be a part of this PR. It will not create churn as the files themselves won't change, it'll just come up as a git move of the file.
There's probably also a few bits and pieces that we could bring more in line with the template in this PR, but we can start with these ones.
git mv softioc src/softioc, including the iocStats submodule, and point setup.py, pyproject.toml (package-dir, version_file, pytest, pyright, ruff) and .gitignore at the new paths. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz8Ac6k38PshyLY6N1C
Released wheels follow the [build-system] requires floor and need no edit; the uv pin only affects uv.lock and the dev environment. Say how to bump it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz8Ac6k38PshyLY6N1C
Later releases are documented in GitHub Releases with notes generated from PR titles, as in the python-copier-template. The README links there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz8Ac6k38PshyLY6N1C
The template's text plus our sections (submodule clone, tests, updating dependencies and the epicscorelibs pin, DLS release steps) in Markdown. The stale coverage paragraph and the CHANGELOG release step are dropped. The docs reference page includes it as the template does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz8Ac6k38PshyLY6N1C
docs/index.md and tutorials/how-to/explanations/reference section pages with glob toctrees replace index.rst, so the pydata theme shows the four sections in the top bar and each section's pages in the sidebar. Content pages stay .rst. The two-column CSS only index.rst used is removed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz8Ac6k38PshyLY6N1C
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uybqz8Ac6k38PshyLY6N1C
|
Thanks for the review! Taking the points in the review body in turn: sdist contents: setuptools_scm's file finder includes every git-tracked file in the sdist, and that's the same in every template project. It's what made the sdist grow from about 94 KB to 384 KB (tests, docs and the iocStats submodule). Having the tests in the sdist helps downstream packagers such as conda-forge, and the size is harmless. The wheel contents are unchanged from master apart from Docs navigation: fixed in 201df48 (and f71bbcc). The docs now use the template's src layout: done in b9de251, with I'll keep an eye out for other bits that could come into line with the template. |
|
There's still one major issue with the docs: the "index.md" does not render properly. I think the conversion has left an odd mix of RST and Markdown syntax in there. Probably due to the inclusion of the |
MyST's {include} directive ignores the :parser: option and parsed the
README as Markdown, so the rendered index page showed the RST source
(|ci| badges, the ==== table and .. code:: block) as plain text.
An eval-rst fence with a real docutils include parses it as RST, but
MyST parses that fence in a scratch document, so substitution
definitions in it never resolve and an RST title cannot nest the
Markdown headings that follow. So the README now uses plain image
directives for its badges (which render the same on GitHub and PyPI)
and index.md supplies the H1 itself, including the README from a
marker comment after its title.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uybqz3j1MXkGpuHVYNKjT5
|
Good spot, thanks. The cause was that MyST's Fixed in 53d46bb. The template assumes a Docs CI is currently red at the |
What and why
Adopts python-copier-template 5.5.0, generated with
copier copyso.copier-answers.ymlis present and futurecopier updateruns work.src/layout (git mv softioc src/softioc, including the iocStats submodule), so file history is kept and no source file changes.uv.lockreplacesPipfile/Pipfile.lock; metadata moves fromsetup.cfgtopyproject.toml[project].setup.pystill builds the setuptools_dso extension and setsinstall_requires(declared dynamic), so the epicscorelibs ABI pin fromabi_requires()is kept.[build-system] requiresfloor and need no edit. A[tool.uv] build-constraint-dependenciespin only affectsuv.lockand the dev environment: it keeps the lock stable when new epicscorelibs releases appear. To bump it, edit that one pin, then runuv lock --upgrade-package epicscorelibs. The comment inpyproject.tomland CONTRIBUTING both say this._version_git.py.ci.ymland reusable workflows, with a custom_dist.ymlthat keeps the cibuildwheel wheel build and test matrix (ubuntu/windows/macos-15-intel, cp311–cp314, now a single cibuildwheel v4.3.5).-W. They use the template'sdocs/index.mdand four section pages (Tutorials, How-to Guides, Explanations, Reference) with glob toctrees, so the top bar shows the sections and the sidebar's "Section Navigation" lists each section's pages. The existing content pages are unchanged.rst..github/CONTRIBUTING.md: the template's text plus our sections (clone with submodules, tests, updating dependencies and the epicscorelibs pin, DLS release steps). The docs Reference section includes it.CHANGELOG.rstis frozen at 4.7.2 and kept in the docs as history. Later releases use GitHub Releases with notes generated from PR titles, as in the template; the CHANGELOG release step is removed.pip-auditof the exported lock (all groups and extras) anduv auditreport no known vulnerabilities.Supersedes #213: certifi 2026.10.23 is in
uv.lock.Kept minimal on purpose (deviations from the template, to avoid churn)
README.rstkept (noREADME.md);docs/index.mdincludes its intro with the rst parser..rstcontent pages kept unrestructured. The section toctrees list pages explicitly where order matters (installation first, why-use-pythonSoftIOC first, API first, and the existing curated how-to order) before the glob, which picks up the rest and any future pages. The contributing page is atdocs/reference/contributing.md(the template usesdocs/how-to/contribute.md), and the Reference section also keeps the API page, the frozen changelog and the index.ruff format: no ruff-format pre-commit hook and VS Code format-on-save / organize-imports off.ruff checkpasses with no code changes: permanent ignoresN(public camelCase API) andF401/F403/F405(star re-exports, as under flake8); temporary ignoresI001/UP/SLF001/B/C4/E721tracked in Fix ruff lint findings deferred from copier template adoption #214.filterwarnings = "error", both tracked in Tighten pyright and pytest warning config deferred from copier template adoption #215.packages = ["softioc"]withpackage-dir = {"" = "src"}andinclude-package-data = false, so the wheel's file list is identical to master's (only_version_git.pybecomes_version.py)._dist.ymlkeeping the cibuildwheel matrix andCIBW_*settings; sdist checked withtwine check; test-sdist now actually uses each matrix Python.submodules: trueon every checkout (iocStats is needed to build).tests/graph.edlexcluded from the end-of-file-fixer hook.src/, the only changes insrc/softioc/andtests/are the_versionimport and the template'stests/test_cli.py.master;.github/pages/index.htmlstill redirects to master.For maintainers to confirm
component_owner: group:default/accelerator-controlsand lifecycleproduction(copied from aioca/epicsdbbuilder).releaseenvironment (auto-created with no protection; consider adding reviewers or moving to trusted publishing). It still uses thepypi_tokensecret, passed explicitly; if the secret is removed the action falls back to trusted publishing.uv export --frozen --no-dev --all-extras --no-hashes --no-emit-project > …/softioc-<release>.requirements.txtinstead of copyingPipfile.lock; please check this suits the internal process.uv lock --upgrade-package epicscorelibs; released wheels are unaffected by it.devextra is removed in favour of adevdependency group (uv sync); cibuildwheel tests useCIBW_TEST_GROUPS: dev.devextra is replaced by thedevdependency group, and Python 3.7–3.10 support is dropped.src/move:rm -rf softioc(the old untracked build products and the old iocStats checkout stay behind, and makeruff check .report errors), remove the old top-levelepicscorelibssymlink if present, thengit submodule update --initanduv sync --reinstall-package softioc(or use a fresh venv) so the editable install points atsrc/.license.file(and license classifier) trigger a setuptools deprecation warning: builds will break after 2027-02-18 unless the template fixes it. Not changed here.How tested
Locally on Linux:
uv lock --checkuv run ruff check .tox -e type-checking(pyright)tox -e docs(--fail-on-warning)pre-commit run --all-filestest_records,test_cli,test_asyncio,test_deviocstats; 662 warnings, not errors)uv build(sdist, and wheel built from it)uv export(all groups and extras) /uv audit_version_git.py→_version.py;_extension*.so,device.dbd,access.acfand the iocStatsiocAdmin/Dbfiles are present.pythonSoftIOC --versionworks and an asyncio IOC starts.uv lock --upgrade-package epicscorelibsupdates the build constraint and softioc's ABI pin inuv.lock, and restores it exactly.copier update --pretendreports "Keeping template version 5.5.0".Found in local review
src/move, a stale untracked top-levelsoftioc/in existing checkouts makesruff check .fail: the clean-up steps are in the maintainer notes above.softioc/instead ofsrc/softioc/, and gave the sdist size without saying it is CI's: fixed.uv.lockwould break on any new epicscorelibs release (dynamic metadata from the build env): build constraint added.Pipfile.lockhad been dropped: replaced with auv export.index.rst).uv exportfor the DLS release included the dev toolchain:--no-devadded.secrets: inheritnarrowed to an explicit optionalpypi_token.Found in maintainer review
src/layout, CONTRIBUTING location and CHANGELOG: now as in the template.Found in CI
test (ubuntu-latest, 3.14)job segfaulted in cothread (intests/test_record_values.py). The runner's system python is CPython 3.14.4; the crash reproduces locally with uv-managed 3.14.4, while 3.14.5, 3.14.6 and 3.14.7 pass the full suite._test.ymlnow setsUV_PYTHON_PREFERENCE: only-managedso the latest 3.14 patch release is tested. cothread is kept on 3.14 (the cibuildwheel cp314 wheel tests with cothread pass on all three OSes); users on CPython 3.14.4 specifically may hit this crash.Not in this PR
Do not merge until the maintainers have reviewed; merge commit.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Uybqz8Ac6k38PshyLY6N1C