From fb4717660ec9c80db60a349134c844f46cc2e4bf Mon Sep 17 00:00:00 2001 From: Brandon Duane Walker Date: Tue, 21 May 2024 13:46:26 -0400 Subject: [PATCH] rename, use docker hash --- .../.bumpversion.cfg | 0 .../rename-residues-mol-tool}/.dockerignore | 0 .../rename-residues-mol-tool}/.gitignore | 0 .../rename-residues-mol-tool}/CHANGELOG.md | 0 .../rename-residues-mol-tool}/Dockerfile | 2 +- .../rename-residues-mol-tool}/README.md | 0 .../rename-residues-mol-tool}/VERSION | 0 .../rename-residues-mol-tool/build-docker.sh | 4 ++ .../rename-residues-mol-tool}/ict.yml | 2 +- .../rename-residues-mol-tool}/pyproject.toml | 3 +- .../rename_residues_mol_0@1@0.cwl} | 2 +- .../mm/utils/rename_residues_mol/__init__.py | 0 .../mm/utils/rename_residues_mol/__main__.py | 0 .../rename_residues_mol.py | 0 .../tests/5umx_ligand.mol2 | 0 .../tests/__init__.py | 0 .../tests/test_rename_residues_mol.py | 44 +++++++++++++++++++ .../build-docker.sh | 4 -- .../tests/test_rename_residues_mol.py | 38 ---------------- 19 files changed, 52 insertions(+), 47 deletions(-) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/.bumpversion.cfg (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/.dockerignore (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/.gitignore (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/CHANGELOG.md (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/Dockerfile (84%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/README.md (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/VERSION (100%) create mode 100755 utils/pre-process/structure-changes/rename-residues-mol-tool/build-docker.sh rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/ict.yml (96%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/pyproject.toml (92%) rename utils/{rename-residues-mol-plugin/rename_residues_mol.cwl => pre-process/structure-changes/rename-residues-mol-tool/rename_residues_mol_0@1@0.cwl} (88%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/src/polus/mm/utils/rename_residues_mol/__init__.py (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/src/polus/mm/utils/rename_residues_mol/__main__.py (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/src/polus/mm/utils/rename_residues_mol/rename_residues_mol.py (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/tests/5umx_ligand.mol2 (100%) rename utils/{rename-residues-mol-plugin => pre-process/structure-changes/rename-residues-mol-tool}/tests/__init__.py (100%) create mode 100644 utils/pre-process/structure-changes/rename-residues-mol-tool/tests/test_rename_residues_mol.py delete mode 100755 utils/rename-residues-mol-plugin/build-docker.sh delete mode 100644 utils/rename-residues-mol-plugin/tests/test_rename_residues_mol.py diff --git a/utils/rename-residues-mol-plugin/.bumpversion.cfg b/utils/pre-process/structure-changes/rename-residues-mol-tool/.bumpversion.cfg similarity index 100% rename from utils/rename-residues-mol-plugin/.bumpversion.cfg rename to utils/pre-process/structure-changes/rename-residues-mol-tool/.bumpversion.cfg diff --git a/utils/rename-residues-mol-plugin/.dockerignore b/utils/pre-process/structure-changes/rename-residues-mol-tool/.dockerignore similarity index 100% rename from utils/rename-residues-mol-plugin/.dockerignore rename to utils/pre-process/structure-changes/rename-residues-mol-tool/.dockerignore diff --git a/utils/rename-residues-mol-plugin/.gitignore b/utils/pre-process/structure-changes/rename-residues-mol-tool/.gitignore similarity index 100% rename from utils/rename-residues-mol-plugin/.gitignore rename to utils/pre-process/structure-changes/rename-residues-mol-tool/.gitignore diff --git a/utils/rename-residues-mol-plugin/CHANGELOG.md b/utils/pre-process/structure-changes/rename-residues-mol-tool/CHANGELOG.md similarity index 100% rename from utils/rename-residues-mol-plugin/CHANGELOG.md rename to utils/pre-process/structure-changes/rename-residues-mol-tool/CHANGELOG.md diff --git a/utils/rename-residues-mol-plugin/Dockerfile b/utils/pre-process/structure-changes/rename-residues-mol-tool/Dockerfile similarity index 84% rename from utils/rename-residues-mol-plugin/Dockerfile rename to utils/pre-process/structure-changes/rename-residues-mol-tool/Dockerfile index 3683352e..6aaf49c1 100644 --- a/utils/rename-residues-mol-plugin/Dockerfile +++ b/utils/pre-process/structure-changes/rename-residues-mol-tool/Dockerfile @@ -1,4 +1,4 @@ -# docker build -f Dockerfile -t mrbrandonwalker/rename_residues_mol_tool . +# docker build -f Dockerfile -t polusai/rename-residues-mol-tool:0.1.0 . FROM condaforge/mambaforge ENV EXEC_DIR="/opt/executables" diff --git a/utils/rename-residues-mol-plugin/README.md b/utils/pre-process/structure-changes/rename-residues-mol-tool/README.md similarity index 100% rename from utils/rename-residues-mol-plugin/README.md rename to utils/pre-process/structure-changes/rename-residues-mol-tool/README.md diff --git a/utils/rename-residues-mol-plugin/VERSION b/utils/pre-process/structure-changes/rename-residues-mol-tool/VERSION similarity index 100% rename from utils/rename-residues-mol-plugin/VERSION rename to utils/pre-process/structure-changes/rename-residues-mol-tool/VERSION diff --git a/utils/pre-process/structure-changes/rename-residues-mol-tool/build-docker.sh b/utils/pre-process/structure-changes/rename-residues-mol-tool/build-docker.sh new file mode 100755 index 00000000..3f8a4d5f --- /dev/null +++ b/utils/pre-process/structure-changes/rename-residues-mol-tool/build-docker.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +version=$( None: + """Test rename_residues_mol.""" + input_mol2_path = "5umx_ligand.mol2" + input_mol2_path_path = Path(__file__).resolve().parent / Path(input_mol2_path) + output_mol2_path = "output.mol2" + rename_residues_mol(input_mol2_path_path, output_mol2_path) + assert Path(output_mol2_path).exists() + + +def test_rename_residues_mol_cwl() -> None: + """Test rename_residues_mol CWL.""" + cwl_file_str = "rename_residues_mol_0@1@0.cwl" + cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) + + # Create a Step instance + rename_residues_step = Step(clt_path=cwl_file) + + # Define input paths + input_mol2_path = Path(__file__).resolve().parent / "5umx_ligand.mol2" + rename_residues_step.input_mol2_path = input_mol2_path + rename_residues_step.output_mol2_path = "system.mol2" + + # Create a Workflow instance + steps = [rename_residues_step] + viz = Workflow(steps, "rename_residues_mol") + + # Run the workflow + viz.run() + + # Check if the expected output file exists + outdir = Path("outdir") + files = list(outdir.rglob("system.mol2")) + + assert ( + files + ), f"The file 'system.mol2' does not exist in any subdirectory of '{outdir}'." diff --git a/utils/rename-residues-mol-plugin/build-docker.sh b/utils/rename-residues-mol-plugin/build-docker.sh deleted file mode 100755 index 441a3fa9..00000000 --- a/utils/rename-residues-mol-plugin/build-docker.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -version=$( None: - """Test rename_residues_mol.""" - input_mol2_path = "5umx_ligand.mol2" - input_mol2_path_path = Path(__file__).resolve().parent / Path(input_mol2_path) - output_mol2_path = "output.mol2" - rename_residues_mol(input_mol2_path_path, output_mol2_path) - assert Path(output_mol2_path).exists() - - -def test_rename_residues_mol_cwl() -> None: - """Test rename_residues_mol CWL.""" - cwl_file_str = "rename_residues_mol.cwl" - cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) - input_to_props = parse_cwl_arguments(cwl_file) - file_path_str = "5umx_ligand.mol2" - file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) - input_to_props["input_mol2_path"]["path"] = file_path - - input_yaml_path = Path("rename_residues_mol.yml") - create_input_yaml(input_to_props, input_yaml_path) - - stdout, stderr = call_cwltool(cwl_file, input_yaml_path) - assert Path("system.mol2").exists()