Skip to content

Commit

Permalink
Fix out links from docs collections section, generate collection repo…
Browse files Browse the repository at this point in the history
…rt automatically.

Fixes #126
  • Loading branch information
ielis committed Jul 25, 2024
1 parent ed97747 commit edcc996
Show file tree
Hide file tree
Showing 6 changed files with 504 additions and 427 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
name: mkdocs-generation
name: Deploy documentation

on:
push:
branches:
- main

permissions:
contents: write

env:
# Path to directory that contains the cohorts, one cohort per folder.
NOTEBOOK_DIR: notebooks

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -17,9 +24,16 @@ jobs:
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material
- run: pip install mkdocs-material[imaging]
- run: pip install pillow cairosvg
- run: pip install mkdocs-material-extensions
- run: pip install mkdocstrings[python]
- run: mkdocs gh-deploy --force

- name: Install docs dependencies
run: |
python3 -m pip install .[docs]
- name: Generate reports
run: |
python3 -m ppktstore report collections --notebook-dir ${NOTEBOOK_DIR} --output docs/collections.md
- name: Deploy docs
run: |
mkdocs gh-deploy --force
5 changes: 4 additions & 1 deletion GetPhenopackets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,10 @@
"import os\n",
"from ppktstore.stats import generate_phenopacket_store_report\n",
"\n",
"report = generate_phenopacket_store_report(notebook_dir)\n",
"report = generate_phenopacket_store_report(\n",
" notebook_dir=\"notebooks\", \n",
" notebook_dir_url='https://github.com/monarch-initiative/phenopacket-store/tree/main/notebooks'\n",
")\n",
"\n",
"outfile = os.path.join('docs', 'collections.md')\n",
"with open(outfile, 'w') as fh:\n",
Expand Down
Loading

0 comments on commit edcc996

Please sign in to comment.