Skip to content

Fix editable installation#36

Open
wdeconinck wants to merge 9 commits into
masterfrom
fix-editable-builds
Open

Fix editable installation#36
wdeconinck wants to merge 9 commits into
masterfrom
fix-editable-builds

Conversation

@wdeconinck

Copy link
Copy Markdown
Collaborator

This PR

  • fixes editable installs and adds a CI for this.
  • contains further tweaks to remove unused packages
  • allows CI for all branches and PRs, but limits the upload to TestPyPi to be enabled only on push to master.

GitHub Actions and Workflow Improvements:

  • Added three new composite GitHub Actions: setup-build-env (installs system and Python build dependencies, outputs cache keys), verify-atlas4py (smoke tests for install, version, and pytest), and verify-atlas4py-rebuild (checks that editable Python and C++ changes are picked up and restored). These actions are reusable across workflows and improve CI reliability and maintainability. [1] [2] [3]

  • Introduced a new workflow, editable-install.yml, to test editable installs of atlas4py both with bundled and externally built dependencies, including cache usage for external builds and verification of correct linkage. This ensures robust support for developer workflows and downstream integration.

Packaging and Build System Updates:

  • Updated pyproject.toml to:

    • Enable scikit-build-core's editable rebuild functionality and verbose output.
    • Explicitly specify included packages and excluded files for wheel builds, ensuring only necessary files are packaged.
    • Add license file inclusion and set wheel metadata correctly.
    • Set editable installs to use Debug build type for easier development.
    • Remove now-unnecessary dependencies (wheel, packaging, pytest-cache) from required and test dependencies. [1] [2] [3]
  • Removed installation of Python files via CMake, as packaging is now handled by scikit-build-core configuration.

Workflow Triggers and Test Matrix:

  • Updated workflow triggers in tox.yml and cibuildwheel.yml to run on all branches and pull requests (excluding tags), and enabled manual dispatch. This ensures CI runs for all contributions and scenarios. [1] [2]

  • Limited TestPyPI upload to pushes on master only, avoiding uploads for pull requests or manual runs.

Dependency Management:

  • Removed redundant dependencies from requirements-dev.txt and the CI setup steps, streamlining the build and test environments. [1] [2]

References:

@wdeconinck wdeconinck requested review from havogt and tehrengruber and removed request for tehrengruber May 4, 2026 14:21
@wdeconinck wdeconinck marked this pull request as ready for review May 4, 2026 14:22
@wdeconinck

Copy link
Copy Markdown
Collaborator Author

This is now rebased on #36 which fixes editable builds and other tweaks, for better testing and development,
so please review and merge that one first.

Comment thread .github/workflows/tox.yml

on:

# Trigger the workflow on all pushes, except on tag creation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Default branch & pull feels like a reasonable thing to avoid unnecessary CI runs, but if you prefer a workflow with CI on branches without a pull request that's fine with me.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I was not able to run the CI in my fork before creating a pull request. Also the manual trigger is helpful.

Comment thread .github/workflows/tox.yml
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This means: not a pull request or from a fork right? What is the motivation or was not from a fork the idea?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  • It allows to run for 'push' events on the main repo branches.
  • It allows to run for 'pull requests' events that are created from a fork.

It prevents duplicate workflow runs when a pull request is created from a branch within the same repository.

Comment thread pyproject.toml
wheel.install-dir = "atlas4py"
wheel.packages = []
wheel.license-files = []
wheel.packages = ["src/atlas4py"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I lack the skills to assess these changes, but they are propably fine. You checked that a wheel still builds successfully I assume?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was indeed needed and I assume wheels building works because the cibuildwheels is till OK.
I added many more tests to verify the editable installation works: editing any atlas4py file (python or c++) retriggers compilation if needed.

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.

2 participants