-
Notifications
You must be signed in to change notification settings - Fork 19
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
'raw' gather report should output all PU repeats #884
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks @frannerin - just a couple of things.
I think there's that one test that will fail and will require manually adding in the repeats to the stored table string.
return [(pu['outputs']['unit_estimate'], | ||
pu['outputs']['unit_estimate_error']) | ||
# could add to each tuple pu[0]["source_key"] for repeat ID | ||
return [(pu[0]['outputs']['unit_estimate'], |
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.
Could you maybe provide some context for this change?
As far as I remember, the zero list index on line 134 is to deal with avoiding to do it here twice - that being said I could be convinced that this is a better approach with the right context.
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.
list(results['protocol_result']['data'].values())
in line 134 contains an item for each ProtocolUnit, so by taking the zero list index there only the first PU is further processed. Each item in list(results['protocol_result']['data'].values())
is a list itself, with length 1 (afaik), so that's why pu[0] must be done to access the single dictionary within.
openfecli/commands/gather.py
Outdated
|
||
for ligpair, vals in sorted(legs.items()): | ||
for simtype, repeats in sorted(vals.items()): | ||
for m, u in repeats: | ||
for rep, (m, u) in enumerate(repeats, 1): |
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.
I think we'd want this to be zero indexed - I'll have a poke around our other outputs later, but at least on the Python layer, we keep everything zero indexed.
I did the zero-indexed repeats thing and updated the test_gather.py. I ran pytest -k test_gather and got: 23 passed, 3 skipped, 840 deselected, 1 xfailed, 2 xpassed, 25 warnings |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #884 +/- ##
==========================================
- Coverage 94.59% 91.64% -2.95%
==========================================
Files 134 134
Lines 9935 9935
==========================================
- Hits 9398 9105 -293
- Misses 537 830 +293
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Function
_parse_raw_units
in openfecli/commands/gather.py only processed first ProtocolUnit repeat and then_write_raw
did not distinguish between repeats if there were any._write_dg_raw
is left unchanged because it seems to be unused.Example output (openfe gather --report raw ) before fix for a RBFE protocol with 3 PU repeats for the solvent legs, and 1 repeat for the complex legs:
Example output after fix:
Checklist
news
entryDevelopers certificate of origin