Skip to content

Commit 0a54458

Browse files
authored
fix: added docs for new catalog features and better error catching for snakevision (#74)
* docs: added missing info about new features * fix: catch very verbose errors from dagviz in case we encounter cyclic DAGs * fix: typo
1 parent edd6b5f commit 0a54458

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Once included in the standardized usage area you can link directly to the workfl
5959
Each standardized workflow has its own page, which is linked on the summary tables or the 'top workflows' tiles.
6060
Workflow pages are **enhanced by information automatically parsed** from their Github repositories. Right now this includes:
6161

62-
1. **Tube Maps**: A graphical representation of the workflow rulegraph, build using [snakevision](https://github.com/OpenOmics/snakevision).
62+
1. **Tube Maps**: A graphical representation of the workflow rulegraph, built using [snakevision](https://github.com/OpenOmics/snakevision).
6363
Tube maps will automatically show up on your workflow page if the following command can be run for your workflow: `snakemake -s <snakefile> -c 1 -d .test --forceall --rulegraph`.
6464
This means, you need to have a working test case defined in the `.test` sub-dir.
6565

source/build_wf_pages.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ def plot_rulegraph(output: Path, rg_dot: str) -> list[str]:
8080
sp.run(
8181
snakevision_cmd + styles[style] + ["-o", str(svgfile)] + [str(dotfile)],
8282
check=True,
83+
capture_output=True,
8384
)
84-
except sp.CalledProcessError:
85+
except sp.CalledProcessError as e:
86+
stderr = e.stderr.decode(errors="replace") if e.stderr else ""
87+
if "NetworkXUnfeasible" in stderr:
88+
print(f"Skipping rulegraph for {output.name}: graph layout not feasible (probably cyclic).")
8589
return []
8690
output_files.append(svgfile.name)
8791
return output_files

source/docs/about/adding_workflows.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Adding workflows
32

43
Workflows are **automatically added** to the Workflow Catalog. This is done by regularly searching Github repositories for matching workflow structures. The catalog includes workflows based on the following criteria.
@@ -12,7 +11,7 @@ Workflows are **automatically added** to the Workflow Catalog. This is done by r
1211
- The repository is small enough to be cloned into a [Github Actions](https://docs.github.com/en/actions/about-github-actions/understanding-github-actions) job (very large files should be handled via [Git LFS](https://docs.github.com/en/repositories/working-with-files/managing-large-files), so that they can be stripped out during cloning).
1312
- The repository is not blacklisted here.
1413

15-
### *Standardized Usage* workflows
14+
### _Standardized Usage_ workflows
1615

1716
In order to additionally appear in the "standardized usage" area, repositories additionally have to:
1817

@@ -44,6 +43,23 @@ The content of the `.snakemake-workflow-catalog.yml` file is subject to change.
4443

4544
Once included in the standardized usage area you can link directly to the workflow page using the URL `https://snakemake.github.io/snakemake-workflow-catalog/docs/workflows/<owner>/<repo>`. Do not forget to replace the `<owner>` and `<repo>` tags at the end of the URL.
4645

46+
### Workflow pages
47+
48+
Each standardized workflow has its own page, which is linked on the summary tables or the 'top workflows' tiles.
49+
Workflow pages are **enhanced by information automatically parsed** from their Github repositories. Right now this includes:
50+
51+
1. **Tube Maps**: A graphical representation of the workflow rulegraph, built using [snakevision](https://github.com/OpenOmics/snakevision).
52+
Tube maps will automatically show up on your workflow page if the following command can be run for your workflow: `snakemake -s <snakefile> -c 1 -d .test --forceall --rulegraph`.
53+
This means, you need to have a working test case defined in the `.test` sub-dir.
54+
55+
2. **Workflow Configuration**: These are simply the configuration instructions from `config/README.md`.
56+
57+
3. **Workflow Parameters**: If the repo contains a `workflow/schemas/config.schema.yaml` OR `config/schemas/config.schema.yaml` file, the parameters defined in this file will be parsed and displayed as a table on the workflow page.
58+
The default fields that are recognized in the schema are `type`, `description`, `default` and `required`.
59+
Config options can be arbitrarily nested in the schema using the `properties` field of an object.
60+
61+
All these features are implemented in the [snakemake-workflow-template](https://github.com/snakemake-workflows/snakemake-workflow-template). If you want to create a standard-compliant workflow (page), the template is the ideal starting point.
62+
4763
### Release handling
4864

4965
If your workflow provides Github releases, the catalog will always just scrape the latest non-preview release. Hence, in order to update your workflow's records here, you need to release a new version on Github.

0 commit comments

Comments
 (0)