Fix editable installation#36
Conversation
Now `pip install -e .` will work correctly: -`import atlas4py` will then trigger a build/install step if needed. - The __init__.py used is located in the source-dir
|
This is now rebased on #36 which fixes editable builds and other tweaks, for better testing and development, |
|
|
||
| on: | ||
|
|
||
| # Trigger the workflow on all pushes, except on tag creation |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I was not able to run the CI in my fork before creating a pull request. Also the manual trigger is helpful.
| 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 |
There was a problem hiding this comment.
This means: not a pull request or from a fork right? What is the motivation or was not from a fork the idea?
There was a problem hiding this comment.
- 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.
| wheel.install-dir = "atlas4py" | ||
| wheel.packages = [] | ||
| wheel.license-files = [] | ||
| wheel.packages = ["src/atlas4py"] |
There was a problem hiding this comment.
I lack the skills to assess these changes, but they are propably fine. You checked that a wheel still builds successfully I assume?
There was a problem hiding this comment.
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.
This PR
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), andverify-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 ofatlas4pyboth 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.tomlto:scikit-build-core's editable rebuild functionality and verbose output.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-coreconfiguration.Workflow Triggers and Test Matrix:
Updated workflow triggers in
tox.ymlandcibuildwheel.ymlto 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
masteronly, avoiding uploads for pull requests or manual runs.Dependency Management:
requirements-dev.txtand the CI setup steps, streamlining the build and test environments. [1] [2]References: