-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added automated way to build documentation and deploy it to github pages #126
Changes from 28 commits
a25d008
d77c977
59969ed
bb3ae2d
f7f86f8
6d44c9b
9442f85
4a2a393
db43827
20b9220
025d233
b4124ae
d687795
e60fc29
41bb921
ad58c1e
007d2f7
4aea6a0
a44da1e
1e0a112
6bfd568
1904ae9
13b82ec
529e057
27a0e39
27f234f
a1f0b90
9898328
5bed5cf
413a51f
452da3f
addd5e1
8b8804d
9d788e4
06987d6
ccff91a
72946bf
e1fd538
03013b5
4b5d92f
9b5887f
ad3f654
32f4b7d
ead3a98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: page_deploy | ||
|
||
on: #push | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy-book: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Install dependencies | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
# Build the book | ||
- name: Build the book | ||
run: | | ||
make docs | ||
# Push the book's HTML to github-pages | ||
- name: GitHub Pages action | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/_build/html |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY: docs | ||
|
||
docs: | ||
rm -rf docs/_build/html | ||
find docs/api ! -name 'index.rst' -type f -exec rm -f {} + | ||
pip install -qr docs/requirements.txt | ||
pip install -r requirements.txt | ||
pip install -r requirements_dev.txt | ||
pip install -e . | ||
jb build docs |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Book settings | ||
# Learn more at https://jupyterbook.org/customize/config.html | ||
|
||
title: Sashimi | ||
author: Diego Asua, Vilim Stih, Luigi Petrucco @portugueslab | ||
logo: "../sashimi/icons/main_icon.png" | ||
copyright: Portugues lab | ||
release: 0.2.0 | ||
# only_build_toc_files: true | ||
|
||
# Force re-execution of notebooks on each build. | ||
# See https://jupyterbook.org/content/execute.html | ||
execute: | ||
execute_notebooks: force | ||
|
||
# Information about where the book exists on the web | ||
repository: | ||
url: https://github.com/portugueslab/sashimi # Online location of your book | ||
path_to_book: docs # Optional path to your book, relative to the repository root | ||
|
||
# Add GitHub buttons to your book | ||
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository | ||
html: | ||
use_issues_button: true | ||
use_repository_button: true | ||
use_edit_page_button : false # Whether to add an "edit this page" button to pages. If `true`, repository information in repository: must be filled in | ||
extra_navbar : Powered by <a href="https://jupyterbook.org">Jupyter Book</a> # Will be displayed underneath the left navbar. | ||
extra_footer : "Mantained by Federico Puppo" # Will be displayed underneath the footer. | ||
|
||
latex: | ||
latex_engine : pdflatex # one of 'pdflatex', 'xelatex' (recommended for unicode), 'luatex', 'platex', 'uplatex' | ||
|
||
|
||
sphinx: | ||
extra_extensions: | ||
- sphinx.ext.viewcode | ||
- sphinx.ext.napoleon | ||
- sphinx.ext.autodoc | ||
- sphinx_autodoc_typehints | ||
- sphinx.ext.autosummary | ||
- sphinx.ext.intersphinx | ||
- sphinx.ext.coverage | ||
- sphinx.ext.inheritance_diagram | ||
- sphinx.ext.githubpages | ||
|
||
config: | ||
autosummary_generate: True | ||
autosummary_imported_members: True | ||
html_theme: furo | ||
templates_path: | ||
- '_templates' | ||
intersphinx_mapping: | ||
python: | ||
- "https://docs.python.org/3" | ||
- null | ||
numpy: | ||
- "https://docs.scipy.org/doc/numpy/" | ||
- null |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{ fullname | escape | underline}} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
:members: | ||
:show-inheritance: | ||
:inherited-members: | ||
|
||
{% block methods %} | ||
|
||
{% if methods %} | ||
.. rubric:: {{ _('Methods') }} | ||
|
||
.. autosummary:: | ||
:inherited-members: | ||
{% for item in methods %} | ||
{% if not item.startswith('_') %} | ||
~{{ name }}.{{ item }} | ||
{% endif %} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block attributes %} | ||
{% if attributes %} | ||
.. rubric:: {{ _('Attributes') }} | ||
|
||
.. autosummary:: | ||
:inherited-members: | ||
{% for item in attributes %} | ||
~{{ name }}.{{ item }} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{ fullname | escape | underline}} | ||
|
||
.. automodule:: {{ fullname }} | ||
|
||
{% block attributes %} | ||
{% if attributes %} | ||
.. rubric:: Module Attributes | ||
|
||
{% for item in attributes %} | ||
.. autoattribute:: {{ item }} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block classes %} | ||
{% if classes %} | ||
.. rubric:: {{ _('Classes') }} | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: | ||
{% for item in classes %} | ||
{{ item }} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block functions %} | ||
{% if functions %} | ||
.. rubric:: {{ _('Functions') }} | ||
|
||
{% for item in functions %} | ||
.. autofunction:: {{ item }} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block exceptions %} | ||
{% if exceptions %} | ||
.. rubric:: {{ _('Exceptions') }} | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: | ||
{% for item in exceptions %} | ||
{{ item }} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
- file: index | ||
|
||
- part: Introduction | ||
chapters: | ||
- file: intro | ||
- file: timeline | ||
|
||
- part: Configuration | ||
chapters: | ||
- file: configuration/configuration | ||
|
||
- part: Development | ||
chapters: | ||
- file: development/code_organization | ||
|
||
- part: Hardware | ||
chapters: | ||
- file: hardware/hardware | ||
|
||
- part: Api | ||
chapters: | ||
- file: api/index |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.. _api: | ||
|
||
API Reference | ||
============= | ||
|
||
Information on specific functions, classes, and methods. | ||
|
||
|
||
Modules | ||
------- | ||
|
||
For the average user's workflows. | ||
|
||
.. autosummary:: | ||
:toctree: | ||
:recursive: | ||
|
||
|
||
sashimi.events | ||
sashimi.hardware.cameras | ||
sashimi.utilities | ||
sashimi.processes.logging | ||
sashimi.config | ||
sashimi.hardware.scanning |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Welcome to the Sashimi documentation! | ||
|
||
maybe add index here? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be an internal comment for us, not user-visible |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Sashimi | ||
|
||
<a href="url"><img | ||
src="https://github.com/portugueslab/sashimi/blob/master/sashimi/icons/main_icon.png" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This image does not seem to load correctly. Try without the hyperlink ( <img src=https://github.com/portugueslab/sashimi/blob/master/sashimi/icons/main_icon.png align="left" height="190" width="270"> |
||
align="left" | ||
height="190" | ||
width="270"></a> | ||
|
||
![tests](https://github.com/portugueslab/sashimi/workflows/tests/badge.svg?branch=master) | ||
[![Docs](https://img.shields.io/badge/docs-dev-brightgreen)](https://portugueslab.github.io/sashimi/) | ||
[![Coverage Status](https://coveralls.io/repos/github/portugueslab/sashimi/badge.svg)](https://coveralls.io/github/portugueslab/sashimi) | ||
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) | ||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4122062.svg)](https://doi.org/10.5281/zenodo.4122062) | ||
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/) | ||
|
||
Sashimi is a user-friendly software for efficient control of digital scanned light sheet microscopes (DSLMs). | ||
It is developed by members of the [PortuguesLab](http://www.portugueslab.com/) | ||
at the Technical University of Munich and Max Planck Institute of Neurobiology. Sashimi relies on the fast, multidimensional | ||
[Napari viewer](https://github.com/napari/napari). | ||
|
||
While built for a particular microscope configuration, the modular architecture allows for easy replacement of | ||
hardware by other vendors (we will help with and welcome contributions for supporting other cameras, boards and light sources). | ||
|
||
|
||
|
||
## Installation | ||
|
||
[Install the latest Anaconda](https://www.anaconda.com/) distribution of Python 3. | ||
|
||
Clone this repository and navigate to the main folder `../sashimi` | ||
|
||
### Recommended: Create a new environment | ||
|
||
It is a good practice to create an environment for every project. The provided `environment.yml` sets up almost all required dependencies (see below). | ||
|
||
conda env create -f {path to environment.yml} | ||
|
||
You can activate the environment by running: | ||
|
||
conda activate sashimi | ||
|
||
After this you moght have to install two extra dependencies for controlling a Cobolt laser: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically this should read for controlling a laser through serial communication, such as Cobolt lasers. |
||
|
||
pip install pyvisa | ||
pip install pyvisa-py | ||
|
||
### Install with pip | ||
|
||
For a non-editable installation run: | ||
|
||
pip install . | ||
|
||
Otherwise, if you want to contribute to the project as a developer, for editable installation run: | ||
|
||
pip install -e . | ||
|
||
Now you are ready to go! | ||
|
||
## Configuring sashimi | ||
|
||
Sashimi includes the `sashimi-config` module that lets you interact with the hardware and software | ||
settings from command line. You can display the current configuration of the system.: | ||
|
||
sashimi-config show | ||
|
||
You can ask sashimi for help: | ||
|
||
sashimi --help | ||
|
||
More information on its usage can be found by asking `sashimi-config` for help: | ||
|
||
sashimi-config --help | ||
|
||
You can add and modify parameters just from the command line. For example, to set the piezo waveform readout channel to `Dev1/ao0:0` just run: | ||
|
||
sashimi-config edit -n z_board.write.channel -v Dev1/ao0:0 | ||
|
||
Or to modify the minimum and maximum voltage (in Volts) of the channel: | ||
|
||
sashimi-config edit -n piezo.position_write.min_val -v 0 | ||
sashimi-config edit -n piezo.position_write.max_val -v 10 | ||
|
||
|
||
## Starting the software from command line | ||
|
||
Open a new anaconda prompt and activate your environment like above. Then run: | ||
|
||
sashimi | ||
|
||
Add the option `--scopeless`: | ||
|
||
sashimi --scopeless | ||
|
||
If you want to run the software with mock hardware, such as for debugging or developing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need to install all requirements from the main program, to build the docs? Is just toml enough maybe? Or not even, in which case
Install dependencies
job can be skipped altogether.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right! Thanks!