Skip to content

Conversation

Xiangs18
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.07%. Comparing base (4819598) to head (2eb63c1).

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.
📢 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.

@Xiangs18
Copy link
Contributor Author

Xiangs18 commented Aug 16, 2024

self note:

a2fabf4 verifies that the refactored code works with the save_one_genome function.
330d6c2 verifies that the refactored code works with the save_genome_mass function.

@Xiangs18 Xiangs18 changed the title [WIP] add save_genomes add save_genomes Aug 17, 2024
@Xiangs18 Xiangs18 changed the title add save_genomes batch saving genomes Aug 17, 2024
@Xiangs18 Xiangs18 requested a review from MrCreosote August 17, 2024 06:22
Copy link
Member

@MrCreosote MrCreosote left a 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

@Xiangs18 Xiangs18 requested a review from MrCreosote September 10, 2024 23:50
Copy link
Member

@MrCreosote MrCreosote left a 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

Comment on lines -141 to -143
if "AnnotatedMetagenomeAssembly" in ws_datatype:
if params.get('upgrade') or 'feature_counts' not in data:
data = self._update_metagenome(data)
Copy link
Member

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:

#212 (comment)

Copy link
Member

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)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

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?

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

restored

Copy link
Member

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Member

@MrCreosote MrCreosote Aug 27, 2025

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

@Xiangs18 Xiangs18 requested a review from MrCreosote July 16, 2025 19:19
Comment on lines 40 to 41
cls.wsClient.create_workspace({'workspace': cls.wsName})
cls.wsID = cls.dfuClient.ws_name_to_id(cls.wsName)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

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