# M41. A first version: 0.1.0 **Packages:** B2, B3 and B4: packages for every platform, a look at the Python interface as a whole, and version 0.1.0. The owner asked for a first version to be published (2026-11-19). ## What was built - **Packages for five platforms.** `.github/workflows/release.yml` builds one package each for Linux on x86-64 and on ARM, for macOS on Apple silicon and on Intel, and for Windows on x86-64. Each is built against the stable interface of Python, so that one package serves Python 3.11 and every later version. The workflow installs each package into a fresh environment, with nothing of the repository on the path, and runs the Python tests against it. The package for Linux on ARM is built on an x86-64 machine and is not tested. - **Publication from a tag.** A tag `v` runs the same builds and tests and then publishes to PyPI. PyPI trusts the workflow in the environment `pypi`, so no password and no token is stored, and the owner approves that environment before anything is published. A tag that does not match the version of the packages is refused, and so is anything that is not a binary package. - **Version 0.1.0** in the manifests. - **The terms of use**, in `LICENSE`: versions 0.1.x may be installed and used free of charge for any purpose, and may not be passed on, changed or taken apart. - **The licenses of what is built in.** `scripts/third-party-licenses.py` reads from `cargo metadata` every crate that ends up in the compiled library, 106 today, and writes their license texts to `THIRD-PARTY-LICENSES.txt`, which goes into every package beside `LICENSE`. `scripts/lint.sh` fails when the file is not current, so a new dependency cannot be forgotten. - **A page of changes** for users, `docs/changes.md`: what a version number promises, and what version 0.1.0 holds. - **The texts that a visitor sees first.** The README is the page of the package on PyPI. It says how to install, where the project stands and under which terms, and it links to the website with full addresses. The guide installs with `pip`. - **A section "A release"** in the workflow: how a version is cut, and the two settings that only the owner can make. ## What was checked - A package built here was installed into a fresh environment and passed all 274 Python tests there, in 73 s. - The package holds the frontend, the compiled core, `py.typed`, the two license files, and the list of the crates that were built in, which maturin writes. It holds no tests and no Rust source. - The name `pdemagic` is free on PyPI (2026-11-19). - On the pull request of this milestone the workflow built all five packages. The Python tests passed against the installed package on Linux x86-64, on macOS with both kinds of processor, and on Windows. A platform takes 5 to 11 minutes, the Intel Mac the longest. ## The review of the interface (B3) Everything that `pdemagic`, `pdemagic.curves` and `pdemagic.shapes` export was read as a whole, with its signatures: 26 names, 6 curves and 6 shapes. Nothing was changed. What was found, and why it stays for now: - **One name for two things.** `pdemagic.Box` and `pdemagic.Cylinder` are domains with coordinates. `pdemagic.shapes.Box` and `pdemagic.shapes.Cylinder` are bodies in space. The modules keep them apart, and both uses read naturally where they stand. - **`radius` and `radii`.** `curves.Arc` takes `radius`, a number or a pair for an arc of an ellipse, and `curves.Ellipse` takes `radii`. - **`Solution` and `BodyResult` can be constructed by anyone**, although only `pm.solve` makes them. Their constructors are not part of what is promised: the page of changes says that the interface is what the reference lists, and the reference describes them as results. - **A problem is written as JSON and not read back.** `Problem.to_json` is what the core receives. A plan is written and read. They are package B5, for the owner, before a version 1.0. A version 0.x may still change them (decision D41.4). ## Decisions ### D41.1. Published on PyPI, as binaries only *Owner, 2026-11-19.* pdemagic is published on PyPI, where anyone can install it. Only compiled packages are published. There is no package of the source, and the repository stays private. Consequences, by the developer: - A platform without a package cannot install pdemagic at all. The page of known limits names them. - The Python frontend is part of every package as it is written: Python files that whoever installs it can read. Only the core is compiled. `LICENSE` says that reading them gives no right beyond its terms. - The crates are not published: `publish = false` stays. ### D41.2. Free to try, for the versions 0.1.x *Owner, 2026-11-19.* For now pdemagic is free to try: anyone may install it and use it free of charge, also commercially. Nobody may pass it on or change it, and the owner keeps all rights. Later versions may come with restrictions. The text of `LICENSE` is the developer's wording of this, and not the work of a lawyer. It names the versions it holds for, 0.1.x, so that a later version can come under other terms without a word of it changing for those who have 0.1. Only the owner changes that file. This narrows decision D39.1 for the published packages: its first point, that whoever uses pdemagic is given permission in writing, is now this license. ### D41.3. Linux, macOS and Windows, and Python from 3.11 *Owner (the platforms), developer (the rest), 2026-11-19.* - Packages for Linux with glibc on x86-64 and ARM, for macOS on Apple silicon and Intel, and for Windows on x86-64. - One package for each platform, built against the stable interface of Python 3.11 (`abi3`): it serves every later version of Python without a new build. The cost is none that the benchmarks show: the binding is entered once for each solve. - A package is tested before it is published wherever its platform can run it in the workflow. Linux on ARM cannot today (B6). ### D41.4. Version 0.1.0, and what a version number promises *Owner (0.1.0), developer (the policy), 2026-11-19.* - Before 1.0, the interface may change from one middle number to the next. Every such change is listed on the page of changes, with what to write instead. - A new last number changes no interface, and reads the plans that the versions before it wrote. - The interface is what the reference lists. Names with an underscore and `pdemagic._core` are not part of it. - The version is written in one place, the `Cargo.toml` at the root. The packages, the module and the website take it from there. ### D41.5. The figures of the README are published with the website *Developer, 2026-11-19.* The page of a package on PyPI shows the README, and can show a figure only from a public address. The repository is private, so the figures in `docs/_static/readme` are now copied into the website, and the README names them there, as it names every page of the documentation with its full address. The website must therefore be current before a version is published. ### D41.6. The interface goes out as it is *Developer, 2026-11-19.* The review found nothing that a user would trip over, and four points of taste (above). Changing names on the day of a first version, with no user who asked for it, would spend the tests and the documentation of 41 milestones on a guess. Version 0.x leaves room to change them when users say what reads wrong. They are recorded as B5. ### D41.7. A version is published by a tag, and only with the owner's word *Developer, 2026-11-19.* What is on PyPI cannot be replaced, only withdrawn. So a version is published by one act that is easy to see, the tag `v` on `main`, and by nothing else, and the workflow then waits for the owner's approval in the environment `pypi`. A session pushes the tag only when the owner has said so for that version. The session conventions say the same. ## The publication The owner gave the word for 0.1.0 and created the tag `v0.1.0` on 2026-11-19: the session could not push it, since its access to the repository does not include tags. The run built and tested the five packages again. The upload was refused at first, because the trusted publisher on PyPI was entered for another project, and went through when the failed job was run again with the right entry. A package installed from PyPI into a fresh environment solved a Poisson problem. ## What is left - **Tests of the package for Linux on ARM** (B6), and packages for musl and for Windows on ARM (B7). - **The terms of the versions after 0.1.x**, which the owner left open.