-
Notifications
You must be signed in to change notification settings - Fork 38
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
Initial documentation #77
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
574dc38
Started writing documentation
astrofrog 304f702
Added dependencies for docs to setup.cfg
astrofrog 710a38d
Added initial getting started page
astrofrog e493961
Add back auto-showing of viewers
astrofrog d9b3791
Added more API docs and missing __all__ entries
astrofrog dcde2b3
Use automodapi_inheritance_diagram option in sphinx-automodapi
astrofrog bfc0e3e
Improve API docs and import all key classes into top-level package fo…
astrofrog de6407c
Added docs test to Travis configuration
astrofrog 8777093
Make sure docs dependencies are installed on Travis
astrofrog 7bd220f
Don't include spelling extension in dependencies
astrofrog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Sphinx & coverage | ||
build | ||
doc/_build | ||
doc/api | ||
docs/_build | ||
docs/api | ||
glue/tests/htmlcov | ||
*.coverage | ||
*htmlcov* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# Makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = -W --keep-going | ||
SPHINXBUILD = sphinx-build | ||
PAPER = | ||
BUILDDIR = _build | ||
|
||
# Internal variables. | ||
PAPEROPT_a4 = -D latex_paper_size=a4 | ||
PAPEROPT_letter = -D latex_paper_size=letter | ||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ||
|
||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest | ||
|
||
#This is needed with git because git doesn't create a dir if it's empty | ||
$(shell [ -d "_static" ] || mkdir -p _static) | ||
|
||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo " html to make standalone HTML files" | ||
@echo " dirhtml to make HTML files named index.html in directories" | ||
@echo " singlehtml to make a single large HTML file" | ||
@echo " pickle to make pickle files" | ||
@echo " json to make JSON files" | ||
@echo " htmlhelp to make HTML files and a HTML help project" | ||
@echo " qthelp to make HTML files and a qthelp project" | ||
@echo " devhelp to make HTML files and a Devhelp project" | ||
@echo " epub to make an epub" | ||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" | ||
@echo " latexpdf to make LaTeX files and run them through pdflatex" | ||
@echo " text to make text files" | ||
@echo " man to make manual pages" | ||
@echo " changes to make an overview of all changed/added/deprecated items" | ||
@echo " linkcheck to check all external links for integrity" | ||
|
||
clean: | ||
-rm -rf $(BUILDDIR) | ||
-rm -rf api | ||
-rm -rf generated | ||
|
||
html: | ||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." | ||
|
||
dirhtml: | ||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
||
singlehtml: | ||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml | ||
@echo | ||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." | ||
|
||
pickle: | ||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle | ||
@echo | ||
@echo "Build finished; now you can process the pickle files." | ||
|
||
json: | ||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json | ||
@echo | ||
@echo "Build finished; now you can process the JSON files." | ||
|
||
htmlhelp: | ||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp | ||
@echo | ||
@echo "Build finished; now you can run HTML Help Workshop with the" \ | ||
".hhp project file in $(BUILDDIR)/htmlhelp." | ||
|
||
qthelp: | ||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp | ||
@echo | ||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \ | ||
".qhcp project file in $(BUILDDIR)/qthelp, like this:" | ||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Astropy.qhcp" | ||
@echo "To view the help file:" | ||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Astropy.qhc" | ||
|
||
devhelp: | ||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp | ||
@echo | ||
@echo "Build finished." | ||
@echo "To view the help file:" | ||
@echo "# mkdir -p $$HOME/.local/share/devhelp/Astropy" | ||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Astropy" | ||
@echo "# devhelp" | ||
|
||
epub: | ||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub | ||
@echo | ||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub." | ||
|
||
latex: | ||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
@echo | ||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." | ||
@echo "Run \`make' in that directory to run these through (pdf)latex" \ | ||
"(use \`make latexpdf' here to do that automatically)." | ||
|
||
latexpdf: | ||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex | ||
@echo "Running LaTeX files through pdflatex..." | ||
make -C $(BUILDDIR)/latex all-pdf | ||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." | ||
|
||
text: | ||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text | ||
@echo | ||
@echo "Build finished. The text files are in $(BUILDDIR)/text." | ||
|
||
man: | ||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man | ||
@echo | ||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man." | ||
|
||
changes: | ||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes | ||
@echo | ||
@echo "The overview file is in $(BUILDDIR)/changes." | ||
|
||
linkcheck: | ||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | ||
@echo | ||
@echo "Link check complete; look for any errors in the above output " \ | ||
"or in $(BUILDDIR)/linkcheck/output.txt." | ||
|
||
doctest: | ||
@echo "Run 'python setup.py test' in the root directory to run doctests " \ | ||
@echo "in the documentation." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
API Documentation | ||
================= | ||
General | ||
------- | ||
.. automodapi:: glue_jupyter | ||
|
||
.. automodapi:: glue_jupyter.app | ||
|
||
.. automodapi:: glue_jupyter.view | ||
|
||
.. automodapi:: glue_jupyter.common.state3d | ||
|
||
.. automodapi:: glue_jupyter.compat | ||
|
||
bqplot viewers | ||
-------------- | ||
|
||
.. automodapi:: glue_jupyter.bqplot.common | ||
|
||
.. automodapi:: glue_jupyter.bqplot.histogram | ||
|
||
.. automodapi:: glue_jupyter.bqplot.image | ||
|
||
.. automodapi:: glue_jupyter.bqplot.profile | ||
|
||
.. automodapi:: glue_jupyter.bqplot.scatter | ||
|
||
ipyvolume viewers | ||
----------------- | ||
|
||
.. automodapi:: glue_jupyter.ipyvolume.common | ||
|
||
.. automodapi:: glue_jupyter.ipyvolume.scatter | ||
|
||
.. automodapi:: glue_jupyter.ipyvolume.volume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Getting started | ||
=============== | ||
|
||
To start using glue in the Jupyter notebook or Jupyter lab, you will need to | ||
call the :func:`~glue_jupyter.jglue` function:: | ||
|
||
>>> from glue_jupyter import jglue | ||
>>> app = jglue() | ||
|
||
This will automatically set up a data container (called a *data collection* in | ||
glue) and the ``app`` object can then be used to load data, link data, and | ||
create visualizations. For instance, suppose that you have a CSV file that you | ||
want to visualize. Start off by loading it with:: | ||
|
||
>>> table = app.load_data('mytable.csv') | ||
|
||
The ``table`` variable points to a glue `~glue.core.data.Data` object. For more | ||
information about how to work with and extract values from this kind of object | ||
see `this tutorial <http://docs.glueviz.org/en/stable/python_guide/data_tutorial.html>`__ | ||
in the main glue documentation. | ||
|
||
You can then create visualizations using methods on ``app`` - for example, to | ||
create a histogram visualization, use `~glue_jupyter.JupyterApplication.histogram1d`:: | ||
|
||
>>> histogram = app.histogram1d(data=table) | ||
|
||
for a 2-d scatter plot, use `~glue_jupyter.JupyterApplication.scatter2d`:: | ||
|
||
>>> scatter2d = app.scatter2d(data=table) | ||
|
||
and for a 3-d scatter plot, use `~glue_jupyter.JupyterApplication.scatter3d`:: | ||
|
||
>>> scatter3d = app.scatter3d(data=table) | ||
|
||
Other available visualizations include | ||
`~glue_jupyter.JupyterApplication.profile1d`, | ||
`~glue_jupyter.JupyterApplication.imshow`, and | ||
`~glue_jupyter.JupyterApplication.volshow`. | ||
|
||
.. TODO: continue writing this page! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Glue in the Jupyter Notebook | ||
============================ | ||
|
||
About | ||
----- | ||
|
||
The **glue-jupyter** package provides a way to use the `glue | ||
<http://glueviz.org/>`_ package for multi-dimensional linked-data exploration in | ||
the `Jupyter <https://jupyter.org/>`_ notebook and Jupyter Lab. This package is | ||
still in early development, but it is already possible to try out some of the | ||
functionality. If you run into any issues or would like to request features, | ||
please head over to our `issue tracker | ||
<https://github.com/glue-viz/glue-jupyter/issues>`_. | ||
|
||
User guide | ||
---------- | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
installing.rst | ||
getting_started.rst | ||
api.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Installation | ||
============ | ||
|
||
To install the latest developer version of the **glue-jupyter** package as | ||
well as its dependencies, you will need the latest developer version of some | ||
dependencies, including glue itself. If you are using conda, we therefore | ||
recommend that you create a new environment:: | ||
|
||
conda create -n glue-jupyter python=3.7 | ||
|
||
To install glue-jupyter along with all its dependencies, you can do:: | ||
|
||
pip install git+https://github.com/glue-viz/glue-jupyter | ||
|
||
If you are interested in using glue-jupyter in Jupyter Lab, you will need to | ||
also install the following extensions manually:: | ||
|
||
jupyter labextension install @jupyter-widgets/jupyterlab-manager bqplot ipyvolume jupyter-threejs | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think the same goes for ipyastroimage, but it's not on npm yet, I can give you maintainer rights.
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.
Yes and ipymaterialui is also missing from npm. I'm happy to deal with ipyastroimage if you like.
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.
In any case, I'll just add these to the list later.