Consolidate package metadata from setup.py/setup.cfg into pyproject.toml#379
Consolidate package metadata from setup.py/setup.cfg into pyproject.toml#379yarikoptic merged 2 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #379 +/- ##
=======================================
Coverage 97.91% 97.91%
=======================================
Files 18 18
Lines 2401 2401
=======================================
Hits 2351 2351
Misses 50 50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Modernizes the project’s packaging and tooling configuration by moving metadata and tool settings into pyproject.toml (PEP 621), removing legacy setuptools config files, and adjusting lint tooling to match the new layout.
Changes:
- Migrates package metadata/dependencies from
setup.cfg/setup.pyintopyproject.toml[project]+ tool tables. - Moves flake8 configuration into a dedicated
.flake8file and updatestox.inilint commands accordingly. - Minor test refactor to use parenthesized multi-context
withsyntax.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Removes stale setup.py references and relies on .flake8 auto-discovery for flake8. |
| setup.py | Deleted legacy setuptools entrypoint. |
| setup.cfg | Deleted legacy metadata + tool configuration (flake8/mypy). |
| pyproject.toml | Adds PEP 621 [project] metadata and moves mypy/pydantic-mypy config under [tool.*]. |
| dandischema/tests/test_metadata.py | Refactors patching to parenthesized multi-context with form. |
| .flake8 | New flake8 configuration file replacing the former setup.cfg section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Migrate all metadata, dependencies, and tool configuration into pyproject.toml using the modern PEP 517/518/621 [project] table, eliminating setup.py and setup.cfg. Flake8 config moves to a dedicated .flake8 file since flake8 does not natively support pyproject.toml. Also removes the stale setup.py references from tox.ini's lint env. Notable changes: - setuptools requirement bumped to >=61.0.0 for native [project] table support - wheel removed from build-system.requires (handled automatically by pip) - license field uses SPDX expression (Apache-2.0) per PEP 639; redundant License classifier removed - [all] extra uses self-referential syntax dandischema[style,test] - mypy exclude anchored to ^dandischema/_version\.py$ to match the actual path written by versioningit - pydantic-mypy warn_untypes_fields dropped (was a typo, silently ignored) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
823bdec to
374f24d
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
pyproject.tomlusing the modern PEP 517/518/621[project]table, eliminatingsetup.pyandsetup.cfg.flake8file (flake8 does not natively supportpyproject.toml)setup.pyreferences fromtox.ini's lint envNotable changes
setuptoolsrequirement bumped to>=61.0.0for native[project]table supportwheelremoved frombuild-system.requires(handled automatically by pip)licensefield uses SPDX expression (Apache-2.0) per PEP 639; redundantLicense ::classifier removed[all]extra uses self-referential syntaxdandischema[style,test]mypyexcludeanchored to^dandischema/_version\.py$to match the actual path written by versioningitpydantic-mypywarn_untypes_fieldsdropped (was a typo, silently ignored)Test plan
pip install -e ".[all]"installs successfullypython -c "import dandischema; print(dandischema.__version__)"returns correct versiontox -e lintpasses (flake8 auto-discovers.flake8)tox -e typingpasses (mypy: no issues)tox -e py3passes (267 passed, 17 skipped)python -m build --sdistbuilds cleanly🤖 Generated with Claude Code