Skip to content

Consolidate package metadata from setup.py/setup.cfg into pyproject.toml#379

Merged
yarikoptic merged 2 commits intomasterfrom
consolidate-pyproject-toml
Mar 10, 2026
Merged

Consolidate package metadata from setup.py/setup.cfg into pyproject.toml#379
yarikoptic merged 2 commits intomasterfrom
consolidate-pyproject-toml

Conversation

@candleindark
Copy link
Member

@candleindark candleindark commented Mar 10, 2026

Summary

  • Migrate all package metadata, dependencies, and tool configuration into pyproject.toml using the modern PEP 517/518/621 [project] table, eliminating setup.py and setup.cfg
  • Move flake8 config to a dedicated .flake8 file (flake8 does not natively support pyproject.toml)
  • Remove 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)

Test plan

  • pip install -e ".[all]" installs successfully
  • python -c "import dandischema; print(dandischema.__version__)" returns correct version
  • tox -e lint passes (flake8 auto-discovers .flake8)
  • tox -e typing passes (mypy: no issues)
  • tox -e py3 passes (267 passed, 17 skipped)
  • python -m build --sdist builds cleanly

🤖 Generated with Claude Code

@candleindark candleindark added the internal Changes only affect the internal API label Mar 10, 2026
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.91%. Comparing base (e3ea45b) to head (828d3a8).
⚠️ Report is 5 commits behind head on master.

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           
Flag Coverage Δ
unittests 97.91% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@candleindark candleindark removed the internal Changes only affect the internal API label Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py into pyproject.toml [project] + tool tables.
  • Moves flake8 configuration into a dedicated .flake8 file and updates tox.ini lint commands accordingly.
  • Minor test refactor to use parenthesized multi-context with syntax.

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>
@candleindark candleindark force-pushed the consolidate-pyproject-toml branch from 823bdec to 374f24d Compare March 10, 2026 16:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@yarikoptic yarikoptic added the internal Changes only affect the internal API label Mar 10, 2026
@yarikoptic yarikoptic merged commit 3725ccc into master Mar 10, 2026
89 checks passed
@yarikoptic yarikoptic deleted the consolidate-pyproject-toml branch March 10, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes only affect the internal API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants