-
Notifications
You must be signed in to change notification settings - Fork 5
Add build and publication workflow of Python wheels #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b5c517d
to
50c3ba1
Compare
Over the last weeks the memory tests of the wheels build on Ubuntu latest have become flaky. I did not observe any problems 1 month ago, but since recently, the memory tests occasionally fail on Python 3.11 and Python 3.12. The memory footprint is only slightly increased, but still increased. I wanted to mention this, but I am not sure what to do about it either. Here is a failed GitHub Action run in which the memory limit was exceeded by 600 KB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! 👍 Tests seem to be running from virtual environment too, so good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! I added fixups to address the issues. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that you actually tested how it works with Test pypi! 😻
Now I know that we would be able to switch the same for segyio and dlisio as with last release we already got a complain as to why we are not using the Trusted Publisher.
5579acc
to
e04185e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I added a fixup and a new commit to increase the memory limit for the memray tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 🐱
Rebase and merge :)
The publication workflow is based on cibuildhweel [1] and is based on the workflow of other repositories such as segyio [2]. The workflow is pre-approved to run to publish as trusted publisher [3]. We currently only build wheels that are relevant for the foreseen applications (Linux) and other platforms for which creation of wheels was rather straightforward. Therefore, no Windows wheels are built. The source distribution (sdist) is not build as it would require some larger restructuring of the repository. It appears to be non-trivial to package the sdist if the `pyproject.toml` is not in the root directory of all files to be included in the sdist. In our case, the impedance source code, test data, README etc. are all accessible from the parent directory of `pyproject.toml` instead of the directory the `pyproject.toml` resides in. [1]: https://cibuildwheel.pypa.io/en/stable/ [2]: https://github.com/equinor/segyio [3]: https://docs.pypi.org/trusted-publishers/using-a-publisher/
The previous version, 1.1.0a1, was released manually and is only available on PyPI as it was inteded for testing the Python bindings. We bump the version number to 1.1.0a2 with the intend to tag it. This should trigger the publication workflow to push new wheels to PyPI and lets us create a new release on GitHub.
It is almost end of life and we cannot test the wheels on MacOS due to issues with h5py during the installation of xtgeo.
The bound is increased by 1 MB for each test. Without the change we observe some flakyness of the memory tests on GitHub for the built wheels. This is in accordance with the memray documentation [1] that states As the Python interpreter has its own object allocator it’s possible that memory is not immediately released to the system when objects are deleted, so tests using this marker may need to give some room to account for this. [1]: https://pytest-memray.readthedocs.io/en/latest/usage.html#pytest.mark.limit_memory
e04185e
to
b8272e9
Compare
No description provided.