Repository navigation
Release a package only for a change that counts, leaving out documentation, tests, examples and manifest metadata - #60
Merged
Conversation
…ation, tests, examples and manifest metadata
…as common-ci's shared step does
A package's tox.ini sets up its test environments and is not part of what is published, so a change to it alone no longer releases the package. Each package with a tox.ini ignores it in packages.json, and the tests cover the real package list.
This was referenced Nov 13, 2026
jwrosewell
marked this pull request as ready for review
November 13, 2026 22:29
jwrosewell
added a commit
that referenced
this pull request
Nov 14, 2026
The scripts in `ci/` decide what a pull request builds and what a publish releases, and each has Pester tests beside it. `rc` holds five such files, being `ci/packages.Tests.ps1`, `ci/dispatch.Tests.ps1`, `ci/check-environment-variable-names.Tests.ps1`, `ci/get-next-package-version.Tests.ps1` from [#54](#54) and `ci/select-options.Tests.ps1` from [#33](#33). Only the environment variable name tests ran in a workflow. The rest ran only by hand or on a temporary branch, as [#47](#47), [#54](#54) and [#60](#60) each say under what remains, so a change to the release plan or the dispatcher could break them unseen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For the release rule of common-ci#306, in this repository, alongside common-ci#310.
The problem
James decided on 7 November that a package is not released when the only changes under its folders since its last tag are to documentation, tests, examples or manifest metadata such as links. The release plan here,
Get-ReleasePlaninci/packages.ps1, releases a package whengit diff --quiet <package>/<version> HEADreports any change under itsPathorExtraPaths, so a README, a test or an example releases the package and every package that depends on it.ci/get-next-package-version.ps1,ci/package-update-required.ps1,ci/build-package.ps1,ci/publish-package.ps1andci/write-package-versions.ps1all take what they release from that one plan.This repository does not use common-ci's shared
steps/release-plan.ps1yet. #47 switches to it. When this draft was written, common-ci#307 and common-ci#310 had not reached common-ci'smain, which the workflows here use, and both have since, in common-ci's release of 12 November. So the rule is made to work in this repository's own copy, with the same fields, defaults and filter as the shared step has from common-ci#310, so that nothing changes in behaviour when #47 lands.The change
ci/packages.ps1takes the code of common-ci#310 at 7eb3d89 as it is, being$ReleasePlanDefaultIgnore,Get-PackageExcludes,Get-ChangedFilesandSelect-CountedFiles, andGet-ReleasePlannow counts the files those leave.ci/packages.jsonmay haveIgnore, globs from the repository root whose changes do not count, andIgnoreDefaults, true when absent. No entry sets either yet.**/*.md,**/docs/**,**/tests/**,**/test/**,**/examples/**and**/LICENSE*, passed to git as:(exclude,glob,icase)pathspecs, and theIgnoreglobs as:(exclude,glob).changed since 4.5.38 (1 file)or(3 files).git diff --quietexiting with anything but 1 was read as no change before.IgnoreDefaultsgiven as anything but a JSON true or false stops the plan, and so does a path the filter returns that it was not given.PathorExtraPaths, such aspipeline/owid-pythonforfiftyone_pipeline_did, changes as one path, so any move of it counts.ci/release-plan-filter.ps1is the hook both plans call, with-RepoPath,-Package,-Fromand-Files. Files other than apyproject.toml,setup.pyorsetup.cfgall count. Those three go toci/release-plan-filter.py, which compares each file at the tag and at HEAD with the metadata left out, and the file counts when anything else differs.setup.pydescription,long_description,long_description_content_type,keywords,url,project_urls,download_url,classifiers,author,author_email,maintainerandmaintainer_emailarguments of everysetup()call. The rest is compared as a Python syntax tree, so comments and layout do not count either.setup.cfg[metadata]. Every other section and option is compared.pyproject.tomldescription,keywords,urls,classifiers,readme,authorsandmaintainersin[project], and the[project.urls],[project.authors],[project.maintainers]and[project.readme]tables. Blank lines and comments do not count.A file that is missing at the tag or at HEAD, or that cannot be read, counts, so a doubt always releases. The TOML is read line by line, following tables, keys, bracketed values and triple-quoted strings, rather than with
tomllib, because Python 3.10 has notomlliband every job of a publish must work out the same plan whatever Python it has. For the same reason the filter stops with an error when it finds no Python rather than counting every file. The publish's Configure, Build and Package jobs run onubuntu-latest, whose own Python the build step already calls aspython, and the other jobs install one.AGENTS.mdsays what counts.How to verify
The tests are new
Itblocks inci/packages.Tests.ps1, which build a throwaway repository with tags, as the file's other release plan tests do, and copy the real filter into it.Red is
rcat 0507eef with the new tests and the two filter files added andci/packages.ps1unchanged (run 42395975607). Green is this branch at 0713add (run 42399992499). Both ran Pester 5 onubuntu-latestwith its own Python (/usr/bin/python, 3.12.3, as the publish's Configure job has), on Windows with Python 3.10 and on macOS with Python 3.14.Tests Passed: 39, Failed: 10, being the new tests of what does not count.releases for a setup.cfg change to its optionsandreleases for a manifest it cannot read, passed onrcas well, becausercreleases for any change.Tests Passed: 50, Failed: 0. Two commits since then decode a manifest inside the guarded comparison, so one that is not UTF-8 counts rather than stopping the plan, and test that. On those (d3ce8df) Ubuntu and Windows gaveTests Passed: 51, Failed: 0(run 42403623093).ci/packages.Tests.ps1with itssteps/release-plan.ps1loaded afterci/packages.ps1, so the shared step's functions replaced this repository's ones and called this branch's filter.Tests Passed: 50, Failed: 0.rc'sci/packages.ps1, from this branch's and from the shared step with this branch's filter. The last two were the same, as the job checks. All three release the same 15 packages at the same versions, becausefiftyone_pipeline_coreandfiftyone_pipeline_engines_fiftyonechanged in their code and most packages depend on them. The difference is in the reasons.fiftyone_ipintelligencewas "changed since 4.5.3" underrc's rule, for an example alone, and is now "a package it depends on is released". Five packages changed only in theirtox.ini, which no longer counts (see the tox.ini section below).Change to
tox.iniof 9 NovemberJames Rosewell decided that a change to
tox.inialone must not release a package. Commit 3668b67 and the commit before it add"Ignore": ["**/tox.ini"]to all 19 entries inci/packages.json. Fifteen of those packages have atox.inibeside them today. The other four (fiftyone_pipeline_examples,fiftyone_devicedetection_shared,fiftyone_devicedetection,fiftyone_ipintelligence) have none, and they carry the entry as well so that atox.iniadded later releases nothing. Thetox.iniunderpipeline/fiftyone_pipeline_cloudrequestengine/exampleswas already ignored by theexamplesdefault.Three new tests in
ci/packages.Tests.ps1read the realci/packages.json. One changes thetox.iniof every package and expects an empty plan, one changes the source andtox.inioffiftyone_pipeline_coreand expects that package released for the one source file, and one checks every entry carries the ignore.tox.ini-only change released 16 packages.tox.iniand the scratch history gave the other four one. That is why all 19 entries carry the ignore.ci/packages.json, tagged every published package at 4.5.1 and printed the plan. A commit changing only every package'stox.inireleased 0 packages. A commit changingfiftyone_pipeline_coresource and itstox.inireleased 15 packages,fiftyone_pipeline_corefor 1 file and the rest as dependents.tox.inishould count, is decided and has been removed.Maintainers, 13 November
The earlier version of this body asked James whether the
maintainerfields should be left out as the authors are. The rule of 7 November leaves out manifest metadata such as links and names no fields. I readmaintainerandmaintainer_emailinsetup.pyandsetup.cfg, andmaintainersinpyproject.toml, as manifest metadata of the same kind as the authors, which the filter already left out, because they name people to contact and change nothing that is installed. The pyproject.toml specification describes the two keys in one section,authors/maintainers, and says "The "maintainers" key is similar to "authors" in that its exact meaning is open to interpretation." Soci/release-plan-filter.pyleaves them out too.licenseandpython_requiresstill count, because they change the terms a package is published under and the Pythons that can install it, which is more than metadata. No package here sets amaintainertoday.Four new cases of one test,
does not release for a change only to the maintainers in <Case>, add the maintainers to asetup.py, asetup.cfg, apyproject.tomlkey and a[[project.maintainers]]table, and expect no release.ubuntu-latestandwindows-latest,Tests Passed: 151, Failed: 4, being the four new cases.Tests Passed: 155, Failed: 0. Both runs are temporary branches holding a workflow that runs everyci/*.Tests.ps1with Pester and then prints the release plan of the branch against the real tags. The plan was empty, sorcwith this draft releases nothing, asrcholds only CI and documentation changes since the release of 13 November.The head
Head ec8b2fdd is the earlier head 3668b67 with
rcat df0949d7 merged in, then the maintainers test and the change above at 766fe11, then a commit that adds the maintainers to the list of fields in the comment ofci/release-plan-filter.ps1and changes no code.rcchanged none ofci/packages.ps1,ci/packages.jsonorci/get-next-package-version.ps1since this draft's base 0507eef, so the red and green runs above for the earlier commits still hold for that code.This draft changes only CI scripts, their tests and AGENTS.md, with no package code. James Rosewell decided at about 11:35 UTC on 12 November, for such a change, "rebuild and include, but the change doesn't impact the code so no need to run the full builds." So it has no full build. A full build was started on the earlier head 3668b67 as run 42694898479 and ended cancelled, its five macOS jobs having started and been cancelled, so it is not evidence for this draft. Its quick checks passed on this head, being run 43489897620 (environment variable names), run 43489898225 (only rc into main) and run 43489897522 (link campaign tags).
The AGENTS.md paragraph this draft changes no longer joins clauses with a semicolon or a colon.
What remains
steps/release-plan.ps1, which has had this rule since common-ci#310 reached common-ci'smainin common-ci's release of 12 November. Use common-ci's release plan in place of this repository's copy #47 holds this draft and merges after it.ci/release-plan-filter.ps1andci/release-plan-filter.pystay as they are.ci/packages.Tests.ps1, as Use common-ci's release plan in place of this repository's copy #47 also notes. These tests ran in the temporary workflows above.The last release into
mainwas #114, merged at 06:22 UTC on 13 November.