Skip to content

Commit

Permalink
merge 80
Browse files Browse the repository at this point in the history
  • Loading branch information
VinzentRisch committed Jul 4, 2024
2 parents 71a8da2 + 0bf7f20 commit 060f24d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions q2_amr/amrfinderplus/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from q2_amr.amrfinderplus.types._format import (
AMRFinderPlusDatabaseDirectoryFormat,
AMRFinderPlusDatabaseDirFmt,
ARMFinderPlusAnnotationDirFmt,
ARMFinderPlusAnnotationFormat,
ARMFinderPlusAnnotationsDirFmt,
Expand All @@ -15,7 +15,7 @@
)

__all__ = [
"AMRFinderPlusDatabaseDirectoryFormat",
"AMRFinderPlusDatabaseDirFmt",
"ARMFinderPlusAnnotationFormat",
"ARMFinderPlusAnnotationsDirFmt",
"ARMFinderPlusAnnotationDirFmt",
Expand Down
2 changes: 1 addition & 1 deletion q2_amr/amrfinderplus/types/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _validate_(self, level):
pass


class AMRFinderPlusDatabaseDirectoryFormat(model.DirectoryFormat):
class AMRFinderPlusDatabaseDirFmt(model.DirectoryFormat):
amr_lib = model.File("AMR.LIB", format=TextFormat)
amr_lib_comp = model.FileCollection(r"^AMR\.LIB\.h3.$", format=BinaryFormat)
amrprot = model.File("AMRProt", format=ProteinFASTAFormat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from qiime2.plugin.testing import TestPluginBase

from q2_amr.amrfinderplus.types._format import (
AMRFinderPlusDatabaseDirectoryFormat,
AMRFinderPlusDatabaseDirFmt,
ARMFinderPlusAnnotationDirFmt,
ARMFinderPlusAnnotationFormat,
ARMFinderPlusAnnotationsDirFmt,
Expand All @@ -22,9 +22,7 @@ class TestAMRFinderPlusTypesAndFormats(TestPluginBase):
package = "q2_amr.amrfinderplus.types.tests"

def test_amrfinderplus_database_directory_format_validate_positive(self):
format = AMRFinderPlusDatabaseDirectoryFormat(
self.get_data_path("database"), mode="r"
)
format = AMRFinderPlusDatabaseDirFmt(self.get_data_path("database"), mode="r")
format.validate()

def test_amrfinderplus_annotation_format_validate_positive(self):
Expand Down
6 changes: 3 additions & 3 deletions q2_amr/plugin_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from q2_amr import __version__
from q2_amr.amrfinderplus.types._format import (
AMRFinderPlusDatabaseDirectoryFormat,
AMRFinderPlusDatabaseDirFmt,
ARMFinderPlusAnnotationDirFmt,
ARMFinderPlusAnnotationFormat,
ARMFinderPlusAnnotationsDirFmt,
Expand Down Expand Up @@ -1124,7 +1124,7 @@
)
plugin.register_semantic_type_to_format(
AMRFinderPlusDatabase,
artifact_format=AMRFinderPlusDatabaseDirectoryFormat,
artifact_format=AMRFinderPlusDatabaseDirFmt,
)
plugin.register_semantic_type_to_format(
SampleData[ARMFinderPlusAnnotations],
Expand Down Expand Up @@ -1158,7 +1158,7 @@
CARDReadsKmerAnalysisJSONFormat,
CARDReadsGeneKmerAnalysisDirectoryFormat,
CARDReadsAlleleKmerAnalysisDirectoryFormat,
AMRFinderPlusDatabaseDirectoryFormat,
AMRFinderPlusDatabaseDirFmt,
TextFormat,
BinaryFormat,
ARMFinderPlusAnnotationFormat,
Expand Down

0 comments on commit 060f24d

Please sign in to comment.