Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation framework #23

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
453a91b
Add documentation framework with Mkdocs Material
kabilar Nov 21, 2024
8dc09c9
Minor text update
kabilar Nov 21, 2024
11a7a61
Add to custom word list for spell check to ignore
kabilar Nov 21, 2024
d1600e5
Add scripts to autogenerate API docs
kabilar Nov 22, 2024
a625ede
Update options for mkdocstrings
kabilar Nov 22, 2024
ea0e21a
Add `mkdocs-section-index` package
kabilar Nov 22, 2024
1cf478b
Update navigation filename
kabilar Nov 22, 2024
17d6486
Remove comment
kabilar Nov 22, 2024
295ae51
Move mkdocs files to `docs/` directory
kabilar Nov 22, 2024
bcfcd6e
Add `CUSTOM_DOMAIN` to GitHub Action
kabilar Nov 22, 2024
4947c64
Update GitHub Action
kabilar Nov 22, 2024
ff1bb54
Update configuration file
kabilar Nov 22, 2024
7ce3d9a
Update Action for new config file location
kabilar Nov 22, 2024
70e5dc0
Update config file
kabilar Nov 22, 2024
d2aa32a
Add plugin to allow for mkdocs.yml file to be in same directory as docs
kabilar Nov 22, 2024
4fe2c40
Add quotes for strings
kabilar Nov 22, 2024
ef76a2c
Add docstring
kabilar Nov 22, 2024
77832b6
Fix path
kabilar Nov 22, 2024
873bed0
Fix path
kabilar Nov 22, 2024
848f481
Update path
kabilar Nov 22, 2024
73e5bfe
chore
calvinchai Nov 26, 2024
01ebfd8
Remove comments
kabilar Nov 26, 2024
c72eb66
Merge branch 'docs' of https://github.com/kabilar/linc-convert into docs
kabilar Nov 26, 2024
19e8791
Merge branch 'main' of https://github.com/lincbrain/linc-convert into…
kabilar Jan 14, 2025
663b899
Add color schemes
kabilar Jan 14, 2025
aee4b9f
Add cname file
kabilar Jan 14, 2025
f43ebcd
Add a manual trigger for GitHub Actions
kabilar Jan 16, 2025
d3112cb
Rename file
kabilar Jan 16, 2025
7badecf
Fix custom domain
kabilar Jan 16, 2025
80748ae
Update path to script
kabilar Jan 16, 2025
d147548
Revert path update
kabilar Jan 16, 2025
7228128
Update `API` path in navigation
kabilar Jan 16, 2025
776439a
Try alternative path
kabilar Jan 16, 2025
9d0c233
Update navigation path
kabilar Jan 16, 2025
b9c0897
Update path
kabilar Jan 16, 2025
a809b09
Fix paths in api docstrings
kabilar Jan 16, 2025
fb96424
Fix path
kabilar Jan 16, 2025
040f65a
Remove nav so that it is autogenerated
kabilar Jan 16, 2025
cd574c3
Update nav file
kabilar Jan 16, 2025
4c3d74a
Update nav file
kabilar Jan 16, 2025
a3fc412
Update path to `nav_file`
kabilar Jan 16, 2025
20f88cc
Add navigation elements to `gen_reg_pages.py`
kabilar Jan 16, 2025
93c91c1
Move mkdocs.yml file up one level
kabilar Jan 16, 2025
24feef3
Move file back
kabilar Jan 16, 2025
fb72aba
Change GitHub Actions since workflow wasn't working
kabilar Jan 16, 2025
e6aa96d
Update nav file path
kabilar Jan 16, 2025
4a9cbec
Update working directory
kabilar Jan 16, 2025
4c24772
Remove publish-docs workflow
kabilar Jan 16, 2025
8530ae0
Update URL for DANDI Docs
kabilar Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build MkDocs
on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1

- name: Install version of Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install requirements
run: pip install -r requirements.txt

- name: Build docs
run: mkdocs build
21 changes: 21 additions & 0 deletions .github/workflows/publishdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- main

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
steps:
- name: Checkout main
uses: actions/checkout@v1

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
linc
LINC
DANDI
PIs
Hillman
Yendiki
cortico
subcortical
OME
Zarr
txt
http
webserver
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
convert.lincbrain.org
11 changes: 11 additions & 0 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# About this doc

