[Maintenance] Move DieLibrary git tag handling to a separate file and expose it to Python#39
Merged
calladoum-elastic merged 8 commits intoFeb 19, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the DieLibrary git tag management by extracting it into a dedicated .dielib_commit file and exposing the tag to the Python interface. The changes improve maintainability by centralizing version control and modernize the codebase with updated type hints using PEP 604 syntax.
Changes:
- Created
.dielib_commitfile to store the DieLibrary git commit hash - Exposed
dielib_tagto Python via C++ bindings and Python module exports - Modernized type hints from
typing.Union/Optionalto PEP 604 union operator (|) syntax - Enhanced
load_database()to acceptpathlib.Pathin addition to strings - Added test coverage for the new
dielib_tagattribute
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.dielib_commit |
New file containing the DieLibrary git commit hash for version management |
cmake/FindDieLibrary.cmake |
Updated to read git tag from .dielib_commit file instead of hardcoding it |
python/inc/die.hpp |
Added DIELIB_TAG preprocessor definition with empty string default |
python/CMakeLists.txt |
Added compile definition to pass DIE_LIBRARY_GIT_TAG as DIELIB_TAG to C++ |
python/src/die.cpp |
Exposed DIELIB_TAG as module attribute dielib_tag |
python/die/__init__.py |
Imported and exported dielib_tag; updated type hints to PEP 604 syntax; enhanced load_database to accept Path objects |
python/tests/test_die.py |
Added assertions for dielib_tag; added redundant null checks; updated string quotes to double quotes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s://github.com/elastic/die-python into calladoum/use-separate-file-for-dielib-git-tag
Collaborator
Author
|
Note: sticking to |
1337-42
approved these changes
Feb 19, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description