Skip to content

Commit 03ac596

Browse files
committed
Migrate documentation from ReadTheDocs to GitHub Pages with Material theme
1 parent 9162b9b commit 03ac596

7 files changed

Lines changed: 252 additions & 63 deletions

File tree

.github/workflows/docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.11'
33+
34+
- name: Install Poetry
35+
uses: snok/install-poetry@v1
36+
with:
37+
version: latest
38+
virtualenvs-create: true
39+
virtualenvs-in-project: true
40+
41+
- name: Load cached venv
42+
id: cached-poetry-dependencies
43+
uses: actions/cache@v4
44+
with:
45+
path: .venv
46+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
47+
48+
- name: Install dependencies
49+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
50+
run: poetry install --no-interaction --no-root --with dev
51+
52+
- name: Install project
53+
run: poetry install --no-interaction
54+
55+
- name: Build documentation
56+
run: poetry run mkdocs build --verbose --site-dir _site
57+
58+
- name: Upload artifact
59+
uses: actions/upload-pages-artifact@v3
60+
with:
61+
path: _site
62+
63+
deploy:
64+
environment:
65+
name: github-pages
66+
url: ${{ steps.deployment.outputs.page_url }}
67+
runs-on: ubuntu-latest
68+
needs: build
69+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4

.readthedocs.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To solve this, we introduce the **V**irtual **M**etabolomics **M**ass **S**pectr
1010

