Skip to content

Commit

Permalink
add notebooks to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmunro-mangroup authored and jamesmunro committed Sep 9, 2023
1 parent f6a9797 commit 5a6f40b
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 210 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: MkDocs
run: |
echo "::group::Pip"
pip3 install mkdocs-material
pip3 install mkdocs-jupyter
echo "::endgroup::"
cd docs/mkdocs
Expand Down
22 changes: 7 additions & 15 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,20 @@ and diagrams are generated, even undocumented classes / functions. This gives ab

### mkdocs

To build mkdocs (to `/tmp/docs_build/` as an example):

```
mkdir /tmp/docs_build/
```

#### Working in Man Group:

To build:
Install
```
docker run --rm -v /tmp/docs_build:/tmp/docs_build -v $(pwd)/mkdocs:/docs external-sandbox-docker.repo.prod.m/squidfunk/mkdocs-material:latest build -f mkdocs.yml -d /tmp/docs_build
pip install mkdocs-material mkdocs-jupyter
```

To run the web server on port 8000 (from the `docs` directory):
To build mkdocs (to `/tmp/docs_build/` as an example):
```
docker run --rm -p 8000:8000 -v ${PWD}/mkdocs:/docs external-sandbox-docker.repo.prod.m/squidfunk/mkdocs-material:latest serve -f mkdocs.yml -a 0.0.0.0:8000
cd docs/mkdocs
mkdocs build -d /tmp/docs_build
```

#### Working externally:

Development server
```
docker run --rm -v /tmp/docs_build:/tmp/docs_build -v $(pwd)/mkdocs:/docs squidfunk/mkdocs-material:latest build -f mkdocs.yml -d /tmp/docs_build
mkdocs serve -a 0.0.0.0:8000
```

### Sphinx
Expand Down
362 changes: 169 additions & 193 deletions docs/mkdocs/docs/notebooks/ArcticDB_demo_lmdb.ipynb

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion docs/mkdocs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
site_name: ArcticDB
repo_url: https://github.com/man-group/ArcticDB
repo_name: man-group/ArcticDB

markdown_extensions:
- admonition
Expand All @@ -9,18 +11,25 @@ markdown_extensions:
- attr_list
- md_in_html

plugins:
- search
- mkdocs-jupyter:
ignore_h1_titles: True
include_source: True

theme:
name: material
custom_dir: overrides
logo: images/FullWithBorder.png
favicon: images/FullWithBorder.png
palette:
scheme: arcticdb
features:
- navigation.expand

extra_css:
- stylesheets/extra.css


nav:
- Introduction: 'index.md'
- Storage Guides:
Expand All @@ -35,6 +44,8 @@ nav:
- Parallel Writes: 'tutorials/parallel_writes.md'
- Snapshots: 'tutorials/snapshots.md'
- Metadata: 'tutorials/metadata.md'
- Notebooks:
- Intro Notebook: 'notebooks/ArcticDB_demo_lmdb.ipynb'
- Library Configuration: 'lib_config.md'
- Runtime Configuration: 'runtime_config.md'
- Error Messages: 'error_messages.md'
Expand Down
46 changes: 46 additions & 0 deletions docs/mkdocs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% extends "base.html" %}

{% block content %}
{% if page.nb_url %}
<p>
<h1>{{page.file.name}}</h1>
<a href="https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/{{page.file.src_uri}}">
<span class="twemoji">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<title>github</title>
<path
d="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" />
</svg>
</span>
View in Github
</a>
|
<a
href="https://colab.research.google.com/github/man-group/ArcticDB/blob/master/docs/mkdocs/docs/{{page.file.src_uri}}">
<span class="twemoji">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" width="977" height="602"
style="height: 28px; width: 28px;">
<g>
<path d="M4.54,9.46,2.19,7.1a6.93,6.93,0,0,0,0,9.79l2.36-2.36A3.59,3.59,0,0,1,4.54,9.46Z"
fill="#E8710A"></path>
<path d="M2.19,7.1,4.54,9.46a3.59,3.59,0,0,1,5.08,0l1.71-2.93h0l-.1-.08h0A6.93,6.93,0,0,0,2.19,7.1Z"
fill="#F9AB00"></path>
<path d="M11.34,17.46h0L9.62,14.54a3.59,3.59,0,0,1-5.08,0L2.19,16.9a6.93,6.93,0,0,0,9,.65l.11-.09"
fill="#F9AB00"></path>
<path
d="M12,7.1a6.93,6.93,0,0,0,0,9.79l2.36-2.36a3.59,3.59,0,1,1,5.08-5.08L21.81,7.1A6.93,6.93,0,0,0,12,7.1Z"
fill="#F9AB00"></path>
<path d="M21.81,7.1,19.46,9.46a3.59,3.59,0,0,1-5.08,5.08L12,16.9A6.93,6.93,0,0,0,21.81,7.1Z"
fill="#E8710A"></path>
</g>
<script></script>
</svg>
</span>
Open in Google Colab
</a>
<hr />
</p>
{% endif %}

{{ super() }}
{% endblock content %}

0 comments on commit 5a6f40b

Please sign in to comment.