Skip to content

Commit

Permalink
refactor array indices
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 b3f4953 commit 0cd6a41
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 31 deletions.
26 changes: 0 additions & 26 deletions utils/array-indices-plugin/tests/test_array_indices.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: array_indices
version: 0.1.0
container: array-indices-plugin
container: array-indices-tool
entrypoint:
title: array_indices
description: return a subset from a array based on input indices
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
Expand Up @@ -8,8 +8,7 @@ readme = "README.md"
[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
@@ -0,0 +1,26 @@
"""Tests for array_indices."""
from pathlib import Path

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


def test_array_indices() -> None:
"""Test array_indices."""
# Define paths and input properties
cwl_file_str = "array_indices_0@[email protected]"
cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str)
input_props = {"input_indices": [1, 3], "input_array": [1, 2, 3, 4, 5]}

# Create the CWL step
array_indices_step = Step(clt_path=cwl_file)
array_indices_step.input_indices = input_props["input_indices"]
array_indices_step.input_array = input_props["input_array"]

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

# cant process the output since no way to grab stdout

0 comments on commit 0cd6a41

Please sign in to comment.