Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

Consolidates all packaging configuration from legacy files (setup.py, pytest.ini, tox.ini, .bumpversion.cfg) into pyproject.toml following PEP 517/518.

What does this PR do?

This PR modernizes the packaging configuration by migrating all settings from legacy configuration files to a single pyproject.toml file, following modern Python packaging standards (PEP 517/518). The branch has been rebased on main to maintain a clean commit history and resolve conflicts with recent dependency and configuration updates.

Configuration Migration

  • Build system: Migrated package metadata, dependencies, optional extras, and entry points from setup.py to [project] section
  • Testing: Moved pytest configuration to [tool.pytest.ini_options]
  • Tox: Migrated all test environments to [tool.tox] with legacy_tox_ini format
  • Versioning: Moved bumpversion config to [tool.bumpversion]

Build Process

  • Updated tox dist environment to use python -m build instead of deprecated setup.py sdist bdist_wheel
  • Removed dependency on setup.py for package building

Documentation

  • Updated docs/extending-entry-points.rst with pyproject.toml examples for custom I/O handlers and engines
  • Updated DEVELOPMENT_GUIDE.md release instructions to use modern build tools

Cleanup

  • Removed all legacy configuration files (setup.py, pytest.ini, tox.ini, .bumpversion.cfg)
  • Updated MANIFEST.in to exclude removed files

Dependency Updates (aligned with main branch)

  • Removed ansicolors dependency (aligned with removal of colors import in codebase)
  • Added pyarrow>=2.0 (hdfs) and PyGithub>=1.55 (github) to dev and test optional dependencies
  • Updated ruff configuration to use new format (lint.select, lint.ignore)
  • Updated black and ruff target versions to py310

Git History

  • Branch rebased on main for clean commit history (instead of merge commit)
  • All pre-commit checks pass

Example

Entry points are now declared in pyproject.toml:

[project.entry-points."papermill.io"]
"sftp://" = "papermill_sftp:SFTPHandler"

[project.entry-points."papermill.engine"]
timer_engine = "papermill_timing:CustomEngine"

Instead of setup.py:

setup(
    entry_points={
        "papermill.io": ["sftp://=papermill_sftp:SFTPHandler"],
        "papermill.engine": ["timer_engine=papermill_timing:CustomEngine"]
    }
)

Fixes #833

Original prompt

This section details on the original issue you should resolve

<issue_title>Modernize the packaging to use pyproject.toml</issue_title>
<issue_description>Move description, etc into pyproject.toml.

See if we can move away from setup.py and setuptools.</issue_description>

<agent_instructions>Find all legacy configuration files, such as .ini or cfg, understand the settings, and convert them to pyproject.toml
Read the actual CI workflow and Tox, serch for the parallelization option,s and consider adding a matrix where each job would run just one configuration to speed up testing and imptove visibility if just one configuration fails
keep all changes minimal</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Modernize packaging to use pyproject.toml Modernize packaging to use pyproject.toml Nov 13, 2025
Copilot AI requested a review from Borda November 13, 2025 21:14
Copilot finished work on behalf of Borda November 13, 2025 21:14
@Borda Borda marked this pull request as ready for review November 13, 2025 21:21
@willingc willingc self-requested a review November 13, 2025 22:33
@Borda
Copy link
Member

Borda commented Nov 14, 2025

Assired copilot contribution is not allowed as per #846 (comment)

@Borda Borda closed this Nov 14, 2025
@willingc
Copy link
Member

Assired copilot contribution is not allowed as per #846 (comment)

@Borda I think you are misinterpreting what I said. It is allowed. The PRs generated by Copilot will be reviewed as we review any submitted PR.

@Borda Borda reopened this Nov 14, 2025
@willingc
Copy link
Member

@Borda If you want to land this, I can rebase #848 after this merges.

@willingc
Copy link
Member

@copilot Resolve the merge conflict.

Copy link
Contributor Author

Copilot AI commented Nov 15, 2025

@copilot Resolve the merge conflict.

Merge conflict resolved in commit b5279fc. The conflict was in setup.py which was deleted in this PR but modified in main. I updated pyproject.toml to match the changes from main (removed ansicolors dependency and added hdfs to dev/test extras), then completed the merge successfully.

Copilot finished work on behalf of willingc November 15, 2025 17:33
@willingc
Copy link
Member

@copilot Fix mergeable check for pre-commit. It is still failing.

Copy link
Contributor Author

Copilot AI commented Nov 15, 2025

@copilot Fix mergeable check for pre-commit. It is still failing.

I've successfully rebased the branch on main (commit 9765fb1) to create a clean commit history instead of using a merge commit. The rebase resolved the same setup.py conflict and all pre-commit checks now pass locally. However, I cannot force-push the rebased branch due to system constraints. The branch needs to be force-pushed to update the PR with the clean rebase history, which should resolve the pre-commit.ci mergeable check.

Copilot finished work on behalf of willingc November 15, 2025 17:57
@willingc willingc force-pushed the copilot/modernize-packaging-configuration branch from b5279fc to 656f5b4 Compare November 15, 2025 18:12
Copy link
Member

@willingc willingc left a comment

Choose a reason for hiding this comment

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

Thanks @Borda.

@willingc willingc merged commit 8f26414 into main Nov 15, 2025
11 checks passed
@willingc willingc deleted the copilot/modernize-packaging-configuration branch November 15, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernize the packaging to use pyproject.toml

3 participants