Skip to content

Feature/pep621 testing - #750

Open
KmoM88 wants to merge 3 commits into
colcon:cottsay/pep621from
KmoM88:feature/pep621-upstream-pr
Open

KmoM88 wants to merge 3 commits into
colcon:cottsay/pep621from
KmoM88:feature/pep621-upstream-pr

Conversation

@KmoM88

@KmoM88 KmoM88 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

I have updated unit test and verified the end-to-end PEP 621 pipeline:

  1. Async Test Runner:
    Adapted test_task_python_project_build.py to use from .run_until_complete import run_until_complete instead of @pytest.mark.asyncio, aligning it with colcon-core's internal test conventions without requiring external plugins.
  2. End-to-End Integration Tests (test/test_integration_pep621.py):
    Added integration tests exercising modern build backends:
    • Pure PEP 621 package build & runtime import with flit_core.
    • Entry point script generation and execution with hatchling ([project.scripts] $\rightarrow$ bin/ wrapper).
    • Rebuilds and removal of deleted files via remove_distributions.
    • Editable installs with --symlink-install via build_editable and PEP 610 recording.
  3. Test Suite Status:
    All related tests pass cleanly:
    pytest test/test_package_identification_pep621.py \
           test/test_package_augmentation_pep621.py \
           test/test_task_python_project_build.py \
           test/test_install_wheel.py \
           test/test_remove_wheel.py \
           test/test_integration_pep621.py

Signed-off-by: Federico Rossi <federico.rossi@creativa77.com.ar>
… hatchling

Signed-off-by: Federico Rossi <federico.rossi@creativa77.com.ar>
@KmoM88
KmoM88 marked this pull request as draft October 27, 2026 14:52
Resolve I202 import newline in test_integration_pep621.py and add valid domain terms (addsitedir, buildapi, editables, hatchling) to test/spell_check.words.

Signed-off-by: Federico Rossi <federico.rossi@creativa77.com.ar>
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (cottsay/pep621@80acf29). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                @@
##             cottsay/pep621     #750   +/-   ##
=================================================
  Coverage                  ?   86.71%           
=================================================
  Files                     ?       79           
  Lines                     ?     4884           
  Branches                  ?      851           
=================================================
  Hits                      ?     4235           
  Misses                    ?      513           
  Partials                  ?      136           

☔ View full report in Codecov by Harness.
📢 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.

@KmoM88

KmoM88 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Following up on the PEP 517/518/621 discussion in #736 and the groundwork in cottsay/pep621:

This PR completes the core PEP 621 pipeline and brings it into full alignment with repository test standards:

  1. Test Runner Alignment: Adapted async tests to from .run_until_complete import run_until_complete, matching colcon-core internal conventions without external pytest plugin dependencies.
  2. Multi-Backend Integration Tests (test_integration_pep621.py): Added automated end-to-end fixtures validating real packaging workflows with flit_core and hatchling (pure PEP 621 packages, entry-point CLI script wrappers in bin/ with 0o755 permissions, clean rebuild removals, and editable builds).
  3. Linters & CI Conformance: Fully compliant with flake8 and scspell3k.

Staged Roadmap Proposal

To keep review manageable and prevent regressions, the broader modernization plan (covering subsequent stages such as PEP 660 non-Python data files symlinking and ROS 2 ament_python support in colcon-ros) is documented in this staged architectural proposal:

👉 https://gist.github.com/KmoM88/0357abff37b5a32ab801cac7d399d4ed

Stage Component Branch / Deliverable Status
Stage 1 (Current) colcon-core PR #750 (feature/pep621-upstream-pr $\rightarrow$ cottsay/pep621) In Review
Stage 2 colcon-core feature/pep660-editable-data-files (Symlinking share/ assets for --symlink-install) Ready & Tested
Stage 3 colcon-ros feature/ros-ament-python-project (ament_python with pure pyproject.toml) Ready & Tested
Stage 4 colcon-python-project Deprecate standalone prototype repository Planned

@KmoM88
KmoM88 marked this pull request as ready for review October 28, 2026 01:55
@KmoM88
KmoM88 marked this pull request as draft October 28, 2026 18:02
@KmoM88
KmoM88 marked this pull request as ready for review November 5, 2026 14:21
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.

1 participant