Skip to content

Poseidon version cli for validate and jannocoalesce#367

Open
nevrome wants to merge 4 commits intoposeidon300colsfrom
versionInput
Open

Poseidon version cli for validate and jannocoalesce#367
nevrome wants to merge 4 commits intoposeidon300colsfrom
versionInput

Conversation

@nevrome
Copy link
Member

@nevrome nevrome commented Feb 10, 2026

In your review of #357 you remarked that validate and jannocoalesce should not be limited to the latest Poseidon version, @stschiff. This PR adds command line options to set the versions manually.

@nevrome nevrome requested a review from stschiff February 10, 2026 12:52
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 18.18182% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.57%. Comparing base (3b7fc1b) to head (72b2f5b).

Files with missing lines Patch % Lines
src/Poseidon/CLI/OptparseApplicativeParsers.hs 0.00% 24 Missing ⚠️
src/Poseidon/CLI/Jannocoalesce.hs 60.00% 2 Missing ⚠️
src/Poseidon/CLI/Validate.hs 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           poseidon300cols     #367      +/-   ##
===================================================
- Coverage            55.70%   55.57%   -0.13%     
===================================================
  Files                   33       33              
  Lines                 5235     5247      +12     
  Branches               631      630       -1     
===================================================
  Hits                  2916     2916              
- Misses                1688     1701      +13     
+ Partials               631      630       -1     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@stschiff stschiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm still a bit confused. So you now have VersionedFiles as Input and Output. So for input this makes sense, as upon reading, the parser has to know which version, so that it can for example scale the damage and endogenous values. But for writing, how does this exactly work? Say I request things to be written as 2.7.1. Then this line here:

JannoRows targetRows <- readJannoFile targetPV [] targetPath

will work just fine. But that doesn't mean that the writing will properly respect the version?

I think the writing will always write in Version 3.0.0 format, won't it?

Perhaps we should make this simple, and forbid any choice of the target version to be selected? Maybe this needs to be discussed.

@nevrome
Copy link
Member Author

nevrome commented Feb 23, 2026

OK - I thought about this again. I wonder if the confusion just stems from the fact that in- and output are not clearly separated for jannocoalesce, with the --targetFile potentially getting read AND overwritten. In 72b2f5b I propose a radical solution for that: I removed the option to omit --outFile to fall back to --targetFile. I then adjusted the CLI documentation of --outFile to

File path to write the result to. Can be identical to
--targetFile to overwrite the target file in place.
Note that trident only writes .janno files in the
latest Poseidon version it supports, so in this case
v3.0.0.

With this (interface-breaking) change in- and output are well compartmentalized. What do you think, @stschiff. If you don't like it, we can revert the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants