Skip to content

Commit

Permalink
src: library rearrange
Browse files Browse the repository at this point in the history
make lib not have actual functions, and add integration_tests
  • Loading branch information
ktmeaton committed Nov 30, 2023
1 parent 7fab6d0 commit ba4f5f0
Show file tree
Hide file tree
Showing 35 changed files with 1,124 additions and 865 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ jobs:
- name: validate
run: |
${{ env.RUN_CMD }} run --dataset-dir dataset/sars-cov-2/latest --output-dir validate --populations "*" --threads 2
${{ env.RUN_CMD }} run --dataset-dir dataset/sars-cov-2/latest --output-dir output/validate --populations "*" --threads 2
if [[ $(grep "fail" validate/linelist.tsv) ]]; then exit 1; fi
- name: plot
run: |
${{ env.RUN_CMD }} plot --dataset-dir dataset/sars-cov-2/latest --output-dir validate --plot-dir validate/plots
${{ env.RUN_CMD }} plot --dataset-dir dataset/sars-cov-2/latest --run-dir output/validate
- name: upload
uses: actions/upload-artifact@v3
with:
name: validate-${{ matrix.arch }}
path: validate
path: output/validate
if-no-files-found: error
retention-days: 7
7 changes: 4 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,18 @@ jobs:
- name: example 1
run: |
${{ env.RUN_CMD }} run --dataset-dir dataset/sars-cov-2/${{ env.DATASET_TAG }} --output-dir output/example1 --populations "AY.4.2*,BA.5.2,XBC.1.6*,XBB.1.5.1,XBL"
${{ env.RUN_CMD }} plot --dataset-dir dataset/sars-cov-2/${{ env.DATASET_TAG }} --output-dir output/example1
${{ env.RUN_CMD }} plot --dataset-dir dataset/sars-cov-2/${{ env.DATASET_TAG }} --run-dir output/example1
- name: example 2
run: |
${{ env.RUN_CMD }} run --dataset-dir dataset/sars-cov-2/${{ env.DATASET_TAG }} --output-dir output/example2 --alignment data/example2.fasta
${{ env.RUN_CMD }} plot --dataset-dir dataset/sars-cov-2/${{ env.DATASET_TAG }} --output-dir output/example2
${{ env.RUN_CMD }} plot --dataset-dir dataset/sars-cov-2/${{ env.DATASET_TAG }} --run-dir output/example2
- name: toy1
run: |
${{ env.RUN_CMD }} dataset download --output-dir dataset/toy1 --name toy1 --tag custom
${{ env.RUN_CMD }} run --dataset-dir dataset/toy1 --output-dir output/toy1 --populations "*" --mask 0,0 --min-length 1
${{ env.RUN_CMD }} plot --dataset-dir dataset/toy1 --output-dir output/toy1
${{ env.RUN_CMD }} plot --dataset-dir dataset/toy1 --run-dir output/toy1
- name: upload output
uses: actions/upload-artifact@v3
Expand Down
66 changes: 16 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rebar"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

