Repository navigation
Set up Python packaging and release process #9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [bumpversion] | ||
| current_version = 0.1.0 | ||
| commit = True | ||
| tag = True | ||
|
|
||
| [bumpversion:file:tools/__init__.py] | ||
| search = __version__ = "{current_version}" | ||
| replace = __version__ = "{new_version}" | ||
|
|
||
| [bumpversion:file:CHANGELOG.md] | ||
| search = ## [{current_version}] | ||
| replace = ## [{new_version}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. The | ||
| format roughly follows `Keep a Changelog <https://keepachangelog.com/>`_. | ||
|
|
||
| ## [0.1.0] - 2025-10-24 | ||
| ### Added | ||
| - Initial packaging configuration for the Python analysis utilities. | ||
| - Version management via ``bump2version``. | ||
| - Release checklist documenting the release process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # MacroBase Python Utilities Release Checklist | ||
|
|
||
| This checklist covers the steps required to publish a new version of the | ||
| ``macrobasev`` Python distribution to PyPI. | ||
|
|
||
| 1. **Preparation** | ||
| - Make sure all pending work is merged and the codebase is clean. | ||
| - Update ``CHANGELOG.md`` with the highlights for the release. | ||
| - Confirm the version number you plan to release. | ||
|
|
||
| 2. **Run tests and quality checks** | ||
| - Execute the project's automated tests (if applicable). | ||
| - Run ``python -m build`` to ensure sdist and wheel artifacts can be | ||
| created successfully. | ||
| - Run ``twine check dist/*`` to validate the distribution metadata. | ||
|
|
||
| 3. **Bump the version** | ||
| - Use ``bump2version`` to increment the version appropriately, for example: | ||
| ``bump2version patch``. | ||
| - Push the resulting commit and tag to the upstream repository. | ||
|
|
||
| 4. **Publish to PyPI** | ||
| - Ensure you have valid credentials configured for ``twine``. | ||
| - Upload the artifacts with ``twine upload dist/*``. | ||
| - Verify that the release appears on https://pypi.org/project/macrobasev/. | ||
|
|
||
| 5. **Post-release** | ||
| - Announce the release as appropriate (mailing list, Slack, etc.). | ||
| - Create an issue or milestone for the next development cycle. | ||
|
|
||
| Following these steps ensures that each release is consistent, well-documented, | ||
| and reproducible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| """Python utilities and analysis scripts for MacroBase. | ||
|
|
||
| This module now exposes a :data:`__version__` attribute so packaging tools | ||
| can derive the canonical version number for the distribution. | ||
| """ | ||
|
|
||
| __all__ = [] | ||
|
|
||
| # NOTE: Keep the version in sync with the value referenced by the packaging | ||
| # configuration in ``pyproject.toml`` and the bumpversion configuration. | ||
| __version__ = "0.1.0" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The packaging configuration only ships
*.conf,*.txt, andmatplotlibrcfiles fromtools.bench, but the benchmarking scripts load YAML and JSON templates from subdirectories such astools/bench/experimentsandtools/bench/contextual. Building a wheel from this configuration will omit those resources, so any installed copy of the package will fail when a script tries to readtools/bench/.../*.yamlor.json. Please expand thepackage-datapatterns (e.g., include**/*.yamland**/*.json) so that the packaged artifacts contain the files the runtime code expects.Useful? React with 👍 / 👎.