-
Notifications
You must be signed in to change notification settings - Fork 14
batch saving genomes #212
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: master
Are you sure you want to change the base?
batch saving genomes #212
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #212 +/- ##
==========================================
+ Coverage 80.88% 81.07% +0.18%
==========================================
Files 11 11
Lines 2998 3017 +19
==========================================
+ Hits 2425 2446 +21
+ Misses 573 571 -2 ☔ 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.
Haven't looked at tests yet, but this is already a lot of comments
EDIT: All comments addressed
…me_mass loop; 3. make the note much more explicit
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.
Note to self: haven't finished looking at the tests yet, this is enough comments for now and will probably require some re-investigation due to the amount of time this PR has been sitting
if "AnnotatedMetagenomeAssembly" in ws_datatype: | ||
if params.get('upgrade') or 'feature_counts' not in data: | ||
data = self._update_metagenome(data) |
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 really wish we had documented why this was ok to delete because I don't remember any more:
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.
More discussion here: #212 (comment)
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.
Codedov says there is a test where the type is AMA: https://app.codecov.io/gh/kbaseapps/GenomeFileUtil/blob/master/lib%2FGenomeFileUtil%2Fcore%2FGenomeInterface.py#L142
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.
Sijie - do you remember anything about why we thought this was safe to delete?
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.
Especially since it seems to be exercised by tests per Codecov
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.
restored
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.
Whoops, looks like there were some tests for this that were deleted also, those should be undeleted as well: #212 (comment)
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.
Restored test and updated logic to check all object types: Assembly, Genome, and Metagenome.
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.
Metagenome coverage issue is now fixed
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.
In this case although now the _update_metagenome function call is covered, there's no actual effect from the function call - it's a no op, and so if call were deleted no tests would fail. There needs to be a test that would fail if the function call were removed. A unit test here would be fine - I think there just needs to be a tests that calls save_genomes_mass and save_one_genome with no "molecule_type" field in the genome object
If there's already a test that saves a genome I'd think it'd be pretty easy to add a case for this
…est_genomes_with_upgrade
test/utility/genome_size_tests.py
Outdated
cls.wsClient.create_workspace({'workspace': cls.wsName}) | ||
cls.wsID = cls.dfuClient.ws_name_to_id(cls.wsName) |
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.
cls.wsClient.create_workspace({'workspace': cls.wsName}) | |
cls.wsID = cls.dfuClient.ws_name_to_id(cls.wsName) | |
cls.wsID = cls.wsClient.create_workspace({'workspace': cls.wsName})[0] |
pretty sure that's the right syntax, but you might need to fix it if not. create-workspace def returns the wsid
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.
👍
No description provided.