Skip to content

Commit

Permalink
rename, use docker hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Duane Walker authored and misterbrandonwalker committed Aug 5, 2024
1 parent 5965ec4 commit fb47176
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 47 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

version=$(<VERSION)
docker build . -t polusai/rename-residues-mol-tool:${version}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
specVersion: "0.1.0"
name: rename_residues_mol
version: 0.1.0
container: rename-residues-mol-plugin
container: rename-residues-mol-tool
entrypoint:
title: rename_residues_mol
description: Run a python3 script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ packages = [{include = "polus", from = "src"}]
[tool.poetry.dependencies]
python = ">=3.9,<3.12"
typer = "^0.7.0"
cwl-utils = "0.33"
cwltool = "3.1.20240404144621"
sophios = "0.1.1"

[tool.poetry.group.dev.dependencies]
bump2version = "^1.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ baseCommand: ["python", "-m", "polus.mm.utils.rename_residues_mol"]

hints:
DockerRequirement:
dockerPull: mrbrandonwalker/rename_residues_mol_tool
dockerPull: polusai/rename-residues-mol-tool@sha256:6ef6a91b88870bd55e1408efd49828d7be35bdb3656847a943232a52d3cd092a

inputs:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""Tests for rename_residues_mol."""
from pathlib import Path

from polus.mm.utils.rename_residues_mol.rename_residues_mol import rename_residues_mol
from sophios.api.pythonapi import Step
from sophios.api.pythonapi import Workflow


def test_rename_residues_mol() -> 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@[email protected]"
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}'."
4 changes: 0 additions & 4 deletions utils/rename-residues-mol-plugin/build-docker.sh

This file was deleted.

38 changes: 0 additions & 38 deletions utils/rename-residues-mol-plugin/tests/test_rename_residues_mol.py

This file was deleted.

0 comments on commit fb47176

Please sign in to comment.