Skip to content

Conversation

@yarikoptic
Copy link
Member

Migrate all package metadata from setup.cfg to pyproject.toml following modern Python packaging standards (PEP 517/518/621).

Changes:

pyproject.toml:

  • Add complete [project] section with all package metadata
    • Package name, description, readme, license
    • Authors and maintainers information
    • Python version requirement (>=3.9)
    • All dependencies (runtime requirements)
    • All optional-dependencies (extensions, extras, style, test, tools, all)
    • Entry points for CLI and pytest plugin
    • Project URLs (Homepage, Source Code, Documentation)
  • Add [tool.setuptools] configuration for package discovery
  • Consolidate tool configurations:
    • [tool.versioneer] for version management
    • [tool.flake8] for linting
    • [tool.codespell] for spell checking (fixed regex escaping, excluded pyproject.toml)
    • [tool.mypy] with grouped module overrides per mypy documentation
    • [tool.pydantic-mypy] for pydantic plugin
  • Preserve existing [tool.black] and [tool.isort] configurations

setup.cfg:

  • Reduce to minimal configuration
  • Keep only [flake8] section (doesn't support pyproject.toml)
  • Keep [versioneer] section (versioneer checks both files)
  • Remove all [metadata], [options], and mypy sections

.pre-commit-config.yaml:

  • Exclude pyproject.toml from codespell checks (it contains codespell config comments that would trigger false positives)

setup.py:

  • No changes (still required for versioneer integration)

Verification:

  • Build succeeds with python -m build
  • Package metadata correctly preserved in wheel
  • All dependencies and entry points maintained
  • Versioneer continues to work properly

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Conflicts:
setup.cfg -- master meanwhile boosted min version of dandischema to 0.11.1 - I did the same

Migrate all package metadata from setup.cfg to pyproject.toml following
modern Python packaging standards (PEP 517/518/621).

Changes:

pyproject.toml:
- Add complete [project] section with all package metadata
  - Package name, description, readme, license
  - Authors and maintainers information
  - Python version requirement (>=3.9)
  - All dependencies (runtime requirements)
  - All optional-dependencies (extensions, extras, style, test, tools, all)
  - Entry points for CLI and pytest plugin
  - Project URLs (Homepage, Source Code, Documentation)
- Add [tool.setuptools] configuration for package discovery
- Consolidate tool configurations:
  - [tool.versioneer] for version management
  - [tool.flake8] for linting
  - [tool.codespell] for spell checking (fixed regex escaping, excluded pyproject.toml)
  - [tool.mypy] with grouped module overrides per mypy documentation
  - [tool.pydantic-mypy] for pydantic plugin
- Preserve existing [tool.black] and [tool.isort] configurations

setup.cfg:
- Reduce to minimal configuration
- Keep only [flake8] section (doesn't support pyproject.toml)
- Keep [versioneer] section (versioneer checks both files)
- Remove all [metadata], [options], and mypy sections

.pre-commit-config.yaml:
- Exclude pyproject.toml from codespell checks
  (it contains codespell config comments that would trigger false positives)

setup.py:
- No changes (still required for versioneer integration)

Verification:
- Build succeeds with python -m build
- Package metadata correctly preserved in wheel
- All dependencies and entry points maintained
- Versioneer continues to work properly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

 Conflicts:
	setup.cfg -- master meanwhile boosted min version of dandischema to 0.11.1 - I did the same
@yarikoptic yarikoptic added the internal Changes only affect the internal API label Oct 14, 2025
@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.09%. Comparing base (708f29d) to head (8d363f3).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1726   +/-   ##
=======================================
  Coverage   75.09%   75.09%           
=======================================
  Files          84       84           
  Lines       11856    11856           
=======================================
  Hits         8903     8903           
  Misses       2953     2953           
Flag Coverage Δ
unittests 75.09% <ø> (ø)

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.

…os automagically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
Since no whl"s built any longer
@yarikoptic
Copy link
Member Author

as if I were to add similar workaround for h5py on mac to master I would need to deal with conflicts again. Speedy review would be appreciated, adding more eyes.

@yarikoptic
Copy link
Member Author

FTR, we do install recent h5py on arm osx:

Collecting h5py (from dandi==0.73.0+6.ge989a80d)
  Downloading h5py-3.15.0-cp313-cp313-macosx_14_0_arm64.whl.metadata (3.0 kB)

yarikoptic and others added 2 commits October 14, 2025 13:58
Copy link
Contributor

@CodyCBakerPhD CodyCBakerPhD left a comment

Choose a reason for hiding this comment

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

LGTM - see what tests say

@yarikoptic
Copy link
Member Author

any feedback @candleindark @asmacdo ? I will meanwhile proceed with merging (not yet releasing) but feel welcome to comment or better send a follow up PR if you see smth critical to fix up

@yarikoptic yarikoptic merged commit a79fffc into master Oct 15, 2025
46 checks passed
@yarikoptic yarikoptic deleted the rf-project branch October 15, 2025 14:04
@candleindark
Copy link
Member

any feedback @candleindark @asmacdo ? I will meanwhile proceed with merging (not yet releasing) but feel welcome to comment or better send a follow up PR if you see smth critical to fix up

I think that some of the optional-dependencies can be redefined as dependency-groups as what has been done in nwb2bids, https://github.com/con/nwb2bids/blob/f7f54966f350e3c71622d1c4257e8d2c709d6b5c/pyproject.toml#L119. That however is more appropriate for another PR.

@asmacdo
Copy link
Member

asmacdo commented Oct 15, 2025

dependency groups only works for pip 25.1+ so yes but we should probably wait for that to become more standard.

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

🚀 PR was released in 0.73.1 🚀

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 released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants