Skip to content

Commit

Permalink
renamed to dirfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
VinzentRisch committed Jul 4, 2024
1 parent 317e5cb commit 0bf7f20
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,13 +6,13 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from q2_amr.amrfinderplus.types._format import (
AMRFinderPlusDatabaseDirectoryFormat,
AMRFinderPlusDatabaseDirFmt,
BinaryFormat,
TextFormat,
)

__all__ = [
"AMRFinderPlusDatabaseDirectoryFormat",
"AMRFinderPlusDatabaseDirFmt",
"TextFormat",
"BinaryFormat",
]
2 changes: 1 addition & 1 deletion q2_amr/amrfinderplus/types/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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 @@ -7,14 +7,12 @@
# ----------------------------------------------------------------------------
from qiime2.plugin.testing import TestPluginBase

from q2_amr.amrfinderplus.types._format import AMRFinderPlusDatabaseDirectoryFormat
from q2_amr.amrfinderplus.types._format import AMRFinderPlusDatabaseDirFmt


class TestAMRFinderPlusDatabaseTypesAndFormats(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()
6 changes: 3 additions & 3 deletions q2_amr/plugin_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

from q2_amr import __version__
from q2_amr.amrfinderplus.types._format import (
AMRFinderPlusDatabaseDirectoryFormat,
AMRFinderPlusDatabaseDirFmt,
BinaryFormat,
TextFormat,
)
Expand Down Expand Up @@ -1116,7 +1116,7 @@
)
plugin.register_semantic_type_to_format(
AMRFinderPlusDatabase,
artifact_format=AMRFinderPlusDatabaseDirectoryFormat,
artifact_format=AMRFinderPlusDatabaseDirFmt,
)
plugin.register_formats(
CARDKmerDatabaseDirectoryFormat,
Expand All @@ -1142,7 +1142,7 @@
CARDReadsKmerAnalysisJSONFormat,
CARDReadsGeneKmerAnalysisDirectoryFormat,
CARDReadsAlleleKmerAnalysisDirectoryFormat,
AMRFinderPlusDatabaseDirectoryFormat,
AMRFinderPlusDatabaseDirFmt,
TextFormat,
BinaryFormat,
)
Expand Down

0 comments on commit 0bf7f20

Please sign in to comment.