Skip to content
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

fix #3300 #3309

Merged
merged 6 commits into from
Aug 7, 2023
Merged

fix #3300 #3309

merged 6 commits into from
Aug 7, 2023

Conversation

antgonza
Copy link
Member

@antgonza antgonza commented Aug 5, 2023

No description provided.

@coveralls
Copy link

coveralls commented Aug 5, 2023

Coverage Status

coverage: 92.924% (-0.01%) from 92.934%
when pulling ab4ecbc on antgonza:fix-3300
into a412b45 on qiita-spots:dev.

Copy link
Contributor

@charles-cowart charles-cowart left a comment

Choose a reason for hiding this comment

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

Looks good! One possible suggestion.

# If the investigation_type is None let's add it based on the
# data_type being created - if possible
if investigation_type is None:
if data_type_str in {'16S', '18S', 'ITS'}:
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be good to do this as an enumerated type like we do in metapool and whatnot, but I can go either way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean like this: https://docs.python.org/3/library/enum.html ? If not, what do you mean? Also, I'm not sure of the benefits of going that route, could you expand?

Copy link
Contributor

Choose a reason for hiding this comment

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

We usually do it like this: https://github.com/charles-cowart/metagenomics_pooling_notebook/blob/1fa87c859735289a8922d8906b2289e0993f935e/metapool/metapool.py#L16 but perhaps using Enum would be better.

It's something Daniel asks a lot for. My take on it is that it makes it easier to add/change to the list.

Copy link
Contributor

Choose a reason for hiding this comment

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

Under the DRY principle, unless this type of test is truly only done once ever

Copy link
Member Author

Choose a reason for hiding this comment

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

Got it! ... and that comment made me remember TARGET_GENE_DATA_TYPES; changing for that.

@charles-cowart charles-cowart merged commit 45fa66a into qiita-spots:dev Aug 7, 2023
4 checks passed
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.

4 participants