Skip to content

Commit

Permalink
change pulling tests from hello looper dev branch instead of dev-deriv
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Mar 21, 2024
1 parent 8d57742 commit c85fa8d
Show file tree
Hide file tree
Showing 62 changed files with 45 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ open_pipelines/
.coverage*
.pytest_cache
.vscode/
/tests/data/hello_looper-dev_derive/.gitignore
/tests/data/hello_looper-dev/.gitignore

# Reserved files for comparison
*RESERVE*
Expand Down
14 changes: 7 additions & 7 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def prep_temp_pep(example_pep_piface_path):

# Get Path to local copy of hello_looper
hello_looper_dir_path = os.path.join(
example_pep_piface_path, "hello_looper-dev_derive"
example_pep_piface_path, "hello_looper-dev"
)

# Make local temp copy of hello_looper
Expand All @@ -217,14 +217,14 @@ def prep_temp_pep_basic(example_pep_piface_path):

# Get Path to local copy of hello_looper
hello_looper_dir_path = os.path.join(
example_pep_piface_path, "hello_looper-dev_derive"
example_pep_piface_path, "hello_looper-dev"
)

# Make local temp copy of hello_looper
d = tempfile.mkdtemp()
shutil.copytree(hello_looper_dir_path, d, dirs_exist_ok=True)

advanced_dir = os.path.join(d, "basic")
advanced_dir = os.path.join(d, "intermediate")
path_to_looper_config = os.path.join(advanced_dir, ".looper.yaml")

return path_to_looper_config
Expand All @@ -235,7 +235,7 @@ def prep_temp_pep_csv(example_pep_piface_path):

# Get Path to local copy of hello_looper
hello_looper_dir_path = os.path.join(
example_pep_piface_path, "hello_looper-dev_derive"
example_pep_piface_path, "hello_looper-dev"
)

# Make local temp copy of hello_looper
Expand Down Expand Up @@ -275,7 +275,7 @@ def prep_temp_pep_pipestat(example_pep_piface_path):
# Get Path to local copy of hello_looper

hello_looper_dir_path = os.path.join(
example_pep_piface_path, "hello_looper-dev_derive"
example_pep_piface_path, "hello_looper-dev"
)

# Make local temp copy of hello_looper
Expand All @@ -294,7 +294,7 @@ def prep_temp_pep_pipestat_advanced(example_pep_piface_path):
# Get Path to local copy of hello_looper

hello_looper_dir_path = os.path.join(
example_pep_piface_path, "hello_looper-dev_derive"
example_pep_piface_path, "hello_looper-dev"
)

# Make local temp copy of hello_looper
Expand All @@ -313,7 +313,7 @@ def prep_temp_pep_pephub(example_pep_piface_path):
# Get Path to local copy of hello_looper

hello_looper_dir_path = os.path.join(
example_pep_piface_path, "hello_looper-dev_derive"
example_pep_piface_path, "hello_looper-dev"
)

# Make local temp copy of hello_looper
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ This repository provides minimal working examples for the [looper pipeline submi

This repository contains examples

1. `/basic` - A basic example pipeline and project.
2. `/pephub` - Example of how to point looper to PEPhub.
3. `/pipestat` - Example of a pipeline that uses pipestat for recording results.
4. `/csv` - How to use a pipeline with a CSV sample table (no YAML config)
1. `/minimal` - A basic example pipeline and project.
2. `/intermediate` - An intermediate example pipeline and project with a couple extra options.
3. `/advanced` - A more advanced example, showcasing the capabilities of Looper.
4. `/pephub` - Example of how to point looper to PEPhub.
5. `/pipestat` - Example of a pipeline that uses pipestat for recording results.
6. `/csv` - How to use a pipeline with a CSV sample table (no YAML config)

Each example contains:

Expand Down
5 changes: 5 additions & 0 deletions tests/data/hello_looper-dev/minimal/.looper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pep_config: project/project_config.yaml # local path to pep config
# pep_config: pepkit/hello_looper:default # you can also use a pephub registry path
output_dir: "results"
pipeline_interfaces:
sample: pipeline/pipeline_interface.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pep_version: 2.0.0
sample_table: sample_annotation.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sample_name,library,file,toggle
frog_1,anySampleType,data/frog_1.txt,1
frog_2,anySampleType,data/frog_2.txt,1
3 changes: 3 additions & 0 deletions tests/data/hello_looper-dev/pephub/pipeline/count_lines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
linecount=`wc -l $1 | sed -E 's/^[[:space:]]+//' | cut -f1 -d' '`
echo "Number of lines: $linecount"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pipeline_name: count_lines
pipeline_type: sample
var_templates:
pipeline: '{looper.piface_dir}/count_lines.sh'
command_template: >
{pipeline.var_templates.pipeline} {sample.file}
4 changes: 4 additions & 0 deletions tests/data/hello_looper-dev/pipestat/data/frog_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ribbit
ribbit
ribbit
CROAK!
7 changes: 7 additions & 0 deletions tests/data/hello_looper-dev/pipestat/data/frog_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ribbit
ribbit
ribbit

ribbit, ribbit
ribbit, ribbit
CROAK!
2 changes: 1 addition & 1 deletion tests/update_test_data.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

branch='dev_derive'
branch='dev'

wget https://github.com/pepkit/hello_looper/archive/refs/heads/${branch}.zip
mv ${branch}.zip data/
Expand Down

0 comments on commit c85fa8d

Please sign in to comment.