Skip to content

Commit

Permalink
refactor extract-model-pdbqt
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Duane Walker authored and misterbrandonwalker committed Jul 30, 2024
1 parent 23fb84d commit f5d197f
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 27 deletions.
24 changes: 0 additions & 24 deletions utils/extract-model-pdbqt-plugin/tests/test_extract_model_pdbqt.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
specVersion: "0.1.0"
name: extract_model_pdbqt
version: 0.1.0
container: extract-model-pdbqt-plugin
container: extract-model-pdbqt-tool
entrypoint:
title: extract_model_pdbqt
description: Extracts a model from a PDBQT file with several models.
author: Data Scientist
contact: [email protected]
author: Brandon Walker, Nazanin Donyapour
contact: [email protected], [email protected]
repository:
documentation:
citation:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Tests for extract_model_pdbqt."""
from pathlib import Path

from sophios.api.pythonapi import Step
from sophios.api.pythonapi import Workflow


def test_extract_model_pdbqt() -> None:
"""Test extract_model_pdbqt."""
# Define paths and input properties
cwl_file_str = "extract_model_pdbqt_0@[email protected]"
cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str)
input_pdbqt_path = Path(__file__).resolve().parent / Path("models.pdbqt")

# Create the CWL step
extract_model_pdbqt_step = Step(clt_path=cwl_file)
extract_model_pdbqt_step.input_pdbqt_path = input_pdbqt_path
extract_model_pdbqt_step.output_pdbqt_path = "system.pdbqt"

# Create the workflow and run it
steps = [extract_model_pdbqt_step]
filename = "extract_model_pdbqt_workflow"
workflow = Workflow(steps, filename)
workflow.run()

# Check for the expected output file
outdir = Path("outdir")
files = list(outdir.rglob("system.pdbqt"))

assert (
files
), f"The file 'system.pdbqt' does not exist in any subdirectory of '{outdir}'."

0 comments on commit f5d197f

Please sign in to comment.