[dependencies]
Expand All @@ -15,7 +15,7 @@ indicatif = { version = "0.17.5", default-features = false, features = ["
indoc = { version = "2.0.4", default-features = false }
itertools = { version = "0.12.0", default-features = false, features = ["use_std"] }
log = { version = "0.4.17", default-features = false }
openssl = { version = "0.10.59", default-features = false, features = ["vendored"]}
openssl = { version = "0.10.60", default-features = false, features = ["vendored"]}
petgraph = { version = "0.6.3", default-features = false, features = ["serde-1"] }
raqote = { version = "0.8.2", default-features = false, features = ["png"]}
rand = { version = "0.8.5", default-features = false }
Expand All @@ -27,7 +27,7 @@ semver = { version = "1.0.19", default-features = false, features = ["
serde = { version = "1.0.163", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.96", default-features = false }
strum = { version = "0.25", default-features = false, features = ["derive"] }
tempfile = { version = "3.5.0", default-features = false }
tempfile = { version = "3.8.1", default-features = false }
tokio = { version = "1.28.1", default-features = false, features = ["macros", "rt-multi-thread"] }
zstd = { version = "0.13.0", default-features = false }

Expand Down
50 changes: 46 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ wget -O rebar https://github.com/phac-nml/rebar/releases/download/v0.1.3/rebar-x

## Usage

1. Download a dataset, version-controlled to a specific date.
1. Preview pre-built datasets.

```bash
rebar dataset list
```

1. Download a pre-built dataset, version-controlled to a specific date (try any date!).

```bash
rebar dataset download --name sars-cov-2 --tag 2023-11-17 --output-dir dataset/sars-cov-2/2023-11-17
Expand Down Expand Up @@ -135,7 +141,7 @@ Special thanks go to the following people, who are instrumental to the design an
</tr>
</table>

Thanks go to the following people, who participated in the development of [ncov-recombinant](https://github.com/ktmeaton/ncov-recombinant), which `rebar` is based on:
Thanks go to the following people, who participated in the development of `rebar` and [ncov-recombinant](https://github.com/ktmeaton/ncov-recombinant):

<table>
<tr>
Expand All @@ -157,11 +163,47 @@ Thanks go to the following people, who participated in the development of [ncov-
<a href="https://github.com/yatisht/usher" title="Data: UShER">🔣</a>
<a href="https://github.com/yatisht/usher" title="Ideas: UShER">🤔</a>
</td>
<td align="center"><a href="https://www.inspq.qc.ca/en/auteurs/2629/all"><img src="https://i1.rgstatic.net/ii/profile.image/278724097396748-1443464411327_Q128/Benjamin-Delisle.jpg?s=100" width="100px;" alt=""/><br /><sub><b>Benjamin Delisle</b></sub></a><br /><a href="https://github.com/phac-nml/rebar/issues?q=author%3Abenjamindeslisle" title="Bug eports">🐛</a> <a href="https://github.com/phac-nml/rebar/commits?author=benjamindeslisle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://www.inspq.qc.ca/en/auteurs/2629/all"><img src="https://i1.rgstatic.net/ii/profile.image/278724097396748-1443464411327_Q128/Benjamin-Delisle.jpg?s=100" width="100px;" alt=""/><br /><sub><b>Benjamin Delisle</b></sub></a><br /><a href="https://github.com/phac-nml/rebar/issues?q=author%3Abenjamindeslisle" title="Bug reports">🐛</a> <a href="https://github.com/phac-nml/rebar/commits?author=benjamindeslisle" title="Tests">⚠️</a></td>
<td align="center"><a href="https://ca.linkedin.com/in/dr-vani-priyadarsini-ikkurti-4a2ab676"><img src="https://media-exp1.licdn.com/dms/image/C5603AQHaG8Xx4QLXSQ/profile-displayphoto-shrink_200_200/0/1569339145568?e=2147483647&v=beta&t=3WrvCciW-x8J3Aw4JHGrWOpuqiikrrGV2KsDaISnHIw" width="100px;" alt=""/><br /><sub><b>Vani Priyadarsini Ikkurthi</b></sub></a><br /><a href="https://github.com/phac-nml/rebar/issues?q=author%3Avanipriyadarsiniikkurthi" title="Bug reports">🐛</a> <a href="https://github.com/phac-nml/rebar/commits?author=vanipriyadarsiniikkurthi" title="Tests">⚠️</a></td>
<td align="center"><a href="https://ca.linkedin.com/in/mark-horsman-52a14740"><img src="https://ui-avatars.com/api/?name=Mark+Horsman?s=100" width="100px;" alt=""/><br /><sub><b>Mark Horsman</b></sub></a><br /><a href="#ideas-markhorsman" title="Ideas, Planning, & Feedback">🤔</a> <a href="#design-markhorsman" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/dfornika"><img src="https://avatars.githubusercontent.com/u/145659?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dan Fornika</b></sub></a><br /><a href="#ideas-dfornika" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/phac-nml/rebar/commits?author=dfornika" title="Tests">⚠️</a></td>
<td align="center"><img src="https://ui-avatars.com/api/?name=Tara+Newman?s=100" width="100px;" alt=""/><br /><sub><b>Tara Newman</b></sub><br /><a href="#ideas-TaraNewman" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/phac-nml/rebar/commits?author=TaraNewman" title="Tests">⚠️</a></td>
</tr>
</tr>
<td align="center">
<a href="https://github.com/TheZetner"><img src="https://avatars.githubusercontent.com/u/11616351?v=4s=100" width="100px;" alt=""/>
<br />
<sub><b>Adrian Zetner</b></sub>
</a>
<br />
<a href="" title="Code Review">🔣</a>
<a href="r" title="Ideas">🤔</a>
</td>
<td align="center">
<a href="https://github.com/ConnorChato"><img src="https://avatars.githubusercontent.com/u/24962136?v=4?s=100" width="100px;" alt=""/>
<br />
<sub><b>Connor Chato</b></sub>
</a>
<br />
<a href="" title="Code Review">🔣</a>
<a href="r" title="Ideas">🤔</a>
</td>
<td align="center">
<a href="https://github.com/mattheww95"><img src="https://avatars.githubusercontent.com/u/76452933?v=4?s=100" width="100px;" alt=""/>
<br />
<sub><b>Matthew Wells</b></sub>
</a>
<br />
<a href="r" title="Cross-Platoform Compilation">📦</a>
</td>
<td align="center">
<a href="https://github.com/AndreaTy"><img src="https://ui-avatars.com/api/?name=AndreaTyler?s=100" width="100px;" alt=""/>
<br />
<sub><b>Andrea Tyler</b></sub>
</a>
<br />
<a href="" title="Code Review">🔣</a>
</td>
<tr>

</tr>
</table>
50 changes: 0 additions & 50 deletions dataset/toy1/phylogeny.json

This file was deleted.

6 changes: 0 additions & 6 deletions dataset/toy1/populations.fasta

This file was deleted.

2 changes: 0 additions & 2 deletions dataset/toy1/reference.fasta

This file was deleted.

Loading

0 comments on commit ba4f5f0

Please sign in to comment.