Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first of multiple PR that are going to implement all the functionality included in the giant PR #1021.
I split the
metadata_template.py
file in 5 files (similarly for the test code):metadata_template/base_metadata_template.py
: base classesmetadata_template/sample_template.py
:Sample
andSampleTemplate
classesmetadata_template/prep_template.py
:PrepSample
andPrepTemplate
classesmetadata_template/util.py
: All util functionsmetadata_template/constants.py
: Hold constant values. This will be useful in the refactor, although it looks silly now.I wanted to modify the minimal amount of code but I had to made a couple of changes:
metadata_template/util.py
had a leading underscores on their name because they're private to the module. Since now they live in their own module, I remove that leading underscore (just a name change)create_qiime_mapping_file
in thePrepTemplate
class was using theSampleTemplate
class. I changed this lines:to
to avoid the circular import.
More changes are required in the metadata template, I will start submitting PR based on this one starting tomorrow, so having this merged is important.