Repository navigation
Prepare the 1.0.0b1 release - #9
Merged
Merged
Conversation
The endpoint fixture still put its AF_UNIX sockets under pytest's tmp_path_factory, which the end-to-end tests stopped doing for the same reason. On a Mac the per-user temporary directory is 57 bytes once resolved, and with pytest's two levels and the fixture's own a socket measures 104 bytes as soon as pytest's run counter reaches three digits: one too many for a sun_path of 104, counting the terminator. Every unix case in test_ipc.py then failed with "AF_UNIX path too long" -- on a developer's machine, not on CI, whose runners had not counted that high. The directory is now made under /tmp and removed afterwards, as short_tmp_path does in tests/e2e/conftest.py.
GitHub Pages serves it there, because the organisation's Pages site has pybricks.com as its custom domain, and pybricks.github.io/pybricks-tools only redirects to it. site_url gives the canonical links and the sitemap, so they pointed every search engine at the redirect. The packages' documentation URLs moved with it. Those matter more: they are uploaded with each release, and a release on PyPI can never have its metadata changed afterwards.
Nothing said that EV3 and NXT hubs can be reached at all. pb-service's changelog last changed with the simulated serial port, and the RFCOMM transport, the macOS permission dialog, the reported port that will not open and the hub protocol's v1.6.0 and v1.7.0 all landed after it, along with --transport rfcomm in the CLI and watching_adapters() in the client. The repository's own changelog also said CI runs Python 3.11 to 3.13, and it has run 3.14 as well since 3.14 was added to the matrix.
The first release is the 1.0.0b1 that protocol.py was written to expect, rather than the 0.1.0 the packages said. - All four packages are 1.0.0b1, in pyproject.toml and in __version__, with "Development Status :: 4 - Beta". - They require one another at >=1.0.0b1. Unbounded until now, which once they are released independently would have let pybricks-cli be installed beside a pybricks-core from before anything it calls existed. The bound names the beta itself, because a beta sorts below the release it leads to: >=1.0.0 would refuse 1.0.0b1. A lower bound only: no library requirement here gets an upper one. - The status notes say beta, and that commands and APIs may still change before 1.0.0, in place of "early development, nothing is stable". MIN_PROTOCOL_VERSION goes on following PROTOCOL_VERSION, as its docstring already says it does through the betas.
The packages are released independently, so a tag names one of them: pybricks-core-v1.0.0 publishes pybricks-core 1.0.0 and nothing else. Before anything is built the tag is checked against the package's own version and against its changelog, which must have a section for that version. A version on PyPI can never be uploaded again, so a tag pushed in error and caught after the upload is a version number lost for good. The upload uses PyPI's trusted publishing, so no token is stored anywhere, and runs in a "pypi" environment that the publisher on PyPI names. It goes through uv publish rather than pypa's action, so it needs no action beyond the setup-uv this repository already pins and Dependabot already moves.
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.
Gets the four packages ready to publish to PyPI as 1.0.0b1, the first release. They are not published by this PR: the release workflow added here runs only when a tag is pushed.
Five commits:
endpointfixture inpackages/pb-core/tests/conftest.pystill made AF_UNIX sockets under pytest'stmp_path_factory. On a Mac those paths reach 104 bytes once pytest's run counter has three digits, one byte more thansun_pathholds. Every unix case intest_ipc.pythen failed locally, though not on CI. Sockets now go under/tmp, as the end-to-end tests'short_tmp_pathalready does.pybricks.github.io/pybricks-toolsonly redirects there.site_urland every package'sdocumentationURL now use it. A release's metadata can't be changed on PyPI after upload, so this has to be right before the first one.--transport rfcommorwatching_adapters(). The top-level changelog now says CI covers Python 3.11 to 3.14.pyproject.tomland__version__, plus theDevelopment Status :: 4 - Betaclassifier.>=1.0.0b1, with no upper bound. Until now there was no bound at all. The bound names the beta itself, because a beta sorts below its release:>=1.0.0would refuse1.0.0b1.MIN_PROTOCOL_VERSIONkeeps followingPROTOCOL_VERSIONthrough the betas, as its docstring already says..github/workflows/release.yml. One package per tag; for example,pybricks-core-v1.0.0b1publishespybricks-core1.0.0b1. Before building, it refuses a tag that doesn't match the package's version or whoseCHANGELOG.mdhas no[1.0.0b1]section. It uploads withuv publishthrough PyPI trusted publishing, in thepypienvironment.Checked locally on macOS:
test_ipc.pywith the default temp directory.twine check --strict.uv pip install pybricks-cliandpip install pybricks-cliinstall all four without--pre, andpb --versionreports1.0.0b1.The release workflow has not run yet. Before the first tag:
pypienvironment in this repository's settings.[Unreleased]to a dated[1.0.0b1]heading.pybricks-core,pybricks-client,pybricks-serviceandpybricks-cli, in that order:pybricks, repositorypybricks-tools, workflowrelease.yml, environmentpypi.pybricks-core-v1.0.0b1.