## Acknowledgements

Thank you to the DANDI Archive project for setting up the documentation framework that is utilized here. See the [DANDI Handbook](https://www.dandiarchive.org/handbook/) for more information.

## License

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>

This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
11 changes: 11 additions & 0 deletions docs/contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Contribute to this documentation

If you find an issue with this documentation please file an issue or submit a pull request on the [linc-convert](https://github.com/lincbrain/linc-convert) repository.

If you would like to contribute to the LINC documentation and render the documentation locally as you make edits, please follow the steps below:

1. Fork the [linc-convert](https://github.com/lincbrain/linc-convert) repository and clone it to your computer.
2. Set up a Python environment with the dependencies in the [requirements.txt](https://github.com/lincbrain/linc-convert/blob/main/requirements.txt) file.
3. Within the Python environment, run `mkdocs serve`. This will build the website and start a local webserver (e.g. at http://127.0.0.1:8000) with your documentation.
4. As you continue to edit the markdown files or configuration file, your documentation will be automatically re-built and rendered locally.
5. Commit your changes and submit a pull request.
Binary file added docs/img/linc.logo.color+black.alpha.notext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/linc.logo.color+white.notext+square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/linc.logo.color+white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Welcome to the LINC Convert Documentation

<img
src="./img/linc.logo.color+white.png"
alt="linc_banner"
style="width: 75%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>

The center for [Large-scale Imaging of Neural Circuits (LINC)](https://connects.mgh.harvard.edu/)
(PIs: Haber, Hillman, Yendiki) is funded by the
[NIH BRAIN Initiative CONNECTS program](https://www.ninds.nih.gov/news-events/highlights-announcements/nih-brain-initiative-launches-projects-develop-innovative-technologies-map-brain-incredible-detail).
Its goal is to develop novel technologies for imaging brain connections down to
the microscopic scale, and deploy these technologies to image
cortico-subcortical projections that are relevant to deep brain stimulation for
motor and psychiatric disorders.

## About this doc

The `linc-convert` package converts dark-field microscopy, light-sheet microscopy, and polarization sensitive optical coherence tomography files to the OME-Zarr file format.

## Quick Links

- [LINC Homepage](https://connects.mgh.harvard.edu/)
- [LINC data conversion code on GitHub](https://github.com/lincbrain/linc-convert)

## Support

For questions, bug reports, and feature requests, please file an issue on the [linc-convert](https://github.com/lincbrain/linc-convert) repository.
56 changes: 56 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
site_name: LINC Convert Documentation
repo_name: "lincbrain/linc-convert"
repo_url: "https://github.com/lincbrain/linc-convert"
copyright: "CC-BY 4.0"
use_directory_urls: true
site_url: https://convert.lincbrain.org

# Material theme
theme:
name: "material"
language: "en"
favicon: img/linc.logo.color+white.notext+square.png
logo: img/linc.logo.color+black.alpha.notext.png
palette:
primary: "deep purple"
accent: "purple"
features:
- toc.integrate

# Pages
nav:
- Welcome: "index.md"
- API: api/
- Contribute documentation: "contribute.md"
- About this doc: "about.md"

# List of extensions
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.critic
- pymdownx.magiclink
- toc:
permalink: True

# List of plugins
plugins:
- search
- open-in-new-tab

# Customize theme
extra:
generator: false
analytics:
provider: google
property: G-RJKYSKFW0P
social:
- icon: material/home
link: https://connects.mgh.harvard.edu/
name: Homepage
- icon: fontawesome/brands/slack
link: https://mit-lincbrain.slack.com/
name: Slack
- icon: fontawesome/brands/github
link: https://github.com/lincbrain
name: GitHub
3 changes: 3 additions & 0 deletions requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to rename this, so we know it is only for docs? Also, probably we can add this into pyproject.yaml as a dependency group.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @calvinchai, I moved this file to within the docs/ directory. I am not sure how to get MkDocs to work with the pyproject.yaml file.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs-material>=9.5.10
pymdown-extensions
mkdocs-open-in-new-tab
Loading