1111
Eager to start using ViMMS? Take advantage of these resources:
1212
- [Installation guide](pages/installation.md).
13-
- Visit our project documentation page: [![Documentation Status](https://readthedocs.org/projects/vimms/badge/?version=latest)](http://vimms.readthedocs.io/?badge=latest)
13+
- Visit our project documentation page: [![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://glasgowcompbio.github.io/vimms/)
1414
- Our [Demo folder](https://github.com/glasgowcompbio/vimms/tree/master/demo) contains notebooks that demonstrate how to use the framework in a simulated environment.
1515
- For specific examples that accompany our publications, see the [Example folder](https://github.com/glasgowcompbio/vimms/tree/master/examples).
1616
- You can also find this [quick guide on how to get started using ViMMS](https://github.com/glasgowcompbio/vimms/blob/master/demo/guide_to_vimms/guide_to_vimms.ipynb).

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ nav_external_links:
66
url: https://github.com/glasgowcompbio/vimms/tree/master/demo
77
- title: Code for Papers
88
url: https://github.com/glasgowcompbio/vimms/tree/master/examples
9-
- title: API Documentation
10-
url: https://vimms.readthedocs.io
9+
- title: Documentation
10+
url: https://glasgowcompbio.github.io/vimms/

mkdocs.yml

Lines changed: 96 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,106 @@
11
# mkdocs.yml
22
site_name: Virtual Metabolomics Mass Spectrometry (ViMMS)
3+
site_url: https://glasgowcompbio.github.io/vimms/
4+
site_description: ViMMS - Virtual Metabolomics Mass Spectrometry Framework
5+
site_author: Glasgow Computational Biology Group
6+
7+
repo_name: glasgowcompbio/vimms
8+
repo_url: https://github.com/glasgowcompbio/vimms
9+
edit_uri: edit/master/docs/
10+
311
theme:
4-
name: "readthedocs"
12+
name: material
13+
features:
14+
- navigation.tabs
15+
- navigation.sections
16+
- navigation.expand
17+
- navigation.path
18+
- toc.integrate
19+
- search.suggest
20+
- search.highlight
21+
- content.code.annotate
22+
- content.code.copy
23+
palette:
24+
- scheme: default
25+
primary: indigo
26+
accent: indigo
27+
toggle:
28+
icon: material/brightness-7
29+
name: Switch to dark mode
30+
- scheme: slate
31+
primary: indigo
32+
accent: indigo
33+
toggle:
34+
icon: material/brightness-4
35+
name: Switch to light mode
536

637
plugins:
7-
- search
8-
- mkdocstrings:
9-
handlers:
38+
- search
39+
- mkdocstrings:
40+
handlers:
1041
python:
11-
paths: ["."]
42+
paths: ["."]
43+
options:
44+
show_source: true
45+
show_root_heading: true
46+
show_root_full_path: false
47+
show_symbol_type_heading: true
48+
show_symbol_type_toc: true
49+
docstring_style: google
50+
docstring_section_style: table
51+
merge_init_into_class: true
52+
show_if_no_docstring: false
53+
show_signature_annotations: true
54+
separate_signature: true
55+
line_length: 80
56+
57+
markdown_extensions:
58+
- admonition
59+
- codehilite:
60+
guess_lang: false
61+
- toc:
62+
permalink: true
63+
- pymdownx.superfences
64+
- pymdownx.details
65+
- pymdownx.tabbed:
66+
alternate_style: true
1267

1368
nav:
1469
- Home: README.md
15-
- Simulation Overview: simulation_overview.md
16-
- Creating Chemicals: chemicals.md
17-
- Running Controllers: controllers.md
18-
- Evaluating Simulations: evaluation.md
19-
- Running on a Real Instrument: real_instrument.md
20-
- Adding Noise: noise.md
21-
- Chromatographic Models: chromatography.md
22-
- Command Line Utilities: cli_tools.md
70+
- User Guide:
71+
- Simulation Overview: simulation_overview.md
72+
- Creating Chemicals: chemicals.md
73+
- Running Controllers: controllers.md
74+
- Evaluating Simulations: evaluation.md
75+
- Running on a Real Instrument: real_instrument.md
76+
- Adding Noise: noise.md
77+
- Chromatographic Models: chromatography.md
78+
- Command Line Utilities: cli_tools.md
2379
- API Documentation:
24-
- Common: api/common.md
25-
- Chemical Generation Process:
26-
- Chemicals: api/chemicals.md
27-
- Chemical Samplers: api/chemical_samplers.md
28-
- ROI: api/roi.md
29-
- Box: api/box.md
30-
- Mass Spectrometry Process:
31-
- Mass Spec: api/mass_spec.md
32-
- Column: api/column.md
33-
- Noise: api/noise.md
34-
- Fragmentation Strategy Simulation Process:
35-
- Environment: api/environment.md
36-
- Controllers: api/controllers.md
37-
- Dynamic Exclusion: api/exclusion.md
38-
- Agents: api/agent.md
39-
- Others:
40-
- Feature Extractions: api/feature_extractions.md
41-
- MzMLWriter: api/mzml_writer.md
80+
- Common: api/common.md
81+
- Chemical Generation Process:
82+
- Chemicals: api/chemicals.md
83+
- Chemical Samplers: api/chemical_samplers.md
84+
- ROI: api/roi.md
85+
- Box: api/box.md
86+
- Mass Spectrometry Process:
87+
- Mass Spec: api/mass_spec.md
88+
- Column: api/column.md
89+
- Noise: api/noise.md
90+
- Fragmentation Strategy Simulation Process:
91+
- Environment: api/environment.md
92+
- Controllers: api/controllers.md
93+
- Dynamic Exclusion: api/exclusion.md
94+
- Agents: api/agent.md
95+
- Others:
96+
- Feature Extractions: api/feature_extractions.md
97+
- MzMLWriter: api/mzml_writer.md
98+
99+
extra:
100+
social:
101+
- icon: fontawesome/brands/github
102+
link: https://github.com/glasgowcompbio/vimms
103+
- icon: fontawesome/solid/book
104+
link: https://doi.org/10.1021/acs.analchem.9b02521
105+
106+
copyright: Copyright © 2025 Glasgow Computational Biology Group

poetry.lock

Lines changed: 79 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ mkdocstrings = "^0.29.1"
5252
black = "^25.1.0"
5353
pre-commit = "^3.7.0"
5454
mkdocstrings-python = "^1.16.12"
55+
mkdocs-material = "^9.5.48"
5556

5657
[tool.setuptools_scm]
5758

0 commit comments

Comments
 (0)