adding DRAGONS version to header of outputs
In _write_final, if we are saving an output file, add a header keyword recording the version of DRAGONS used
This will be added only at the end of the recipe. What about when I do writeOutputs() ? What about intermediate products that some primitives create?
I don't actually have a solution. We don't want to add this to astrodata since we plan to split it out. Having recipe_system control it makes sense but I don't know when to add it.
Let's think ahead...
The versions that matter are the version of recipe_system (a bit) but mostly the version of geminidr. Think of the use where a third-party package, say maroonxdr, is used. We need that version number too. It will use geminidr and maroonxdr, and "dragons". geminidr can be DRGNSVER, I don't see splitting geminidr out of DRAGONS anytime soon. Yet, I'd like to have a mechanism that would allow the external packages to add their version number too. In the prepare primitive? Some setVersion primitive? I'd like to get Chris' opinion on this.
Another worry I have is what happens with this PR implementation when I do reduce -r display which does not change the data and therefore does not write an output. I should not. Will adding that header by default suddenly "change the file" and then force an output to be written?
writeOutputs would work as well, but I really defer to you and Chris where this would best live. In the _write_final, it is only saving the file if the filename changed, or a suitable suffix has been set.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 57.89%. Comparing base (
fa6cf30) to head (dbcd7b0). Report is 2118 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #299 +/- ##
=======================================
Coverage 57.88% 57.89%
=======================================
Files 249 249
Lines 28094 28097 +3
=======================================
+ Hits 16263 16266 +3
Misses 11831 11831
| Flag | Coverage Δ | |
|---|---|---|
| gmosls | 39.21% <100.00%> (+<0.01%) |
:arrow_up: |
| integration | 34.23% <100.00%> (+<0.01%) |
:arrow_up: |
| regression | 29.95% <0.00%> (-0.01%) |
:arrow_down: |
| slow | 44.05% <100.00%> (+<0.01%) |
:arrow_up: |
| unit | 47.85% <100.00%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Closing this unmerged as it has issues and it's been superseded by PR-479.