-
Notifications
You must be signed in to change notification settings - Fork 7
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
Revamp the software section #19
Changes from all commits
af727ea
a84b52c
4a837ba
2f6bd49
de4cada
ef311af
508f2ed
f0a218e
176ebe5
72c5bf1
c3e6c8c
667b9e3
494892b
993d3d1
ab7b846
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ _build/ | |
|
||
.DS_Store | ||
Thumbs.db | ||
|
||
gallery.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
extensions = [ | ||
'myst_parser', # there's also myst_nb, which supports embedding Jupyter notebooks, but is heavier. | ||
'sphinx_panels', | ||
'sphinx_design', | ||
] | ||
|
||
myst_heading_anchors = 4 # enable #section links: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-header-anchors | ||
|
@@ -103,3 +104,94 @@ | |
"README.html")): # don't create dangling symlinks; | ||
# it annoyes Github Pages. | ||
os.symlink("README.html", z) | ||
|
||
|
||
# -- Custom scripts ---------------------------------------------------------- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line should be above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, fixed in 176ebe5 |
||
|
||
import os | ||
from pathlib import Path | ||
import random | ||
import requests | ||
from subprocess import run | ||
from textwrap import dedent | ||
from urllib.parse import urlparse | ||
from ghapi.all import GhApi | ||
import pandas as pd | ||
|
||
import yaml | ||
|
||
from sphinx.application import Sphinx | ||
from sphinx.util import logging | ||
|
||
LOGGER = logging.getLogger("conf") | ||
|
||
def build_gallery(app: Sphinx): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's inelegant to do all this in the conf.py file, running it on every parse like this. It would be significantly cleaner to package this script as a custom directive, stick it up on pypi, and then instead of
do
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and those images should be inlined There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed-- but i don't have the time to do it, so #47 |
||
# Build the gallery file | ||
LOGGER.info("building gallery...") | ||
grid_items = [] | ||
projects = yaml.safe_load((Path(app.srcdir) / "gallery_software.yml").read_text()) | ||
for item in projects: | ||
if not item.get("image"): | ||
item["image"] = "https://jupyterbook.org/_images/logo-square.svg" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This image should be inlined There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my bad, fixed in 72c5bf1 |
||
|
||
repo_text = "" | ||
star_text = "" | ||
|
||
if item["repository"]: | ||
repo_text = f'{{bdg-link-secondary}}`repo <{item["repository"]}>`' | ||
|
||
try: | ||
url = urlparse(item["repository"]) | ||
if url.netloc == "github.com": | ||
_, org, repo = url.path.rstrip("/").split("/") | ||
star_text = f"[![GitHub Repo stars](https://img.shields.io/github/stars/{org}/{repo}?style=social)]({item['repository']})" | ||
except Exception as error: | ||
pass | ||
|
||
grid_items.append( | ||
f"""\ | ||
`````{{grid-item-card}} | ||
:text-align: center | ||
<img src="{item["image"]}" alt="logo" loading="lazy" style="max-width: 100%; max-height: 100px; margin: auto" /> | ||
+++ | ||
{" ".join(item["name"].split())} | ||
````{{grid}} 2 2 2 2 | ||
:margin: 0 0 0 0 | ||
:padding: 0 0 0 0 | ||
:gutter: 1 | ||
```{{grid-item}} | ||
:child-direction: row | ||
:child-align: start | ||
:class: sd-fs-5 | ||
{{bdg-link-secondary}}`website <{item["website"]}>` | ||
{repo_text} | ||
``` | ||
```{{grid-item}} | ||
:child-direction: row | ||
:child-align: end | ||
{star_text} | ||
``` | ||
```` | ||
````` | ||
""" | ||
) | ||
grid_items = "\n".join(grid_items) | ||
|
||
# :column: text-center col-6 col-lg-4 | ||
# :card: +my-2 | ||
# :img-top-cls: w-75 m-auto p-2 | ||
# :body: d-none | ||
|
||
panels = f""" | ||
``````{{grid}} 1 2 3 3 | ||
:gutter: 1 1 2 2 | ||
:class-container: full-width | ||
{dedent(grid_items)} | ||
`````` | ||
""" | ||
(Path(app.srcdir) / "gallery_software.txt").write_text(panels) | ||
|
||
|
||
def setup(app: Sphinx): | ||
app.add_css_file("_static/theme.css") | ||
app.connect("builder-inited", build_gallery) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- name: Comprehensive library of analysis tools for multi-parametric MRI of the spinal cord | ||
website: https://spinalcordtoolbox.com/ | ||
repository: https://github.com/spinalcordtoolbox/spinalcordtoolbox | ||
image: https://raw.githubusercontent.com/spinalcordtoolbox/spinalcordtoolbox/master/documentation/source/_static/img/logo_sct.png | ||
- name: Integrated framework for medical image analysis with deep learning | ||
website: https://ivadomed.org | ||
repository: https://github.com/ivadomed/ivadomed | ||
image: https://raw.githubusercontent.com/ivadomed/ivadomed/master/images/ivadomed_logo.png | ||
- name: Simulation, analysis, and visualization of qMRI data (Magnetization Transfer, Diffusion, etc.) | ||
website: https://qmrlab.readthedocs.io | ||
repository: https://github.com/qMRLab/qMRLab | ||
image: https://raw.githubusercontent.com/qMRLab/documentation/master/logo/qMR_logo_orig.png | ||
- name: Software tools to perform advanced static and real-time shimming experiments with MRI. | ||
website: https://shimming-toolbox.org | ||
repository: https://github.com/shimming-toolbox/shimming-toolbox | ||
image: https://raw.githubusercontent.com/shimming-toolbox/shimming-toolbox/master/docs/source/_static/img/shimming_toolbox_logo.png | ||
- name: Segmentation of axon and myelin on microscopy data. | ||
website: https://axondeepseg.readthedocs.io/ | ||
repository: https://github.com/neuropoly/axondeepseg | ||
image: https://raw.githubusercontent.com/neuropoly/axondeepseg/master/docs/source/_static/logo_ads-alpha.png |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
# `🖥` Software | ||
|
||
## Open-Source Projects | ||
|
||
Below is a list of software projects created at **NeuroPoly** or at collaborative institutions. These projects are open source and freely available. | ||
|
||
### MRI | ||
## Image analysis | ||
|
||
| Name | Description | Source | Documentation | | ||
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| ivadomed | Comprehensive and open-source repository of deep learning methods for medical data segmentation | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/ivadomed/ivadomed) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://ivadomed.org/en/latest/) | | ||
| Multiclass Segmentation | Code related to the NIH marmoset longitudinal segmentation project | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/multiclass-segmentation) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/multiclass-segmentation/blob/master/README.md) | | ||
| qMRLab | Software for data aimulation, analysis, and visualization of qMRI data (Magnetization Transfer, Diffusion, etc.) | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/qMRLab/qMRLab) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://qmrlab.readthedocs.io/en/master/) | | ||
| Shimming Toolbox | Code for performing real-time shimming using external MRI shim coils | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/shimming-toolbox) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://shimming-toolbox.org/en/latest/) | | ||
| Spinal Cord Toolbox | Comprehensive and open-source library of analysis tools for multi-parametric MRI of the spinal cord | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/spinalcordtoolbox) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://spinalcordtoolbox.com/en/latest/) | | ||
| Template | A framework for creating unbiased MRI templates of the spinal cord | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/template) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/template/blob/master/README.md) | | ||
```{include} gallery_software.txt | ||
``` | ||
|
||
### Histology | ||
<!-- ## Pipeline and template | ||
|
||
| Name | Description | Source | Documentation | | ||
| ---------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| Atlas Rat | Scripts to generate a microstructure atlas of the rat spinal cord | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/atlas-rat) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/atlas-rat/blob/master/README.md\|Documentation) | | ||
| AxonSeg | Automatic segmentation of axon and myelin from microscopy data | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/axonseg) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/axonseg/blob/master/README.md) | | ||
| AxonDeepSeg | Segmentation software for microscopy data using deep learning | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/axondeepseg) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://axondeepseg.readthedocs.io/en/latest/) | | ||
| AxonPacking | Simulation software for arrangements of axons in white matter | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/axonpacking) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/axonpacking/blob/master/README.md) | | ||
| Tract Clustering | Data-driven approach for tracts in rat histology | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/tract-clustering) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/tract-clustering/blob/master/README.md) | | ||
TODO: Add this section | ||
This section contains projects --> | ||
|
||
### Contributing | ||
<!-- Deprecated software: | ||
|
||
**NeuroPoly** welcomes and appreciates contributions. To get started, please check out [**NeuroPoly**'s contributing guidelines](https://intranet.neuro.polymtl.ca/geek-tips/contributing). | ||
| | Multiclass Segmentation | Code related to the NIH marmoset longitudinal segmentation project | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/multiclass-segmentation) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/multiclass-segmentation/blob/master/README.md) | | ||
|
||
| | AxonSeg | Automatic segmentation of axon and myelin from microscopy data | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/axonseg) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/axonseg/blob/master/README.md) | | ||
|
||
|
||
| | AxonPacking | Simulation software for arrangements of axons in white matter | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/axonpacking) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/axonpacking/blob/master/README.md) | | ||
--> | ||
|
||
<!-- Data / Atlas to add in another section | ||
|
||
| | Template | A framework for creating unbiased MRI templates of the spinal cord | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/template) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/template/blob/master/README.md) | | ||
|
||
| | Atlas Rat | Scripts to generate a microstructure atlas of the rat spinal cord | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/atlas-rat) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/atlas-rat/blob/master/README.md) | | ||
|
||
| | Tract Clustering | Data-driven approach for tracts in rat histology | [<i class="fab fa-github" title="Source" aria-hidden="true"></i><span>Source</span>](https://github.com/neuropoly/tract-clustering) | [<i class="fa fa-book" title="Documentation" aria-hidden="true"></i><span>Documentation</span>](https://github.com/neuropoly/tract-clustering/blob/master/README.md) | | ||
--> | ||
|
||
|
||
## Contributing | ||
|
||
**NeuroPoly** welcomes and appreciates contributions. To get started, please check out [**NeuroPoly**'s contributing guidelines](https://intranet.neuro.polymtl.ca/geek-tips/contributing). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a strange dependency. It pulls in bootstrap? But bootstrap has already been deprecated for several years by the existence of https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Grids. If I look at the web debugger in https://sphinx-design.readthedocs.io/en/sbt-theme/grids.html#grid-options I see they're not using that at all though:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed, otherwise on compilation i get: