Skip to content

Commit

Permalink
[CI/CD](conf.yml) Update to new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PauAndrio committed Oct 8, 2024
1 parent df8480b commit 39882d0
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@ traj_comp.xtc

# Pytest
.pytest_cache

# MyPy
.mypy_cache
1 change: 1 addition & 0 deletions biobb_cmip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from . import cmip
name = "biobb_cmip"
__all__ = ["cmip"]
__version__ = "4.2.0"
5 changes: 5 additions & 0 deletions biobb_cmip/cmip/__init__.py
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion biobb_cmip/test/conf.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global_properties:
can_write_console_log: False
can_write_console_log: True
working_dir_path: /tmp/biobb/unitests

cmip_titration:
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions biobb_cmip/test/unitests/test_cmip/test_cmip_run.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# type: ignore
from biobb_common.tools import test_fixtures as fx
from biobb_cmip.cmip.cmip_run import cmip_run

Expand Down
1 change: 1 addition & 0 deletions biobb_cmip/test/unitests/test_cmip/test_cmip_run_docker.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# type: ignore
from biobb_common.tools import test_fixtures as fx
from biobb_cmip.cmip.cmip_run import cmip_run

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions biobb_cmip/test/unitests/test_cmip/test_cmip_titration.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# type: ignore
from biobb_common.tools import test_fixtures as fx
from biobb_cmip.cmip.cmip_titration import cmip_titration

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# type: ignore
from biobb_common.tools import test_fixtures as fx
from biobb_cmip.cmip.cmip_titration import cmip_titration

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
20 changes: 10 additions & 10 deletions jupyter_notebook/Test_CMIP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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])"
Expand All @@ -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])"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -44,5 +44,5 @@
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Operating System :: Unix"
),
],
)

0 comments on commit 39882d0

Please sign in to comment.