From 7c27aa0ab7a66da7c3968711db16fd943d80a8cf Mon Sep 17 00:00:00 2001 From: Pau Andrio Date: Wed, 29 May 2024 11:38:19 +0200 Subject: [PATCH] [FIX] Fix type Hinting --- biobb_gromacs/gromacs/editconf.py | 2 +- biobb_gromacs/gromacs/genion.py | 6 +++--- biobb_gromacs/gromacs/genrestr.py | 2 +- biobb_gromacs/gromacs/gmxselect.py | 11 ++++++----- biobb_gromacs/gromacs/grompp.py | 18 +++++++++--------- biobb_gromacs/gromacs/grompp_mdrun.py | 10 +++++----- biobb_gromacs/gromacs/make_ndx.py | 9 +++++---- biobb_gromacs/gromacs/mdrun.py | 2 +- biobb_gromacs/gromacs/pdb2gmx.py | 8 ++++---- biobb_gromacs/gromacs/solvate.py | 11 ++++++----- biobb_gromacs/gromacs/trjcat.py | 11 ++++++----- biobb_gromacs/gromacs_extra/append_ligand.py | 14 +++++++------- biobb_gromacs/gromacs_extra/ndx2resttop.py | 19 ++++++++++--------- .../unitests/test_gromacs/test_editconf.py | 1 + .../test_gromacs/test_editconf_docker.py | 1 + .../test_gromacs/test_editconf_singularity.py | 1 + .../test/unitests/test_gromacs/test_genion.py | 1 + .../test_gromacs/test_genion_docker.py | 1 + .../test_gromacs/test_genion_singularity.py | 1 + .../unitests/test_gromacs/test_genrestr.py | 1 + .../test_gromacs/test_genrestr_docker.py | 1 + .../test_gromacs/test_genrestr_singularity.py | 1 + .../unitests/test_gromacs/test_gmxselect.py | 1 + .../test_gromacs/test_gmxselect_docker.py | 1 + .../test_gmxselect_singularity.py | 1 + .../test/unitests/test_gromacs/test_grompp.py | 1 + .../test_gromacs/test_grompp_docker.py | 1 + .../test_gromacs/test_grompp_mdrun.py | 1 + .../test_gromacs/test_grompp_mdrun_docker.py | 1 + .../test_grompp_mdrun_singularity.py | 1 + .../test_gromacs/test_grompp_singularity.py | 1 + .../unitests/test_gromacs/test_make_ndx.py | 1 + .../test_gromacs/test_make_ndx_docker.py | 1 + .../test_gromacs/test_make_ndx_singularity.py | 1 + .../test/unitests/test_gromacs/test_mdrun.py | 1 + .../test_gromacs/test_mdrun_docker.py | 1 + .../test_gromacs/test_mdrun_singularity.py | 1 + .../unitests/test_gromacs/test_pdb2gmx.py | 1 + .../test_gromacs/test_pdb2gmx_docker.py | 1 + .../test_gromacs/test_pdb2gmx_singularity.py | 1 + .../unitests/test_gromacs/test_solvate.py | 1 + .../test_gromacs/test_solvate_docker.py | 1 + .../test_gromacs/test_solvate_singularity.py | 1 + .../test/unitests/test_gromacs/test_trjcat.py | 1 + .../test_gromacs/test_trjcat_docker.py | 1 + .../test_gromacs/test_trjcat_singularity.py | 1 + .../test_gromacs_extra/test_append_ligand.py | 1 + .../test_gromacs_extra/test_ndx2resttop.py | 1 + 48 files changed, 99 insertions(+), 59 deletions(-) diff --git a/biobb_gromacs/gromacs/editconf.py b/biobb_gromacs/gromacs/editconf.py index 7cf07ef..40958dd 100755 --- a/biobb_gromacs/gromacs/editconf.py +++ b/biobb_gromacs/gromacs/editconf.py @@ -131,7 +131,7 @@ def launch(self) -> int: self.copy_to_host() # Remove temporal files - self.tmp_files.append(str(self.stage_io_dict.get("unique_dir"))) + self.tmp_files.append(str(self.stage_io_dict.get("unique_dir", ""))) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) diff --git a/biobb_gromacs/gromacs/genion.py b/biobb_gromacs/gromacs/genion.py index dbb0a42..a076ae2 100755 --- a/biobb_gromacs/gromacs/genion.py +++ b/biobb_gromacs/gromacs/genion.py @@ -117,7 +117,7 @@ def launch(self) -> int: top_dir = str(Path(top_file).parent) if self.container_path: - shutil.copytree(top_dir, Path(str(self.stage_io_dict.get("unique_dir"))).joinpath(Path(top_dir).name)) + shutil.copytree(top_dir, Path(str(self.stage_io_dict.get("unique_dir", ""))).joinpath(Path(top_dir).name)) top_file = str(Path(self.container_volume_path).joinpath(Path(top_dir).name, Path(top_file).name)) self.cmd = [str(self.binary_path), 'genion', @@ -156,7 +156,7 @@ def launch(self) -> int: self.copy_to_host() if self.container_path: - top_file = str(Path(str(self.stage_io_dict.get("unique_dir"))).joinpath(Path(top_dir).name, Path(top_file).name)) + top_file = str(Path(str(self.stage_io_dict.get("unique_dir", ""))).joinpath(Path(top_dir).name, Path(top_file).name)) # zip topology fu.log('Compressing topology to: %s' % self.stage_io_dict["out"]["output_top_zip_path"], @@ -164,7 +164,7 @@ def launch(self) -> int: fu.zip_top(zip_file=self.io_dict["out"]["output_top_zip_path"], top_file=top_file, out_log=self.out_log) # Remove temporal files - self.tmp_files.extend([str(self.stage_io_dict.get("unique_dir")), top_dir, str(self.io_dict['in'].get("stdin_file_path"))]) + self.tmp_files.extend([str(self.stage_io_dict.get("unique_dir", "")), top_dir, str(self.io_dict['in'].get("stdin_file_path"))]) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=True) diff --git a/biobb_gromacs/gromacs/genrestr.py b/biobb_gromacs/gromacs/genrestr.py index bff37f2..fd3505e 100755 --- a/biobb_gromacs/gromacs/genrestr.py +++ b/biobb_gromacs/gromacs/genrestr.py @@ -128,7 +128,7 @@ def launch(self) -> int: self.copy_to_host() # Remove temporal files - self.tmp_files.extend([str(self.stage_io_dict.get("unique_dir")), str(self.io_dict['in'].get("stdin_file_path"))]) + self.tmp_files.extend([str(self.stage_io_dict.get("unique_dir", "")), str(self.io_dict['in'].get("stdin_file_path"))]) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) diff --git a/biobb_gromacs/gromacs/gmxselect.py b/biobb_gromacs/gromacs/gmxselect.py index e52bbf1..d8986fa 100755 --- a/biobb_gromacs/gromacs/gmxselect.py +++ b/biobb_gromacs/gromacs/gmxselect.py @@ -3,6 +3,7 @@ """Module containing the Select class and the command line interface.""" import argparse from pathlib import Path +from typing import Optional, Dict from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -53,8 +54,8 @@ class Gmxselect(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ - def __init__(self, input_structure_path: str, output_ndx_path: str, input_ndx_path: str = None, - properties: dict = None, **kwargs) -> None: + def __init__(self, input_structure_path: str, output_ndx_path: str, input_ndx_path: Optional[str] = None, + properties: Optional[Dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -123,12 +124,12 @@ def launch(self) -> int: fu.log(f"Appending {self.io_dict['in'].get('input_ndx_path')} to {self.io_dict['out']['output_ndx_path']}", self.out_log, self.global_log) with open(self.io_dict["out"]["output_ndx_path"], 'a') as out_ndx_file: out_ndx_file.write('\n') - with open(self.io_dict["in"].get("input_ndx_path")) as in_ndx_file: + with open(self.io_dict["in"].get("input_ndx_path", '')) as in_ndx_file: for line in in_ndx_file: out_ndx_file.write(line) # Remove temporal files - self.tmp_files.append(self.stage_io_dict.get("unique_dir")) + self.tmp_files.append(self.stage_io_dict.get("unique_dir", '')) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) @@ -136,7 +137,7 @@ def launch(self) -> int: def gmxselect(input_structure_path: str, output_ndx_path: str, - input_ndx_path: str = None, properties: dict = None, + input_ndx_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: """Create :class:`Gmxselect ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/grompp.py b/biobb_gromacs/gromacs/grompp.py index 85cdcf2..a307fbc 100755 --- a/biobb_gromacs/gromacs/grompp.py +++ b/biobb_gromacs/gromacs/grompp.py @@ -3,7 +3,7 @@ """Module containing the Grompp class and the command line interface.""" import argparse import shutil -from typing import Optional +from typing import Optional, Dict from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings @@ -69,7 +69,7 @@ class Grompp(BiobbObject): def __init__(self, input_gro_path: str, input_top_zip_path: str, output_tpr_path: str, input_cpt_path: Optional[str] = None, input_ndx_path: Optional[str] = None, input_mdp_path: Optional[str] = None, - properties: dict = None, **kwargs) -> None: + properties: Optional[Dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -120,12 +120,12 @@ def launch(self) -> int: self.stage_files() # Unzip topology to topology_out - top_file = fu.unzip_top(zip_file=self.input_top_zip_path, out_log=self.out_log, unique_dir=self.stage_io_dict.get("unique_dir")) + top_file = fu.unzip_top(zip_file=self.input_top_zip_path, out_log=self.out_log, unique_dir=self.stage_io_dict.get("unique_dir", "")) # Create MDP file - self.output_mdp_path = create_mdp(output_mdp_path=str(Path(self.stage_io_dict.get("unique_dir")).joinpath(self.output_mdp_path)), + self.output_mdp_path = create_mdp(output_mdp_path=str(Path(self.stage_io_dict.get("unique_dir", "")).joinpath(self.output_mdp_path)), input_mdp_path=self.io_dict["in"]["input_mdp_path"], - preset_dict=mdp_preset(self.simulation_type), + preset_dict=mdp_preset(str(self.simulation_type)), mdp_properties_dict=self.mdp) # Copy extra files to container: MDP file and topology folder @@ -145,15 +145,15 @@ def launch(self) -> int: if self.stage_io_dict["in"].get("input_cpt_path") and Path(self.stage_io_dict["in"]["input_cpt_path"]).exists(): self.cmd.append('-t') if self.container_path: - shutil.copy2(self.stage_io_dict["in"]["input_cpt_path"], self.stage_io_dict.get("unique_dir")) + shutil.copy2(self.stage_io_dict["in"]["input_cpt_path"], self.stage_io_dict.get("unique_dir", "")) self.cmd.append(str(Path(self.container_volume_path).joinpath(Path(self.stage_io_dict["in"]["input_cpt_path"]).name))) else: self.cmd.append(self.stage_io_dict["in"]["input_cpt_path"]) if self.stage_io_dict["in"].get("input_ndx_path") and Path(self.stage_io_dict["in"]["input_ndx_path"]).exists(): self.cmd.append('-n') if self.container_path: - shutil.copy2(self.stage_io_dict["in"]["input_ndx_path"], self.stage_io_dict.get("unique_dir")) - self.cmd.append(Path(self.container_volume_path).joinpath(Path(self.stage_io_dict["in"]["input_ndx_path"]).name)) + shutil.copy2(self.stage_io_dict["in"]["input_ndx_path"], self.stage_io_dict.get("unique_dir", "")) + self.cmd.append(str(Path(self.container_volume_path).joinpath(Path(self.stage_io_dict["in"]["input_ndx_path"]).name))) else: self.cmd.append(self.stage_io_dict["in"]["input_ndx_path"]) @@ -167,7 +167,7 @@ def launch(self) -> int: self.copy_to_host() # Remove temporal files - self.tmp_files.extend([self.stage_io_dict.get("unique_dir"), 'mdout.mdp']) + self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ''), 'mdout.mdp']) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) diff --git a/biobb_gromacs/gromacs/grompp_mdrun.py b/biobb_gromacs/gromacs/grompp_mdrun.py index 5e80d3d..666c969 100755 --- a/biobb_gromacs/gromacs/grompp_mdrun.py +++ b/biobb_gromacs/gromacs/grompp_mdrun.py @@ -2,7 +2,7 @@ """Module containing the GromppMDrun class and the command line interface.""" import argparse -from typing import Optional +from typing import Optional, Dict from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings @@ -137,14 +137,14 @@ def launch(self) -> int: fu.log('Calling Grompp class', self.out_log, self.global_log) grompp_return_code = grompp(input_gro_path=self.input_gro_path, input_top_zip_path=self.input_top_zip_path, - output_tpr_path=self.output_tpr_path, input_cpt_path=self.input_cpt_path, + output_tpr_path=self.output_tpr_path, input_cpt_path=self.input_cpt_path, # type: ignore input_ndx_path=self.input_ndx_path, input_mdp_path=self.input_mdp_path, properties=self.properties_grompp) fu.log(f'Grompp return code: {grompp_return_code}', self.out_log, self.global_log) if not grompp_return_code: fu.log('Grompp return code is correct. Calling MDRun class', self.out_log, self.global_log) - mdrun_return_code = mdrun(input_tpr_path=self.output_tpr_path, output_trr_path=self.output_trr_path, + mdrun_return_code = mdrun(input_tpr_path=self.output_tpr_path, output_trr_path=self.output_trr_path, # type: ignore output_gro_path=self.output_gro_path, output_edr_path=self.output_edr_path, output_log_path=self.output_log_path, output_xtc_path=self.output_xtc_path, output_cpt_path=self.output_cpt_path, output_dhdl_path=self.output_dhdl_path, @@ -154,7 +154,7 @@ def launch(self) -> int: return 1 # Remove temporal files - self.tmp_files.extend([self.stage_io_dict.get("unique_dir"), Path(self.output_tpr_path).parent]) + self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ''), Path(str(self.output_tpr_path)).parent]) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) @@ -165,7 +165,7 @@ def grompp_mdrun(input_gro_path: str, input_top_zip_path: str, output_trr_path: output_gro_path: str, output_edr_path: str, output_log_path: str, input_cpt_path: Optional[str] = None, input_ndx_path: Optional[str] = None, input_mdp_path: Optional[str] = None, output_xtc_path: Optional[str] = None, output_cpt_path: Optional[str] = None, output_dhdl_path: Optional[str] = None, - output_tpr_path: Optional[str] = None, properties: dict = None, **kwargs) -> int: + output_tpr_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: return GromppMdrun(input_gro_path=input_gro_path, input_top_zip_path=input_top_zip_path, output_trr_path=output_trr_path, output_gro_path=output_gro_path, output_edr_path=output_edr_path, output_log_path=output_log_path, diff --git a/biobb_gromacs/gromacs/make_ndx.py b/biobb_gromacs/gromacs/make_ndx.py index 43e08dd..f507435 100755 --- a/biobb_gromacs/gromacs/make_ndx.py +++ b/biobb_gromacs/gromacs/make_ndx.py @@ -3,6 +3,7 @@ """Module containing the MakeNdx class and the command line interface.""" import argparse from pathlib import Path +from typing import Optional, Dict from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -52,8 +53,8 @@ class MakeNdx(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ - def __init__(self, input_structure_path: str, output_ndx_path: str, input_ndx_path: str = None, - properties: dict = None, **kwargs) -> None: + def __init__(self, input_structure_path: str, output_ndx_path: str, input_ndx_path: Optional[str] = None, + properties: Optional[Dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -122,7 +123,7 @@ def launch(self) -> int: self.copy_to_host() # Remove temporal files - self.tmp_files.extend([self.stage_io_dict.get("unique_dir"), self.io_dict['in'].get("stdin_file_path")]) + self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ""), self.io_dict['in'].get("stdin_file_path", '')]) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) @@ -130,7 +131,7 @@ def launch(self) -> int: def make_ndx(input_structure_path: str, output_ndx_path: str, - input_ndx_path: str = None, properties: dict = None, **kwargs) -> int: + input_ndx_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: """Create :class:`MakeNdx ` class and execute the :meth:`launch() ` method.""" return MakeNdx(input_structure_path=input_structure_path, diff --git a/biobb_gromacs/gromacs/mdrun.py b/biobb_gromacs/gromacs/mdrun.py index 4860c82..ec95880 100755 --- a/biobb_gromacs/gromacs/mdrun.py +++ b/biobb_gromacs/gromacs/mdrun.py @@ -215,7 +215,7 @@ def launch(self) -> int: self.copy_to_host() # Remove temporal files - self.tmp_files.append(self.stage_io_dict.get("unique_dir")) + self.tmp_files.append(self.stage_io_dict.get("unique_dir", "")) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) diff --git a/biobb_gromacs/gromacs/pdb2gmx.py b/biobb_gromacs/gromacs/pdb2gmx.py index 82a5612..b4f6b68 100755 --- a/biobb_gromacs/gromacs/pdb2gmx.py +++ b/biobb_gromacs/gromacs/pdb2gmx.py @@ -3,12 +3,12 @@ """Module containing the Pdb2gmx class and the command line interface.""" import os import argparse +from typing import Optional, Dict from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu from biobb_common.tools.file_utils import launchlogger from biobb_gromacs.gromacs.common import get_gromacs_version -from typing import Optional, Dict class Pdb2gmx(BiobbObject): @@ -141,7 +141,7 @@ def launch(self) -> int: self.copy_to_host() if self.container_path: - internal_top_name = os.path.join(self.stage_io_dict.get("unique_dir"), internal_top_name) + internal_top_name = os.path.join(self.stage_io_dict.get("unique_dir", ""), internal_top_name) # zip topology fu.log('Compressing topology to: %s' % self.io_dict["out"]["output_top_zip_path"], self.out_log, @@ -149,7 +149,7 @@ def launch(self) -> int: fu.zip_top(zip_file=self.io_dict["out"]["output_top_zip_path"], top_file=internal_top_name, out_log=self.out_log) # Remove temporal files - self.tmp_files.extend([self.internal_top_name, self.internal_itp_name, self.stage_io_dict.get("unique_dir"), self.io_dict['in'].get("stdin_file_path")]) + self.tmp_files.extend([self.internal_top_name, self.internal_itp_name, self.stage_io_dict.get("unique_dir", ""), self.io_dict['in'].get("stdin_file_path", "")]) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) @@ -157,7 +157,7 @@ def launch(self) -> int: def pdb2gmx(input_pdb_path: str, output_gro_path: str, output_top_zip_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[Dict] = None, **kwargs) -> int: """Create :class:`Pdb2gmx ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/solvate.py b/biobb_gromacs/gromacs/solvate.py index 7598705..7a6d910 100755 --- a/biobb_gromacs/gromacs/solvate.py +++ b/biobb_gromacs/gromacs/solvate.py @@ -4,6 +4,7 @@ import shutil import argparse from pathlib import Path +from typing import Optional, Dict from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -59,7 +60,7 @@ class Solvate(BiobbObject): """ def __init__(self, input_solute_gro_path: str, output_gro_path: str, input_top_zip_path: str, - output_top_zip_path: str, input_solvent_gro_path: str = None, properties: dict = None, **kwargs) -> None: + output_top_zip_path: str, input_solvent_gro_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -110,7 +111,7 @@ def launch(self) -> int: top_dir = str(Path(top_file).parent) if self.container_path: - shutil.copytree(top_dir, str(Path(self.stage_io_dict.get("unique_dir")).joinpath(Path(top_dir).name))) + shutil.copytree(top_dir, str(Path(self.stage_io_dict.get("unique_dir", "")).joinpath(Path(top_dir).name))) top_file = str(Path(self.container_volume_path).joinpath(Path(top_dir).name, Path(top_file).name)) self.cmd = [self.binary_path, 'solvate', @@ -133,7 +134,7 @@ def launch(self) -> int: self.copy_to_host() if self.container_path: - top_file = str(Path(self.stage_io_dict.get("unique_dir")).joinpath(Path(top_dir).name, Path(top_file).name)) + top_file = str(Path(self.stage_io_dict.get("unique_dir", "")).joinpath(Path(top_dir).name, Path(top_file).name)) # zip topology fu.log('Compressing topology to: %s' % self.stage_io_dict["out"]["output_top_zip_path"], self.out_log, @@ -141,7 +142,7 @@ def launch(self) -> int: fu.zip_top(zip_file=self.io_dict["out"]["output_top_zip_path"], top_file=top_file, out_log=self.out_log) # Remove temporal files - self.tmp_files.extend([self.stage_io_dict.get("unique_dir"), top_dir]) + self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ""), top_dir]) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) @@ -149,7 +150,7 @@ def launch(self) -> int: def solvate(input_solute_gro_path: str, output_gro_path: str, input_top_zip_path: str, - output_top_zip_path: str, input_solvent_gro_path: str = None, properties: dict = None, **kwargs) -> int: + output_top_zip_path: str, input_solvent_gro_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: """Create :class:`Solvate ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/trjcat.py b/biobb_gromacs/gromacs/trjcat.py index cdbbeac..4e12d26 100755 --- a/biobb_gromacs/gromacs/trjcat.py +++ b/biobb_gromacs/gromacs/trjcat.py @@ -5,6 +5,7 @@ import shutil import argparse from pathlib import Path +from typing import Optional, Dict from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -53,8 +54,8 @@ class Trjcat(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ - def __init__(self, input_trj_zip_path: str, output_trj_path: str, properties: dict = None, **kwargs) -> None: - properties: dict = properties or {} + def __init__(self, input_trj_zip_path: str, output_trj_path: str, properties: Optional[Dict] = None, **kwargs) -> None: + properties = properties or {} # Call parent class constructor super().__init__(properties) @@ -104,7 +105,7 @@ def launch(self) -> int: # Copy trajectories to container if self.container_path: for index, trajectory_file_path in enumerate(trj_list): - shutil.copy2(trajectory_file_path, self.stage_io_dict.get("unique_dir")) + shutil.copy2(trajectory_file_path, self.stage_io_dict.get("unique_dir", "")) trj_list[index] = str(Path(self.container_volume_path).joinpath(Path(trajectory_file_path).name)) # Create command line @@ -126,14 +127,14 @@ def launch(self) -> int: self.copy_to_host() # Remove temporal files - self.tmp_files.extend([self.stage_io_dict.get("unique_dir"), trj_dir]) + self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ""), trj_dir]) self.remove_tmp_files() self.check_arguments(output_files_created=True, raise_exception=False) return self.return_code -def trjcat(input_trj_zip_path: str, output_trj_path: str, properties: dict = None, **kwargs) -> int: +def trjcat(input_trj_zip_path: str, output_trj_path: str, properties: Optional[Dict] = None, **kwargs) -> int: """Create :class:`Trjcat ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs_extra/append_ligand.py b/biobb_gromacs/gromacs_extra/append_ligand.py index 796e6fd..6e72e2c 100644 --- a/biobb_gromacs/gromacs_extra/append_ligand.py +++ b/biobb_gromacs/gromacs_extra/append_ligand.py @@ -102,12 +102,12 @@ def launch(self) -> int: if self.io_dict['in'].get("input_posres_itp_path"): top_lines.insert(index+5, '; Ligand position restraints'+'\n') top_lines.insert(index+6, '#ifdef '+self.posres_name+'\n') - top_lines.insert(index+7, '#include "'+str(Path(self.io_dict['in'].get("input_posres_itp_path")).name)+'"\n') + top_lines.insert(index+7, '#include "'+str(Path(self.io_dict['in'].get("input_posres_itp_path", "")).name)+'"\n') top_lines.insert(index+8, '#endif'+'\n') top_lines.insert(index+9, '\n') inside_moleculetype_section = False - with open(self.io_dict['in'].get("input_itp_path")) as itp_file: + with open(self.io_dict['in'].get("input_itp_path", "")) as itp_file: moleculetype_pattern = r'\[ moleculetype \]' for line in itp_file: if re.search(moleculetype_pattern, line): @@ -120,7 +120,7 @@ def launch(self) -> int: molecules_pattern = r'\[ molecules \]' inside_molecules_section = False index_molecule = None - molecule_string = moleculetype+(20-len(moleculetype))*' '+'1'+'\n' + molecule_string = str(moleculetype)+int(20-len(moleculetype))*' '+'1'+'\n' for index, line in enumerate(top_lines): if re.search(molecules_pattern, line): inside_molecules_section = True @@ -138,13 +138,13 @@ def launch(self) -> int: with open(new_top, 'w') as new_top_f: new_top_f.write("".join(top_lines)) - shutil.copy2(self.io_dict['in'].get("input_itp_path"), top_dir) + shutil.copy2(self.io_dict['in'].get("input_itp_path", ""), top_dir) if self.io_dict['in'].get("input_posres_itp_path"): - shutil.copy2(self.io_dict['in'].get("input_posres_itp_path"), top_dir) + shutil.copy2(self.io_dict['in'].get("input_posres_itp_path", ""), top_dir) # zip topology fu.log('Compressing topology to: %s' % self.io_dict['out'].get("output_top_zip_path"), self.out_log, self.global_log) - fu.zip_top(zip_file=self.io_dict['out'].get("output_top_zip_path"), top_file=new_top, out_log=self.out_log) + fu.zip_top(zip_file=self.io_dict['out'].get("output_top_zip_path", ""), top_file=new_top, out_log=self.out_log) # Remove temporal files self.tmp_files.append(top_dir) @@ -155,7 +155,7 @@ def launch(self) -> int: def append_ligand(input_top_zip_path: str, input_itp_path: str, output_top_zip_path: str, - input_posres_itp_path: str = None, properties: dict = None, **kwargs) -> int: + input_posres_itp_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: """Create :class:`AppendLigand ` class and execute the :meth:`launch() ` method.""" return AppendLigand(input_top_zip_path=input_top_zip_path, diff --git a/biobb_gromacs/gromacs_extra/ndx2resttop.py b/biobb_gromacs/gromacs_extra/ndx2resttop.py index d72d2f6..1b73117 100755 --- a/biobb_gromacs/gromacs_extra/ndx2resttop.py +++ b/biobb_gromacs/gromacs_extra/ndx2resttop.py @@ -4,6 +4,7 @@ import fnmatch import argparse from pathlib import Path +from typing import Optional, Dict, Any from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -44,7 +45,7 @@ class Ndx2resttop(BiobbObject): """ def __init__(self, input_ndx_path: str, input_top_zip_path: str, output_top_zip_path: str, - properties: dict = None, **kwargs) -> None: + properties: Optional[Dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -72,11 +73,11 @@ def launch(self) -> int: if self.check_restart(): return 0 - top_file = fu.unzip_top(zip_file=self.io_dict['in'].get("input_top_zip_path"), out_log=self.out_log) + top_file = fu.unzip_top(zip_file=self.io_dict['in'].get("input_top_zip_path", ""), out_log=self.out_log) # Create index list of index file :) - index_dic = {} - lines = open(self.io_dict['in'].get("input_ndx_path")).read().splitlines() + index_dic: Dict[str, Any] = {} + lines = open(self.io_dict['in'].get("input_ndx_path", "")).read().splitlines() for index, line in enumerate(lines): if line.startswith('['): index_dic[line] = index, @@ -86,7 +87,7 @@ def launch(self) -> int: index_dic[label] = index_dic[label][0], index fu.log('Index_dic: '+str(index_dic), self.out_log, self.global_log) - self.ref_rest_chain_triplet_list = [tuple(elem.strip(' ()').replace(' ', '').split(',')) for elem in self.ref_rest_chain_triplet_list.split('),')] + self.ref_rest_chain_triplet_list = [tuple(elem.strip(' ()').replace(' ', '').split(',')) for elem in str(self.ref_rest_chain_triplet_list).split('),')] fu.log('ref_rest_chain_triplet_list: ' + str(self.ref_rest_chain_triplet_list), self.out_log, self.global_log) for reference_group, restrain_group, chain in self.ref_rest_chain_triplet_list: fu.log('Reference group: '+reference_group, self.out_log, self.global_log) @@ -101,7 +102,7 @@ def launch(self) -> int: restrain_group_list = [int(elem) for line in lines[index_dic['[ '+restrain_group+' ]'][0]+1: index_dic['[ '+restrain_group+' ]'][1]] for elem in line.split()] selected_list = [reference_group_list.index(atom)+1 for atom in restrain_group_list] # Creating new ITP with restrictions - with open(self.io_dict['out'].get("output_itp_path"), 'w') as f: + with open(self.io_dict['out'].get("output_itp_path", ''), 'w') as f: fu.log('Creating: '+str(f)+' and adding the selected atoms force constants', self.out_log, self.global_log) f.write('[ position_restraints ]\n') f.write('; atom type fx fy fz\n') @@ -117,11 +118,11 @@ def launch(self) -> int: f.write('\n') f.write('; Include Position restraint file\n') f.write('#ifdef CUSTOM_POSRES\n') - f.write('#include "'+str(Path(self.io_dict['out'].get("output_itp_path")).name)+'"\n') + f.write('#include "'+str(Path(self.io_dict['out'].get("output_itp_path", "")).name)+'"\n') f.write('#endif\n') # zip topology - fu.zip_top(zip_file=self.io_dict['out'].get("output_top_zip_path"), top_file=top_file, out_log=self.out_log) + fu.zip_top(zip_file=self.io_dict['out'].get("output_top_zip_path", ""), top_file=top_file, out_log=self.out_log) # Remove temporal files self.remove_tmp_files() @@ -131,7 +132,7 @@ def launch(self) -> int: def ndx2resttop(input_ndx_path: str, input_top_zip_path: str, output_top_zip_path: str, - properties: dict = None, **kwargs) -> int: + properties: Optional[Dict] = None, **kwargs) -> int: """Create :class:`Ndx2resttop ` class and execute the :meth:`launch() ` method.""" return Ndx2resttop(input_ndx_path=input_ndx_path, diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_editconf.py b/biobb_gromacs/test/unitests/test_gromacs/test_editconf.py index 6c1cdd9..9313f0c 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_editconf.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_editconf.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.editconf import editconf diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_editconf_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_editconf_docker.py index 2abad7e..731bd88 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_editconf_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_editconf_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.editconf import editconf diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_editconf_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_editconf_singularity.py index 4862ca8..6a02a72 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_editconf_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_editconf_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.editconf import editconf import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_genion.py b/biobb_gromacs/test/unitests/test_gromacs/test_genion.py index 2a0e3d8..1bc9bfa 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_genion.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_genion.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.genion import genion # import platform diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_genion_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_genion_docker.py index 4fe56aa..eb20e55 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_genion_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_genion_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.genion import genion diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_genion_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_genion_singularity.py index 6d5216a..eeaaebd 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_genion_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_genion_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.genion import genion import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_genrestr.py b/biobb_gromacs/test/unitests/test_gromacs/test_genrestr.py index 215785a..1c2eab6 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_genrestr.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_genrestr.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.genrestr import genrestr diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_docker.py index c28a6a2..3e8775a 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.genrestr import genrestr diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_singularity.py index 85b199b..41517d4 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_genrestr_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.genrestr import genrestr import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect.py b/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect.py index 7113fb6..829301a 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.gmxselect import gmxselect diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_docker.py index 4a44cea..8e4a6e5 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.gmxselect import gmxselect diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_singularity.py index c701d1f..7f6c2d0 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_gmxselect_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.gmxselect import gmxselect import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_grompp.py b/biobb_gromacs/test/unitests/test_gromacs/test_grompp.py index ea14a43..5a2ab69 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_grompp.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_grompp.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.grompp import grompp from biobb_gromacs.gromacs.common import gmx_check diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_docker.py index 851258c..c68599c 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.grompp import grompp from biobb_gromacs.gromacs.common import gmx_check diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun.py b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun.py index 0bf2227..9d4fa5e 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.grompp_mdrun import grompp_mdrun from biobb_gromacs.gromacs.common import gmx_rms diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_docker.py index ca2f3ac..230efae 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.grompp_mdrun import grompp_mdrun from biobb_gromacs.gromacs.common import gmx_rms diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_singularity.py index 06f6fa1..50a2f6e 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_mdrun_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.grompp_mdrun import grompp_mdrun from biobb_gromacs.gromacs.common import gmx_rms diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_singularity.py index 64b0c9a..f605df0 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_grompp_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_grompp_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.grompp import grompp from biobb_gromacs.gromacs.common import gmx_check diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx.py b/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx.py index 2a643c0..1082181 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.make_ndx import make_ndx diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_docker.py index 5d637af..bffaca7 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.make_ndx import make_ndx diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_singularity.py index 90ff66e..d3ab823 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_make_ndx_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.make_ndx import make_ndx import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_mdrun.py b/biobb_gromacs/test/unitests/test_gromacs/test_mdrun.py index 7a345e2..97b907a 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_mdrun.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_mdrun.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.mdrun import mdrun from biobb_gromacs.gromacs.common import gmx_rms diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_docker.py index 6fb9c34..756e614 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.mdrun import mdrun from biobb_gromacs.gromacs.common import gmx_rms diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_singularity.py index 26ea8a4..011f7ff 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_mdrun_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.mdrun import mdrun from biobb_gromacs.gromacs.common import gmx_rms diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx.py b/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx.py index 9f2be1a..9219c84 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.pdb2gmx import pdb2gmx diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_docker.py index 6c1c43f..73afd26 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.pdb2gmx import pdb2gmx diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_singularity.py index 7a2f392..53b0821 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_pdb2gmx_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.pdb2gmx import pdb2gmx import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_solvate.py b/biobb_gromacs/test/unitests/test_gromacs/test_solvate.py index 21fcca4..feba170 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_solvate.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_solvate.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.solvate import solvate diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_solvate_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_solvate_docker.py index eebd142..26330dc 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_solvate_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_solvate_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.solvate import solvate import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_solvate_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_solvate_singularity.py index c1b05fe..1191db8 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_solvate_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_solvate_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.solvate import solvate import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_trjcat.py b/biobb_gromacs/test/unitests/test_gromacs/test_trjcat.py index c657cd5..4551e27 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_trjcat.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_trjcat.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.trjcat import trjcat diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_docker.py b/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_docker.py index 43e2989..8f80f9f 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_docker.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.trjcat import trjcat diff --git a/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_singularity.py b/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_singularity.py index ff90f07..65ffb92 100644 --- a/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_singularity.py +++ b/biobb_gromacs/test/unitests/test_gromacs/test_trjcat_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs.trjcat import trjcat import pytest diff --git a/biobb_gromacs/test/unitests/test_gromacs_extra/test_append_ligand.py b/biobb_gromacs/test/unitests/test_gromacs_extra/test_append_ligand.py index 89e29aa..ccc825c 100644 --- a/biobb_gromacs/test/unitests/test_gromacs_extra/test_append_ligand.py +++ b/biobb_gromacs/test/unitests/test_gromacs_extra/test_append_ligand.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs_extra.append_ligand import append_ligand diff --git a/biobb_gromacs/test/unitests/test_gromacs_extra/test_ndx2resttop.py b/biobb_gromacs/test/unitests/test_gromacs_extra/test_ndx2resttop.py index 92d3ca7..97b57fa 100644 --- a/biobb_gromacs/test/unitests/test_gromacs_extra/test_ndx2resttop.py +++ b/biobb_gromacs/test/unitests/test_gromacs_extra/test_ndx2resttop.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_gromacs.gromacs_extra.ndx2resttop import Ndx2resttop