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

Refactor documentation for faster builds #12

Merged
merged 21 commits into from
Mar 14, 2024

Conversation

ghisvail
Copy link
Contributor

@ghisvail ghisvail commented Jan 29, 2024

  • Convert documentation to a regular Sphinx project to avoid JB's long build time.
  • Provide interactive reloading to enable dynamic
  • Investigate using static API docs generation
  • Reorganize documentation into separate user guide, tutorial, cookbook and reference sections

Closes #11

@ghisvail ghisvail force-pushed the docs/drop-jb branch 2 times, most recently from a66d7b9 to 0d5c302 Compare January 31, 2024 08:37
@ghisvail ghisvail force-pushed the docs/drop-jb branch 3 times, most recently from dfe5135 to da6183c Compare February 8, 2024 14:46
@ghisvail ghisvail force-pushed the docs/drop-jb branch 3 times, most recently from 03ac41f to 3e4d014 Compare February 21, 2024 11:20
@ghisvail
Copy link
Contributor Author

ghisvail commented Feb 22, 2024

Investigate using static API docs generation

@ghisvail ghisvail marked this pull request as ready for review February 22, 2024 15:36
@ghisvail
Copy link
Contributor Author

A few warnings sill:

  • Cyclic imports
WARNING: Cannot resolve cyclic import: medkit.audio.transcription, medkit.audio.transcription.doc_transcriber, medkit.audio.transcription.transcribed_text_document, medkit.core.text, medkit.core.text.umls_norm_attribute, medkit.core.text
  • Parsing of docstrings
[AutoAPI] Mapping Data... [ 37%] /home/ghvailla/src/medkit/medkit/core/text/entity_attribute_container.p/home/ghvailla/src/medkit/.hatch/docs/lib/python3.10/site-packages/numpydoc/docscrape.py:455: UserWarning: potentially wrong underline length... 
Example: 
------- in 
Replace multiple white-spaces between alphanumeric characters and
lowercase characters with a single whitespace...
  warn(msg)
/home/ghvailla/src/medkit/.hatch/docs/lib/python3.10/site-packages/numpydoc/docscrape.py:455: UserWarning: potentially wrong underline length... 
Example: 
------- in 
Replace the character '.' between numbers
with the character ',' a space and update its span....
  warn(msg)
[AutoAPI] Mapping Data... [ 63%] /home/ghvailla/src/medkit/medkit/text/ner/hf_entity_matcher_trainable.p/home/ghvailla/src/medkit/.hatch/docs/lib/python3.10/site-packages/numpydoc/docscrape.py:455: UserWarning: Unknown section Params
  warn(msg)
...
/home/ghvailla/src/medkit/docs/api/_generated/medkit/core/text/utils/index.rst:134: WARNING: Title underline too short.

Example:
-------
/home/ghvailla/src/medkit/docs/api/_generated/medkit/core/text/utils/index.rst:329: WARNING: Title underline too short.

Example:
-------

@ghisvail ghisvail force-pushed the docs/drop-jb branch 2 times, most recently from e1a5849 to f759a24 Compare February 22, 2024 16:51
@ghisvail
Copy link
Contributor Author

The docs now build fast and look fine on RTD for this PR. Some more xref and MyST parsing warnings to fix, but the end is near.

@ghisvail ghisvail force-pushed the docs/drop-jb branch 4 times, most recently from 0573969 to 87cd999 Compare February 28, 2024 15:28
@ghisvail ghisvail force-pushed the docs/drop-jb branch 2 times, most recently from 15c491e to 3849483 Compare March 11, 2024 07:14
@ghisvail
Copy link
Contributor Author

Fixed API docs issues in #28

- 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
@ghisvail
Copy link
Contributor Author

Another set of fixes to the API docs summary in #30

@ghisvail ghisvail merged commit b8064b6 into medkit-lib:main Mar 14, 2024
7 checks passed
@ghisvail ghisvail deleted the docs/drop-jb branch March 14, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link of repository is the old one
1 participant