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

Add acquire-zarr docs #93

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ We welcome contributions to the Acquire code base and to documentation. Refer to

## Build

To build the website locally and serve it, run the following commands:
To build the website locally and serve it, after cloning and successfully installing `acquire-imaging` and
`acquire-zarr` in developer mode, run the following commands:

```bash
pip install -r requirements.txt
mkdocs serve
```

> [!NOTE]
> This setup assumes you have acquire-python and acquire-zarr cloned in the same
> parent directory as acquire-docs. If this is not the case, edit the
> [`mkdocs.yml` file](https://github.com/acquire-project/acquire-docs/blob/main/mkdocs.yml) accordingly.
28 changes: 28 additions & 0 deletions docs/stream_to_zarr/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Stream to Zarr
template: home_zarr.html
---

<div class="cards">
<div class="card">
<h4>Python API Reference</h4>
<p>Information on classes and methods</p>
<a href="https://github.com/acquire-project/acquire-zarr/tree/main/python" class="button">Python API Reference</a>
</div>
<div class="card">
<h4>C API Reference</h4>
<p>Information on classes and methods</p>
<a href="https://github.com/acquire-project/acquire-zarr/tree/main/src/streaming" class="button">C API Reference</a>
</div>
<div class="card">
<h4>Python Tests</h4>
<p>Integration tests that demonstrate how to use the python library</p>
<a href="https://github.com/acquire-project/acquire-zarr/blob/main/python/tests/test_stream.py" class="button">Python Tests</a>
</div>
<div class="card">
<h4>C Tests</h4>
<p>Integration tests that demonstrate how to use the C library</p>
<a href="https://github.com/acquire-project/acquire-zarr/tree/main/tests/integration" class="button">C Tests</a>
</div>
</div>

4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ nav:
- for_contributors/index.md
- for_contributors/docs_contribution_quickstart.md
- for_contributors/update_version.md
- Stream to Zarr:
- stream_to_zarr/index.md

markdown_extensions:
- pymdownx.highlight:
Expand Down Expand Up @@ -93,7 +95,7 @@ plugins:
python:
# Global-only options
load_external_modules: true
paths: [../acquire-python/python/acquire]
paths: [../acquire-python/python/acquire, ../acquire-zarr/python/acquire]
import:
- https://docs.python.org/3/objects.inv
options: # See https://mkdocstrings.github.io/python/usage/#globallocal-options
Expand Down
95 changes: 95 additions & 0 deletions overrides/home_zarr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!--
Copyright (c) 2016-2023 Martin Donath <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->

{% extends "main.html" %}

{% block header %}
{% include "./partials/header.html" %}
{% endblock %}

<!-- Render hero under tabs -->
{% block tabs %}
{{ super() }}

<!-- Additional styles for landing page -->
<style>
/* Hide table of contents */
@media screen and (min-width: 60em) {
.md-sidebar--secondary {
display: none;
}
}

/* Hide navigation */
@media screen and (min-width: 76.25em) {
.md-sidebar--primary {
display: none;
}
}
</style>

<!-- Hero for landing page -->
<section class="mdx-container">
<div class="md-grid md-typeset">
<div class="mdx-hero">
<!-- Hero content -->
<div class="mdx-hero__content">
<h1>Stream to Zarr</h1>
<p>The Acquire Zarr Streaming library supports chunked, compressed, multiscale streaming to
<a href="https://zarr.readthedocs.io/en/stable/spec/v2.html">Zarr</a>, with
<a href="https://ngff.openmicroscopy.org/latest/">OME-NGFF metadata</a>.</p>
<a href="https://github.com/acquire-project/acquire-zarr?tab=readme-ov-file#acquire-zarr-streaming-library" title="{{ page.next_page.title | e }}"
class="md-button md-button--primary">
Get Started
</a>
</div>
</div>
</div>
</section>
{% endblock %}

<!-- Page content -->
{% block content %}
{{ super() }}
<style>
.md-typeset h1 {
display: none;
}
.mdx-hero__content h1 {
display:contents;
}
.md-content {
max-width: 49rem;
padding-left: 12rem;
}
@media (max-width: 800px) {
.md-content {
padding-left: 0.8rem;
}
}
</style>
{% endblock %}

<!-- Application footer -->
{% block footer %}
{% include "./partials/footer.html" %}
{% endblock %}