Skip to content

Commit

Permalink
refactor duplicate
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 8e162a8
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 36 deletions.
33 changes: 0 additions & 33 deletions utils/duplicate-plugin/tests/test_duplicate.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
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: duplicate
version: 0.1.0
container: duplicate-plugin
container: duplicate-tool
entrypoint:
title: duplicate
description: Duplicates a pdbqt file n times, where n is the length of another array.
author: Data Scientist
contact: [email protected]
author: Brandon Walker, Nazanin Donyapour
contact: [email protected], [email protected]
repository:
documentation:
citation:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Tests for duplicate."""
from pathlib import Path

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


def test_duplicate() -> None:
"""Test pdb."""
# Define paths and input properties
cwl_file_str = "duplicate_0@[email protected]"
cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str)
input_pdbqt_singleton_path = Path(__file__).resolve().parent / Path(
"1msn_protein.pdb",
)
repeats = 2

# Create the CWL step
duplicate_step = Step(clt_path=cwl_file)
duplicate_step.input_pdbqt_singleton_path = input_pdbqt_singleton_path

# Prepare the input_pdbqt_array_path with duplicates
file_dict = {"path": str(input_pdbqt_singleton_path)}
duplicate_step.input_pdbqt_array_path = [file_dict.copy() for _ in range(repeats)]

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

# cant capture stdout to check status

0 comments on commit 8e162a8

Please sign in to comment.