Skip to content

Commit 44b13f6

Browse files
committed
DOC: Refactor documentation for faster builds
- Switch from Jupyter Book to Sphinx - Use sphinx-book-theme as docs theme - Use myst-parser for Markdown support - Add commands for incremental development - Generate API docs statically with sphinx-apidoc
1 parent cce4227 commit 44b13f6

18 files changed

+668
-852
lines changed

.readthedocs.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ python:
66
path: .
77
extra_requirements:
88
- docs
9-
- metrics-ner
10-
- nlstruct
11-
- srt-io-converter
12-
- webrtc-voice-detector
139

1410
build:
1511
os: ubuntu-22.04
@@ -18,6 +14,3 @@ build:
1814
apt_packages:
1915
- graphviz
2016
- libsndfile1
21-
jobs:
22-
pre_build:
23-
- jupyter-book config sphinx docs/

docs/_config.yml

-80
This file was deleted.

docs/_static/medkit-icon.png

6.09 KB
Loading
File renamed without changes.

docs/_templates/autosummary/module.rst

-46
This file was deleted.

docs/_toc.yml

-49
This file was deleted.

docs/api-gen/index.md

-14
This file was deleted.

docs/changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:::{include} ../CHANGELOG.md
2+
:::

docs/conf.py

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
9+
project = "medkit"
10+
author = "HeKA Research Team"
11+
project_copyright = f"2022-2024, {author}"
12+
13+
# -- General configuration ---------------------------------------------------
14+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15+
16+
extensions = [
17+
"autoapi.extension",
18+
"myst_parser",
19+
"numpydoc",
20+
"sphinxcontrib.mermaid",
21+
]
22+
templates_path = ["_templates"]
23+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
24+
25+
# -- autoapi configuration ---------------------------------------------------
26+
# https://sphinx-autoapi.readthedocs.io/en/latest/reference/config.html
27+
28+
autoapi_dirs = ["../medkit"]
29+
autoapi_root = "api/_generated"
30+
31+
# -- myst_parser configuration -----------------------------------------------
32+
# https://myst-parser.readthedocs.io/en/latest/configuration.html
33+
34+
myst_enable_extensions = ["attrs_inline", "colon_fence"]
35+
36+
# -- Options for HTML output -------------------------------------------------
37+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
38+
39+
html_theme = "sphinx_book_theme"
40+
html_theme_options = {
41+
"path_to_docs": "docs",
42+
"repository_url": "https://github.com/medkit-lib/medkit",
43+
"repository_branch": "main",
44+
}
45+
html_title = "medkit documentation"
46+
html_logo = "_static/medkit-logo.png"
47+
html_favicon = "_static/medkit-icon.png"
48+
html_static_path = ["_static"]

docs/index.md

+79-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,88 @@
1-
# medkit - documentation
1+
# medkit
22

3-
***medkit*** is a Python library for facilitating the **extraction of features** from various modalities of patient data: text, audio for now - relational, image, genetic, and others soon. To this end, medkit offers to compose pipelines with modules, developed by us, yourself or others.
3+
`medkit` is a Python library which facilitates **extraction of features**
4+
from various modalities of patient data, including text and audio for now
5+
-- relational, image, genetic, and others will follow soon.
46

5-
We pay particular attention to enable the implementation of **non-destructive pipelines** (no loss of information when passing from a module to another) and a flexible tracing of **data provenance**.
7+
To this end, medkit enables composition of pipelines with multiple modules,
8+
developed by us, yourself or others.
69

7-
***medkit*** aims at accelerating the development of a learning health system, with a strong open-source and community orientation.
10+
`medkit` places a strong emphasis on **non-destructive operations**,
11+
i.e. no loss of information when passing data from a module to another,
12+
and a flexible tracing of **data provenance**.
13+
14+
`medkit` aims at accelerating the development of a learning health system,
15+
with a strong dedication to open-source and community development.
816

917
:::{warning}
10-
*medkit* core library is still under development and testing.
11-
Some interfaces may change in the future.
18+
The `medkit` core library is still under heavy development and testing.
19+
Some public interfaces may change in the future.
20+
Please check the **BREAKING CHANGES** section of the project's changelog for details.
21+
:::
22+
23+
:::{toctree}
24+
---
25+
caption: User Guide
26+
hidden:
27+
titlesonly:
28+
---
29+
user_guide/install
30+
user_guide/first_steps
31+
user_guide/pipeline
32+
user_guide/provenance
33+
user_guide/module
34+
:::
1235

13-
This library with its documentation is shared for following reasons:
14-
* helping people with some guidelines for using first medkit versions,
15-
* helping core development team to get user feedback for improving the *medkit* library.
36+
:::{toctree}
37+
---
38+
caption: Examples
39+
hidden:
40+
titlesonly:
41+
---
42+
examples/spans
43+
examples/cleaning_text
44+
examples/text_segmentation/index
45+
examples/text_segmentation/section
46+
examples/text_segmentation/syntagma
47+
examples/text_segmentation/document
48+
examples/brat_io
49+
examples/spacy/index
50+
examples/spacy/spacy_io
51+
examples/spacy/spacy_pipeline
52+
examples/custom_text_operation
53+
examples/edsnlp
54+
examples/iamsystem
55+
examples/finetuning_hf_model
56+
examples/detecting_text_duplicates
57+
examples/audio_transcription
58+
examples/audio_dataset_metrics
59+
examples/ontotox
1660
:::
1761

62+
:::{toctree}
63+
---
64+
caption: Tutorial
65+
hidden:
66+
titlesonly:
67+
---
68+
tutorial/context_detection
69+
tutorial/entity_matching
70+
:::
1871

19-
```{tableofcontents}
20-
```
72+
:::{toctree}
73+
---
74+
caption: Reference
75+
hidden:
76+
titlesonly:
77+
---
78+
api/_generated/index
79+
api/audio
80+
api/core
81+
api/core_audio
82+
api/core_text
83+
api/io
84+
api/text
85+
api/training
86+
api/tools
87+
changelog
88+
:::
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)