Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ppwwyyxx/dash-docset-jax
Create nice dash/zeal docset for JAX+Flax
https://github.com/ppwwyyxx/dash-docset-jax
dash flax jax zeal
Last synced: 4 months ago
JSON representation
Create nice dash/zeal docset for JAX+Flax
- Host: GitHub
- URL: https://github.com/ppwwyyxx/dash-docset-jax
- Owner: ppwwyyxx
- License: apache-2.0
- Created: 2022-05-30T10:06:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-02T00:42:32.000Z (over 1 year ago)
- Last Synced: 2024-08-03T01:38:26.317Z (6 months ago)
- Topics: dash, flax, jax, zeal
- Language: Python
- Homepage:
- Size: 466 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## JAX+Flax offline documentation in [dash](https://kapeli.com/dash)/[zeal](https://github.com/zealdocs/zeal) docset browser
![screenshot](/screenshot.jpg)
To use, you can add this feed in Dash/Zeal directly:
```
https://raw.githubusercontent.com/ppwwyyxx/dash-docset-jax/master/Jax.xml
```
Or download the latest release [here](https://github.com/ppwwyyxx/dash-docset-jax/releases).## Steps to generate the docset
1. Install JAX and Flax
1. `pip install tqdm python-magic selectolax doc2dash beautifulsoup4 lxml`
1. Build their documentation together:
```
git clone https://github.com/google/jax /tmp/jax
git clone https://github.com/google/flax /tmp/flaxcd /tmp/flax/docs/
# Install necessary doc dependencies from requirements.txt, then:
sphinx-build -b html -D nb_execution_mode=off ./ ./build/html -j autocd /tmp/jax/docs
cp -rv /tmp/flax/docs/api_reference/flax.* ./
# Install necessary doc dependencies from requirements.txt, then:
sphinx-build -b html -D nb_execution_mode=off ./ ./build/html -j auto
```
1. `cd` to this project, then run the following to beautify the docs:
```
export HTML_DIR=/tmp/jax/docs/build/html
# Beautify the docs for more friendly display:
./transform.py $HTML_DIR
# Use monospace font for code:
sed -i 's/var(--pst-font-family-monospace)/monospace/g' $HTML_DIR/**/*.css
doc2dash -f -d ./ -u https://jax.readthedocs.io/ --name jax -i icon.png $HTML_DIR
```
This will generate `jax.docset` that can be installed into Zeal/Dash.## Others
* Latex renders correctly:
![math](/math.jpg)
* Syntax highlight works (check `flax.linen.map_variables`)