Replace symlinked VERSION.txt with pytest fixture in test config#347
Merged
jordanpadams merged 3 commits intomainfrom Mar 26, 2026
Merged
Replace symlinked VERSION.txt with pytest fixture in test config#347jordanpadams merged 3 commits intomainfrom
jordanpadams merged 3 commits intomainfrom
Conversation
The symlinked tests/pds/ingress/service/config/VERSION.txt was confusing roundup-action's TextFileDetective, which walks src/ for VERSION.txt files but only breaks the inner loop -- causing the last found path (a symlink) to be committed instead of the canonical file. Replace the symlink with a conftest.py fixture that copies the real src/pds/ingress/VERSION.txt into the test config dir at session start, keeping the version always in sync without introducing symlinks. Fixes: NASA-PDS/roundup-action#166 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nutjob4life
approved these changes
Mar 18, 2026
Member
nutjob4life
left a comment
There was a problem hiding this comment.
Delta: ✓
Tox: ✓
Approval: ✅
Tox details:
py313: OK (34.00=setup[1.26]+cmd[32.75] seconds)
docs: OK (1.16=setup[0.49]+cmd[0.67] seconds)
lint: OK (2.65=setup[0.01]+cmd[2.65] seconds)
congratulations :) (37.88 seconds)
Merged
14 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes a confusing symlinked VERSION.txt from the test configuration and replaces it with a pytest session fixture that syncs the test config’s VERSION.txt from the canonical package version file, reducing the chance that tooling (e.g., roundup-action) interacts with symlink paths.
Changes:
- Added a session-scoped, autouse pytest fixture to copy
src/pds/ingress/VERSION.txtinto the test config directory. - Replaced the symlinked
tests/.../config/VERSION.txtwith a regular text file.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/pds/ingress/service/conftest.py | Adds a session autouse fixture to copy the canonical VERSION file into the test config directory. |
| tests/pds/ingress/service/config/VERSION.txt | Replaces a symlink with a real version file content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
🗒️ Summary
Removes the double-hop symlink
tests/pds/ingress/service/config/VERSION.txtand replaces it with a session-scoped pytest fixture that copies the canonicalsrc/pds/ingress/VERSION.txtinto the test config directory at test-session start.The symlink was confusing
roundup-action'sTextFileDetective.locate_file(), which usesos.walkwith abreakthat only exits the inner loop — so the lastVERSION.txtfound (the symlink) was being passed tocommit(), causing git to stage the symlink path instead of the real file. See NASA-PDS/roundup-action#166 for the companion fix in roundup-action itself.🤖 AI Assistance Disclosure
Estimated % of code influenced by AI: 60%
⚙️ Test Data and/or Report
All 32 unit tests pass with the fixture in place:
test_get_dum_versioncontinues to assert that the version read fromconfig/VERSION.txtmatches__version__, confirming the fixture keeps them in sync.♻️ Related Issues
Fixes NASA-PDS/roundup-action#166
🤓 Reviewer Checklist
Reviewers: Please verify the following before approving this pull request.
Documentation and PR Content
Security & Quality
Testing & Validation
Maintenance