Skip to content

Commit 9414e40

Browse files
authored
fix: improved layout of tables to extend to the right side of page (#41)
* fix: more detailed instructions to test catalog locally * fix: tables can now extend to the right side, beyond the toc side bar
1 parent f346bf7 commit 9414e40

File tree

4 files changed

+90
-3
lines changed

4 files changed

+90
-3
lines changed

README.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,69 @@ If your workflow provides Github releases, the catalog will always just scrape t
6161
## Contributing
6262

6363
Contributions to the Snakemake Workflow Catalog are welcome!
64-
Ideas can be discussed on the [catalog's Issues page](https://github.com/snakemake/snakemake-workflow-catalog/issues) first, and contributions made through Github Pull Requests.
64+
Ideas can be discussed on the [catalog's Issues page](https://github.com/snakemake/snakemake-workflow-catalog/issues) first, and contributions made through Github Pull Requests, see the [next section](#working-with-a-local-copy) for details.
65+
66+
## Working with a local copy
67+
68+
In order to make contributions, you can set up a local copy of the catalog and test your changes.
69+
70+
First, fork the repository on Github:
71+
72+
1. Go to the [Snakemake Workflow Catalog repository](https://github.com/snakemake/snakemake-workflow-catalog) on Github.
73+
2. Click on the "Fork" button in the top right corner ([Github documentation: Forking a repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)).
74+
75+
Then, clone the forked repository:
76+
77+
1. Open a terminal on your local machine.
78+
2. Run `git clone https://github.com/{your-username}/snakemake-workflow-catalog.git` to clone the repository ([Github documentation: Cloning a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)).
79+
80+
Make your changes to the catalog:
81+
82+
1. Create a conda/mamba environment in order to work with the catalog locally.
83+
84+
```bash
85+
cd <path-to>/snakemake-workflow-catalog
86+
conda env create -n snakemake-workflow-catalog -f environment.yml
87+
conda activate snakemake-workflow-catalog
88+
```
89+
90+
2. Set required environmental variables. The variable `TEST_REPO` is used fetch only data from a single workflow.
91+
**Note:** Building the entire catalog from scratch will take several hours due to searching and testing thousands of Github repos.
92+
93+
```bash
94+
export GITHUB_TOKEN="<your-github-token>"
95+
export OFFSET=0
96+
export LATEST_COMMIT=1000
97+
export TEST_REPO="snakemake-workflows/rna-seq-star-deseq2"
98+
```
99+
100+
3. Build the catalog data sources using the test repository.
101+
102+
```bash
103+
python scripts/generate-catalog.py
104+
python scripts/cleanup-catalog.py
105+
```
106+
107+
4. Build the catalog web page using sphinx autobuild (live reload).
108+
109+
```bash
110+
sphinx-autobuild source/ build/
111+
```
112+
113+
... or using the make file (static build).
114+
115+
```bash
116+
make html
117+
```
118+
119+
5. Run `git add .` to stage your changes.
120+
6. Run `git commit -m "fix: your commit message"` to commit your changes.
121+
7. Run `git push` to push your changes to your fork on Github.
122+
123+
Finally, create a pull request:
124+
125+
1. Go to your fork on Github.
126+
2. Follow the instructions on the [Github documentation: Creating a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
65127

66128
## Using workflows from the catalog
67129

@@ -78,3 +140,5 @@ For more detailed instructions, please refer to the documentation within each wo
78140

79141
The Snakemake Workflow Catalog is open-source and available under the MIT License.
80142
For more information and to explore the available workflows, visit https://snakemake.github.io/snakemake-workflow-catalog/.
143+
144+
Note: All workflows collected and presented on the Catalog are licensed under their own terms!

source/_templates/all_other_workflows.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
---
2+
notoc: true
3+
description: "all other workflows"
4+
---
5+
16
# All other workflows
27

38
<!-- NOTE: the raw strings for commas are required to ensure correct line breaks-->
49

510
```{csv-table} All other workflows deviating from 'standardized usage'
611
:header: Workflow,Description,Topics,Reporting,Stars,Watchers
712
:class: sphinx-datatable
8-
:width: 135%
13+
:width: 100%
914
:widths: auto
1015
1116
{% for repo in input -%}

source/_templates/all_standardized_workflows.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
---
2+
notoc: true
3+
description: "all standardized workflows"
4+
---
5+
16
# All standardized workflows
27

38
<!-- NOTE: the raw strings for commas are required to ensure correct line breaks-->
49

510
```{csv-table} All workflows according to 'standardized usage'
611
:header: Workflow,Description,Topics,Reporting,Stars,Watchers
712
:class: sphinx-datatable
8-
:width: 135%
13+
:width: 100%
914
:widths: auto
1015
1116
{% for repo in input -%}

source/_templates/layout.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{%- extends "!layout.html" %}
2+
3+
{{ super() }}
4+
5+
{%- block main %}
6+
{%- if meta is defined and meta is not none and 'notoc' in meta %}
7+
<main class="relative py-6">
8+
{%- else %}
9+
<main class="relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]">
10+
{%- endif %}
11+
{%- block body %}{%- endblock %}
12+
</main>
13+
{%- endblock main %}

0 commit comments

Comments
 (0)