-
Notifications
You must be signed in to change notification settings - Fork 2
Change path key in fcf outputs dict #1038
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
base: dev
Are you sure you want to change the base?
Conversation
The outputs dict in the analysis object used a "basename" key to identify the file path. This is confusing as the resulting outputs file object contains both "path" AND "basename" properties. basename normally only contains the file name and extension, so use of this to denote a file path was a poor choice from myself :/
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1038 +/- ##
==========================================
- Coverage 82.56% 82.35% -0.21%
==========================================
Files 189 189
Lines 16459 16459
==========================================
- Hits 13589 13555 -34
- Misses 2870 2904 +34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
The purpose of this PR is to update the outputs dictionary to use the key "path" instead of "basename" for clarity.
- Updated test cases in test_analysis_output_files.py to use the "path" key.
- Modified production code in output_file.py to consistently refer to file paths using "path".
- Adjusted inline comments to reflect the changes.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/test_analysis_output_files.py | Updated test assertions to check for "path" instead of "basename". |
| db/python/tables/output_file.py | Modified functions and comments to use "path" consistently in file outputs. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
e849020 to
17654fc
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.
This looks like a reasonable change, as long as the stuff testing the tests is pulled out into a separate PR once you're done testing it.
The main thing that needs consideration is the backwards incompatibility of this change. I found one place that basename is being used in our code: https://github.com/populationgenomics/cpg-methods-private/blob/1954e369d9248a9557cf44084a5956d0e2986603/scripts/bioheart/update_DRAGEN_analyses.py#L73 might be good for you to have a look through too to see if I missed any
c85bbd7 to
17654fc
Compare
|
Also noting there's a wip implementation here: |
The outputs dict in the analysis object used a
basenamekey to identify the file path. This is confusing as the resulting outputs file object contains bothpathANDbasenameproperties. basename normally only contains the file name and extension, so use of this to denote a file path was a poor choice from myself :/See the thread here: https://centrepopgen.slack.com/archives/C030X7WGFCL/p1743555245218149