-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Switch tutorial infrastructure to use Sphinx #153
Changes from all commits
f5f0669
d5ee582
8e7c119
156f459
0d5566b
cd5cca7
0411dc7
798d099
e2e5a42
ee18d3b
902ea00
5f1c3a7
a95ddaf
b344bca
086a556
5625206
86519e9
098987c
fd3947a
f3c5acb
8662b8a
5873989
1b8930f
0fe3467
d03c41a
d7685fc
17f0e94
8bf776f
052ee89
a582b0e
9391a7a
284d9ce
0182091
570fc01
bcbb8af
caf5c44
9f5710e
403faa6
abe2dd4
74c7a6c
c586954
bd3da1d
f400ab1
2d1a2f1
a7a4478
6142f6f
1880c52
94b2440
751ebd6
da14bc1
c39893c
ee77cef
ef0620f
73263e0
99a24f1
960c9d6
e44858e
769bff2
8cc186f
f67bafa
010020e
9ec162c
7716d2b
2cac97a
f682a4e
d0b08e9
77bf998
f532142
c659b3f
1dd89e5
ae09207
336140e
3212caa
2932b5a
e052501
cdbac48
7abb090
7f1f903
00007dc
239c0ab
1425686
5e8bf75
e6c5148
55f751f
d198451
d0780be
fd032da
94c5ec6
092bcd1
1ffa409
e7fe198
07fcd3e
1e02586
9b3a380
7dc2751
2883cf2
5cf4766
04ef725
2d3dc39
779e187
76bf86a
632a5f2
b517e82
d612584
91a01ef
5643b97
0a53993
5c35023
75064ac
226581f
e2f1ba8
cc08da1
0801873
a1693a0
3d32db3
ee479d0
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
.ipynb_checkpoints/ | ||
html/ | ||
runipy-* | ||
build/ | ||
tutorials/rst-tutorials/ | ||
IPython-* | ||
tutorials/*/_run_* | ||
tutorials/*/*.fits | ||
tutorials/*/*.pdf | ||
tutorials/*/*.png | ||
*.fits | ||
*.png | ||
*.jpg | ||
*.pyc | ||
*.tex | ||
exec*.ipynb |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "astropy_helpers"] | ||
path = astropy_helpers | ||
url = https://github.com/astropy/astropy-helpers.git |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: tutorials | ||
|
||
channels: | ||
- astropy | ||
|
||
dependencies: | ||
- python=3.6 | ||
- IPython=6.1.0 | ||
- astropy=2.0 | ||
- astroquery=0.3.6 | ||
- matplotlib=2.0.2 | ||
- numpy=1.13.1 | ||
- scipy=0.19 # needed for coordinates cross-matching | ||
- jupyter=1.0 | ||
- notebook=5.0 | ||
- pip: | ||
- git+https://github.com/jupyter/nbconvert # this is really >=5.4, but at the time of adding this that wasn't yet available |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,52 @@ | ||
language: c | ||
|
||
sudo: false | ||
|
||
os: | ||
- linux | ||
|
||
sudo: false | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- graphviz | ||
- texlive-latex-extra | ||
- dvipng | ||
|
||
env: | ||
global: | ||
|
||
- PYTHON_VERSION=3.6 | ||
- SETUP_XVFB=True | ||
- CONDA_ENVIRONMENT=conda-environment.yml | ||
- CONDA_DEPENDENCIES='jupyter notebook ipython runipy' | ||
- GH_REF: github.com/astropy/astropy-tutorials.git | ||
- secure: "NBZlEg//sDYvJikqXESLsx/WA1Nj7fAH2mJfI8ZVMnolvyjJuLdEMxxEYFP8t6U/iieSSrgUkgP94yy5Oq6iJRjj7ThGCdcjgvgWTQCzoQgEVDc5SzdJGyGs30VC+8t7GTobzMe086HX16SJRvsIumqXdmRcJjAdMCyhMUxLoUg=" | ||
- NUMPY_VERSION=stable | ||
- ASTROPY_VERSION=stable | ||
- EVENT_TYPE='pull_request push' | ||
|
||
- CONDA_ENVIRONMENT='conda-environment.yml' | ||
- CONDA_DEPENDENCIES='jupyter ipython' | ||
- CONDA_CHANNELS='astropy-ci-extras astropy' | ||
|
||
# We need to install the master/latest version of nbconvert because it has support for | ||
# allowing exceptions in individual cells: | ||
- PIP_DEPENDENCIES='git+https://github.com/jupyter/nbconvert' | ||
|
||
# matrix: | ||
|
||
# # Don't wait for allowed failures | ||
# fast_finish: true | ||
|
||
# include: | ||
|
||
# - os: linux | ||
# env: SETUP_CMD='test --coverage' | ||
|
||
install: | ||
- git clone git://github.com/astropy/ci-helpers.git | ||
|
||
- git clone --depth 1 git://github.com/astropy/ci-helpers.git | ||
- source ci-helpers/travis/setup_conda.sh | ||
|
||
script: | ||
- python prepare_deploy.py run | ||
|
||
deploy: | ||
provider: script | ||
script: ./travis_deploy | ||
on: | ||
repo: astropy/astropy-tutorials | ||
branch: master | ||
# - | | ||
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. Do these commented sections need to be there? |
||
# python scripts/convert.py docs/_static/tutorials/ -v | ||
# --output-path=docs/rst-tutorials | ||
# --template=docs/_static/astropy.tpl | ||
- python scripts/convert.py tutorials/notebooks --exec-only -v | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
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) tutorials | ||
|
||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest | ||
|
||
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" | ||
@echo " tutorials to convert all tutorials to RST" | ||
|
||
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 was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Astropy Tutorials | ||
================= | ||
|
||
This repository contains tutorials for the `Astropy <http://astropy.org>`_ | ||
project. These are typically longer-form, more narrative presentations of | ||
functionality in the `Astropy core package | ||
<https://github.com/astropy/astropy>`_ and any `affiliated packages | ||
<http://www.astropy.org/affiliated/index.html>`_. The tutorials are therefore | ||
different from the `Astropy core package documentation | ||
<http://docs.astropy.org>`_, which presents a more structured and exhaustive | ||
view of the core package. | ||
|
||
To see the tutorials rendered as static web pages, see the `Astropy tutorials | ||
site <http://tutorials.astropy.org>`_. | ||
|
||
To run the tutorials interactively, you'll need to make sure you have `Jupyter | ||
notebook <http://jupyter.org/>`_ installed, then clone or download this | ||
repository. The notebook files themselves live in the ``tutorials`` directory | ||
of this repository, organized by the names of the tutorials. | ||
|
||
You can also get started quickly using `Binder <http://mybinder.org>`_ to run the tutorials in | ||
your web browser within a remote server: | ||
|
||
.. image:: http://mybinder.org/badge.svg | ||
:target: http://mybinder.org/repo/astropy/astropy-tutorials/docs/tutorials | ||
|
||
Contributing tutorial material | ||
------------------------------ | ||
|
||
Please see the "`For contributors | ||
<http://astropy-tutorials.readthedocs.io/en/latest/#for-contributors>`_" section | ||
of the tutorials documentation for information on how to get started. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ dependencies: | |
- astroquery=0.3.6 | ||
- matplotlib=2.0.2 | ||
- numpy=1.13.1 | ||
- scipy=0.19 # needed for coordinates cross-matching | ||
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. depending on the answer to my question above, you may need to also add these to the |
||
- jupyter=1.0 | ||
- notebook=5.0 |
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.
Why only these and not all
EVENT_TYPE
s?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.
@eteq - I would suggest to skip reviewing the travis setup as I plan to open a follow-up PR to set up the stages anyway once this is merged.