From 0bf7f205047f7d2d87e7abe7ce0d07b035e54a1a Mon Sep 17 00:00:00 2001 From: VinzentRisch Date: Thu, 4 Jul 2024 13:12:04 +0200 Subject: [PATCH] renamed to dirfmt --- q2_amr/amrfinderplus/types/__init__.py | 4 ++-- q2_amr/amrfinderplus/types/_format.py | 2 +- .../types/tests/test_types_formats_transformers.py | 6 ++---- q2_amr/plugin_setup.py | 6 +++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/q2_amr/amrfinderplus/types/__init__.py b/q2_amr/amrfinderplus/types/__init__.py index 31ef4ea..1e2e7e1 100644 --- a/q2_amr/amrfinderplus/types/__init__.py +++ b/q2_amr/amrfinderplus/types/__init__.py @@ -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", ] diff --git a/q2_amr/amrfinderplus/types/_format.py b/q2_amr/amrfinderplus/types/_format.py index b8f8da8..7f98c71 100644 --- a/q2_amr/amrfinderplus/types/_format.py +++ b/q2_amr/amrfinderplus/types/_format.py @@ -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) diff --git a/q2_amr/amrfinderplus/types/tests/test_types_formats_transformers.py b/q2_amr/amrfinderplus/types/tests/test_types_formats_transformers.py index fdf7351..f413052 100644 --- a/q2_amr/amrfinderplus/types/tests/test_types_formats_transformers.py +++ b/q2_amr/amrfinderplus/types/tests/test_types_formats_transformers.py @@ -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() diff --git a/q2_amr/plugin_setup.py b/q2_amr/plugin_setup.py index 3341c9a..828622b 100644 --- a/q2_amr/plugin_setup.py +++ b/q2_amr/plugin_setup.py @@ -29,7 +29,7 @@ from q2_amr import __version__ from q2_amr.amrfinderplus.types._format import ( - AMRFinderPlusDatabaseDirectoryFormat, + AMRFinderPlusDatabaseDirFmt, BinaryFormat, TextFormat, ) @@ -1116,7 +1116,7 @@ ) plugin.register_semantic_type_to_format( AMRFinderPlusDatabase, - artifact_format=AMRFinderPlusDatabaseDirectoryFormat, + artifact_format=AMRFinderPlusDatabaseDirFmt, ) plugin.register_formats( CARDKmerDatabaseDirectoryFormat, @@ -1142,7 +1142,7 @@ CARDReadsKmerAnalysisJSONFormat, CARDReadsGeneKmerAnalysisDirectoryFormat, CARDReadsAlleleKmerAnalysisDirectoryFormat, - AMRFinderPlusDatabaseDirectoryFormat, + AMRFinderPlusDatabaseDirFmt, TextFormat, BinaryFormat, )