Repository navigation
Fix bug with placeholder conflict and add tests to guard against this! - #44
Merged
Merged
Conversation
The placeholder `VERSION_PLACEHOLDER` was a substr of
`PYTHON_VERSION_PLACEHOLDER`. `VERSION_PLACEHOLDER` got subsituted first, which
resulted in the `PYTHON_VERSION_PLACEHOLDER` not being replaced with the
expected value (instead, it got `PYTHON_{VERSION_PLACEHOLDER}`.
trey-stafford
force-pushed
the
fix-python-version-str-py-script-template
branch
from
September 24, 2026 23:24
282e9b5 to
2bca645
Compare
trey-stafford
marked this pull request as ready for review
September 24, 2026 23:25
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Fixes placeholder substitution conflicts in generated Python download scripts and adds regression coverage.
Changes:
- Renames the dataset version placeholder.
- Adds placeholder integrity and collision tests.
- Verifies generated scripts include the backend Python version.
| File | Summary |
|---|---|
test/unit/test_python_script_template.py |
Adds placeholder validation and collision tests. |
test/unit/test_api.py |
Verifies Python version substitution. |
src/dat_backend/templates/python_script.py |
Uses the renamed dataset version placeholder. |
src/dat_backend/routes/python_script.py |
Defines and replaces the updated placeholders. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The placeholder
VERSION_PLACEHOLDERwas a substr ofPYTHON_VERSION_PLACEHOLDER.VERSION_PLACEHOLDERgot subsituted first, which resulted in thePYTHON_VERSION_PLACEHOLDERnot being replaced with the expected value (instead, it gotPYTHON_{VERSION_PLACEHOLDER}.Resolves #43