Repository navigation
REL: Prepare 2.5.0 and move the development configuration into pyproject.toml - #508
Merged
Merged
Conversation
The compat module was removed in a41395c, but meson.build still called install_subdir('compat', ...). Meson then installed an empty randomgen/compat directory and warned that install_subdir with an empty directory is deprecated since 0.60.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ect.toml Version and minimums: - The release is 2.5.0, matching NumPy's latest release (2.5.4), not 2.6.0: rename the change-log heading, its note, the stream-changes label and the seven versionadded/versionchanged directives. - requires-python is >=3.10 (the 3.8 classifier is dropped, and "3 :: Only" added), and NumPy is >=1.26 (still !=2.4.0), the oldest NumPy that CI tests. The README and the change log say so, and the change log notes that there are no free-threaded 3.13 wheels. pyproject.toml: - PEP 735 dependency groups (build, test, lint, doc, dev) replace requirements.txt, requirements-dev.txt and doc/requirements.txt. CI installs them with "pip install --group". The stale test, doc and dev extras are removed. - pytest uses the native [tool.pytest] table of pytest 9, with strict = true, which is what the old "--strict" option means there. - black and ruff take their targets from requires-python. Targeting 3.10 makes ruff ask for PEP 604 unions in randomgen/typing.py, TypeAlias from typing in the stubs, and zip(strict=True). - The mypy settings for conftest and _version were INI-style tables that mypy ignores; they are now a [[tool.mypy.overrides]] entry. - Drop the empty [tool.meson-python.args] table and the obsolete [toml] extra of setuptools-scm, and add an issues URL. Other configuration files: - Remove .flake8 and the flake8 lint step. ruff runs pyflakes and the flake8-pyi rules, and black covers pycodestyle's whitespace checks. - Remove .pep8speaks.yml (the bot no longer comments) and codecov.yml (it only set Codecov's default branch, main). - .gitattributes drops entries for files that no longer exist and the export-subst for the untracked randomgen/_version.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
==========================================
- Coverage 94.81% 94.80% -0.01%
==========================================
Files 56 56
Lines 9923 9922 -1
Branches 214 214
==========================================
- Hits 9408 9407 -1
Misses 495 495
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Prepares the 2.5.0 release. It sets the version and minimum versions decided for the release, fixes a meson deprecation warning, and moves the development configuration into
pyproject.toml, deleting the config files it replaces.Version and minimums
stream-changes-2-5-0label and its reference;versionadded/versionchangeddirectives inpcg64.pyxandpcg32.pyx.requires-python = ">=3.10". It said>=3.8, but CI only tests 3.10 to 3.15, andrandomgen/typing.pyalready usedint | Sequence[int], which needs 3.10. The 3.8 classifier is dropped andPython :: 3 :: Onlyadded.>=1.26,!=2.4.0,<3, the oldest NumPy CI tests (Azurepython310_last_numpy_1uses 1.26.4). It said 1.22.3.Meson warning
The
compatmodule was removed in a41395c, butrandomgen/meson.buildstill hadinstall_subdir('compat', ...). Meson installed an emptyrandomgen/compatdirectory and warned:The line is removed.
pyproject.tomlPEP 735 dependency groups replace the three requirements files:
build: everythingpip install -e . --no-build-isolationneeds;testandlint;doc: what was indoc/requirements.txt;dev: build, test and lint, plus jinja2 and joblib fortools/.CI installs them with
python -m pip install --group ...(pip 25.1 or later): the docs workflow, the lint workflow and the Azure Windows template. The README explains how.The stale
test,docanddevextras are removed. Among other things they listed setuptools,oldest-supported-numpyandpytest<9.pytest uses pytest 9's native
[tool.pytest]table.strict = truereplacesaddopts = "--strict". In pytest 9,--strictsets exactly this option, which turns onstrict_config,strict_markers,strict_xfailandstrict_parametrization_ids. So CI is exactly as strict as before.minversionis now 9.0, and the test group needspytest>=9.black and ruff take their target versions from
requires-python, so the explicittarget-versionsettings are gone. With a 3.10 target, ruff reported five issues, now fixed:randomgen/typing.py;TypeAliasimported fromtypingindsfmt.pyiandwrapper.pyi;zip(..., strict=True)in one test.The mypy settings for
randomgen.conftestandrandomgen._versionwere INI-style[tool.mypy-...]tables, which mypy ignores inpyproject.toml. They are now an[[tool.mypy.overrides]]entry.Smaller changes:
[tool.meson-python.args]table;setuptools-scmno longer has the obsolete[toml]extra;issuesURL.Deleted config files
.flake8, together with the flake8 step in the lint workflow. ruff already runs pyflakes and the flake8-pyi rules (select = ["ALL", ...]), and black covers pycodestyle's whitespace checks..pep8speaks.yml: the bot hasn't commented on any of the last 100 issue and PR comments.codecov.yml: it only setbranch: main, which is Codecov's default for this repository.requirements.txt,requirements-dev.txtanddoc/requirements.txt, now dependency groups..gitattributes:export-ignoreentries for files that no longer exist (.cirrus.yml,.pep8speaks.yml,codecov.yml) are removed;export-substonrandomgen/_version.py, which isn't tracked, so the attribute did nothing.Kept because they can't move into
pyproject.toml:meson.optionsand the meson build files;.gitattributes,.gitignoreand the CI files;doc/Makefile;randomgen/conftest.py, which registers the markers and options for tests run on the installed package, where there is nopyproject.toml;randomgen/examples/cython/setup.py.Commits: the deletions of the replaced config files landed in the first commit (
BLD: Stop installing the removed compat directory), because they were already staged. The rest of the configuration change is in the second commit.Checked (WSL, Python 3.12)
install_subdirwarning.randomgen/compatentries. Its metadata has:Requires-Python: >=3.10;Requires-Dist: numpy!=2.4.0,<3,>=1.26;3 :: Only;Provides-Extra.[tool.pytest]configuration (pytest -c pyproject.toml, pytest 9.2.0): 8754 passed, 158 skipped.--group lint,--group devand--group dev --group docall resolve: 30, 52 and 105 packages, including black 26.10.1, pytest 9.2.0 and NumPy 2.5.4.ipythondirective in the 2.3.0 notes, which needs Sphinx.Heads-up
zipp,pygments,requests) were in the requirements files and are now in the dependency groups. Snyk may not read dependency groups, so its projects for the deleted files may need re-importing.pip install randomgen[test]now gets a warning that the extra doesn't exist.🤖 Generated with Claude Code