Changes to .janno and .ssf columns for Poseidon v3.0.0#357
Changes to .janno and .ssf columns for Poseidon v3.0.0#357nevrome wants to merge 51 commits intoSchema_300_devfrom
Conversation
…e for packages in old Poseidon versions
…o added row-wise consistency checks accordingly
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## Schema_300_dev #357 +/- ##
==================================================
- Coverage 56.89% 55.70% -1.19%
==================================================
Files 33 33
Lines 5043 5235 +192
Branches 548 631 +83
==================================================
+ Hits 2869 2916 +47
- Misses 1626 1688 +62
- Partials 548 631 +83 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks, I will take a look. |
…lumns when writing .janno files
|
This PR is pretty straight forward, actually. It just adds new columns and some special handling for the ones whose semantics change with Poseidon v3.0.0. This affects so many files because changes in the .janno columns change a lot of reference data for the golden tests. The only interesting bit is the way There are still two open PRs in the schema repository that should be worked into this PR, as soon as they are merged:
When this is done, the review can proceed. |
…s depending on the poseidon package version
.janno & .ssf field parsing depending on a package's Poseidon version
|
OK - I think this is ready for review. It seems overwhelming with all these files affected, but the actual changes are realtively minimal. I suggest you start in src/Poseidon/ColumnTypesUtils.hs. That's where the new |
stschiff
left a comment
There was a problem hiding this comment.
OK, great. This is a very impressive piece of work. I've left some comments. May main question is about the JannoCoalescce and also validate, where I am confused that you force the input files to always be read assuming the latest version... but shouldn't we enable the user to say which version the file is in, or even be able to read it from the YAML if it's submitted as a package?
| runJannocoalesce (JannoCoalesceOptions sourceSpec target outSpec fields overwrite sKey tKey maybeStrip) = do | ||
| JannoRows sourceRows <- case sourceSpec of | ||
| JannoSourceSingle sourceFile -> readJannoFile [] sourceFile | ||
| JannoSourceSingle sourceFile -> readJannoFile latestPoseidonVersion [] sourceFile |
There was a problem hiding this comment.
Wait, this I don't understand. Why would we want to read Janno Files with anything else than the particular version that this Janno File was stored in? Why force them all to be read with the latest only?
| runValidate (ValidateOptions (ValPlanJanno path) mandatoryJannoCols _ noExitCode _) = do | ||
| logInfo $ "Validating: " ++ path | ||
| (JannoRows entries) <- readJannoFile mandatoryJannoCols path | ||
| (JannoRows entries) <- readJannoFile latestPoseidonVersion mandatoryJannoCols path |
There was a problem hiding this comment.
Same here (as in JannoCoalesce). Why don't we want to read that according to the exact Poseidon Version of the package this file is in?
| runValidate (ValidateOptions (ValPlanSSF path) _ mandatorySSFCols noExitCode _) = do | ||
| logInfo $ "Validating: " ++ path | ||
| (SeqSourceRows entries) <- readSeqSourceFile mandatorySSFCols path | ||
| (SeqSourceRows entries) <- readSeqSourceFile latestPoseidonVersion mandatorySSFCols path |
Co-authored-by: Stephan Schiffels <stephan_schiffels@mac.com>
|
Very good observation about For |
I think for the output we would always just offer the latest version. I think that's simpler, and we don't want to actually keep the writer-function flexible, just the parser alone will be tricky enough to maintain, right? |
|
For |
This PR is part of the preparation for Poseidon v3.0.0 as specified here: poseidon-framework/poseidon-schema#93
As documented in #351 I implemented the changes to .janno and .ssf.
While doing so I noticed two minor things I wanted to change in the new schema specification: poseidon-framework/poseidon-schema@31900ef & poseidon-framework/poseidon-schema@a256a62
Adding and modifying the columns in poseidon-hs also required (or: made desirable) some minor changes in the surrounding code -- but nothing spectacular.