diff --git a/.gitignore b/.gitignore index 10e2fec..b74d7cd 100755 --- a/.gitignore +++ b/.gitignore @@ -117,3 +117,6 @@ traj_comp.xtc # Pytest .pytest_cache + +# MyPy +.mypy_cache \ No newline at end of file diff --git a/biobb_cmip/__init__.py b/biobb_cmip/__init__.py index fda695e..7e7cc0a 100644 --- a/biobb_cmip/__init__.py +++ b/biobb_cmip/__init__.py @@ -1,3 +1,4 @@ +from . import cmip name = "biobb_cmip" __all__ = ["cmip"] __version__ = "4.2.0" diff --git a/biobb_cmip/cmip/__init__.py b/biobb_cmip/cmip/__init__.py index b1671b6..64094d4 100755 --- a/biobb_cmip/cmip/__init__.py +++ b/biobb_cmip/cmip/__init__.py @@ -1,2 +1,7 @@ +from . import cmip_titration +from . import cmip_run +from . import cmip_prepare_structure +from . import cmip_prepare_pdb +from . import cmip_ignore_residues name = "cmip" __all__ = ["cmip_titration", "cmip_run", "cmip_prepare_structure", "cmip_prepare_pdb", "cmip_ignore_residues"] diff --git a/biobb_cmip/test/conf.yml b/biobb_cmip/test/conf.yml index 8331917..b52e911 100644 --- a/biobb_cmip/test/conf.yml +++ b/biobb_cmip/test/conf.yml @@ -1,5 +1,5 @@ global_properties: - can_write_console_log: False + can_write_console_log: True working_dir_path: /tmp/biobb/unitests cmip_titration: diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_ignore_residues.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_ignore_residues.py index 57c6464..81fa557 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_ignore_residues.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_ignore_residues.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_ignore_residues import cmip_ignore_residues diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_pdb.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_pdb.py index 8cc53ac..9a57f96 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_pdb.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_pdb.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_prepare_pdb import cmip_prepare_pdb diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_structure.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_structure.py index 88fe40c..1e1cda4 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_structure.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_prepare_structure.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_prepare_structure import cmip_prepare_structure diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_run.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_run.py index bce3d55..88daa47 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_run.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_run.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_run import cmip_run diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_run_docker.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_run_docker.py index de39c8d..774cafd 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_run_docker.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_run_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_run import cmip_run diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_run_singularity.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_run_singularity.py index d654b0b..4603ed9 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_run_singularity.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_run_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_run import cmip_run import pytest diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_titration.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_titration.py index a964cf1..5e960a6 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_titration.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_titration.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_titration import cmip_titration diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_docker.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_docker.py index 935e9fb..764e344 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_docker.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_docker.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_titration import cmip_titration diff --git a/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_singularity.py b/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_singularity.py index c374920..873c622 100644 --- a/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_singularity.py +++ b/biobb_cmip/test/unitests/test_cmip/test_cmip_titration_singularity.py @@ -1,3 +1,4 @@ +# type: ignore from biobb_common.tools import test_fixtures as fx from biobb_cmip.cmip.cmip_titration import cmip_titration import pytest diff --git a/jupyter_notebook/Test_CMIP.ipynb b/jupyter_notebook/Test_CMIP.ipynb index 8d97aa4..105496b 100644 --- a/jupyter_notebook/Test_CMIP.ipynb +++ b/jupyter_notebook/Test_CMIP.ipynb @@ -20,7 +20,7 @@ "source": [ "import pytraj as pt\n", "\n", - "input_topology_filename=\"/Users/pau/projects/biobb_cmip/biobb_cmip/test/data/cmip/egfr_topology.zip\"\n", + "input_topology_filename=\"biobb_cmip/biobb_cmip/test/data/cmip/egfr_topology.zip\"\n", "top_file = fu.unzip_top(zip_file=input_topology_filename)\n", "\n", "topology = pt.load_topology(filename=top_file)\n", @@ -94,7 +94,7 @@ " return str(file_path)\n", "\n", "\n", - "input_topology_filename=\"/Users/pau/projects/biobb_cmip/biobb_cmip/test/data/cmip/egfr_topology.zip\"\n", + "input_topology_filename=\"biobb_cmip/biobb_cmip/test/data/cmip/egfr_topology.zip\"\n", "top_file = fu.unzip_top(zip_file=input_topology_filename)\n", "\n", "with open(top_file) as tf:\n", @@ -140,10 +140,10 @@ "source": [ "import functools\n", "import math\n", - " \n", - "if functools.reduce(lambda x, y : x and y, map(lambda p, q: math.isclose(p,q, abs_tol=0.0001),pt_charges,mda_charges), True): \n", - " print (\"The lists l1 and l2 are the same\") \n", - "else: \n", + "\n", + "if functools.reduce(lambda x, y : x and y, map(lambda p, q: math.isclose(p,q, abs_tol=0.0001),pt_charges,mda_charges), True):\n", + " print (\"The lists l1 and l2 are the same\")\n", + "else:\n", " print (\"The lists l1 and l2 are not the same\")\n", "print(pt_charges[:10])\n", "print(mda_charges[:10])" @@ -168,10 +168,10 @@ "source": [ "import functools\n", "import math\n", - " \n", - "if functools.reduce(lambda x, y : x and y, map(lambda p, q: p == q,pt_atom_types,mda_atom_types), True): \n", - " print (\"The lists l1 and l2 are the same\") \n", - "else: \n", + "\n", + "if functools.reduce(lambda x, y : x and y, map(lambda p, q: p == q,pt_atom_types,mda_atom_types), True):\n", + " print (\"The lists l1 and l2 are the same\")\n", + "else:\n", " print (\"The lists l1 and l2 are not the same\")\n", "print(pt_atom_types[:10])\n", "print(mda_atom_types[:10])" diff --git a/setup.py b/setup.py index e256bd4..2d05e31 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ "cmip_ignore_residues = biobb_cmip.cmip.cmip_ignore_residues:main" ] }, - classifiers=( + classifiers=[ "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -44,5 +44,5 @@ "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: Unix" - ), + ], )