Skip to content

Commit

Permalink
MRG: fix installation documentation (#15)
Browse files Browse the repository at this point in the history
* fix install and test stuff

* fix INSTALL
  • Loading branch information
ctb authored Apr 5, 2023
1 parent 67ec393 commit b03164e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
41 changes: 38 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
# Installing mdbook
# Installing software to build & test this book

## Create conda environment with base software

```
mamba create -n mdbook -y rust snakemake-minimal pandas sourmash
```

and activate:
```
mamba activate mdbook
```

## Clone the repository

```
cd ~/
git clone https://github.com/ngs-docs/2023-snakemake-book-draft
cd 2023-snakemake-book-draft
```

## Install mdbook & plugins:

We use [mdbook](https://github.com/rust-lang/mdBook) as well as
[mdbook-admonish](https://github.com/tommilligan/mdbook-admonish) and
[mdbook-cmdrun](https://crates.io/crates/mdbook-cmdrun).

```
cargo install mdbook mdbook-admonish mdbook-cmdrun
```

## Build book

We use [mdbook-admonish](https://github.com/tommilligan/mdbook-admonish):
```
cargo install mdbook-admonish
make
```

## Run snakemake tests

```
make test
```
2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on_failure = "bail"
[output.html]
additional-css = ["./extra/mdbook-admonish.css"]

[output.linkcheck]
#[output.linkcheck]

[preprocessor.cmdrun]

Expand Down
6 changes: 3 additions & 3 deletions code/examples/wildcards.basic_constrain/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ print(this_dir_files)
print(prefix_only)
print(prefix_and_dir_only)

assert all_files == ['file1.subset', 'file1', 'subdir/file2', 'subdir/file2.subset', 'subdir/nested/file3']
assert this_dir_files == ['file1.subset', 'file1']
assert prefix_only == ['file1', 'subdir/file2', 'subdir/nested/file3']
assert set(all_files) == { 'file1.subset', 'file1', 'subdir/file2', 'subdir/file2.subset', 'subdir/nested/file3' }
assert set(this_dir_files) == { 'file1.subset', 'file1' }
assert set(prefix_only) == { 'file1', 'subdir/file2', 'subdir/nested/file3' }
assert prefix_and_dir_only == ['file1']

0 comments on commit b03164e

Please sign in to comment.