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

Switch tutorial infrastructure to use Sphinx #153

Merged
merged 116 commits into from
Nov 17, 2017
Merged
Show file tree
Hide file tree
Changes from 100 commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
f5f0669
add astropy-helpers
adrn Sep 22, 2017
d5ee582
move tutorials to docs subdir
adrn Sep 22, 2017
8e7c119
add sphinx template files
adrn Sep 22, 2017
156f459
copy in setup files
adrn Sep 22, 2017
0d5566b
move readme to RST
adrn Sep 22, 2017
cd5cca7
remove grabbing version from package
adrn Sep 22, 2017
0411dc7
remove old html dir
adrn Sep 22, 2017
798d099
ignore generated stuff
adrn Sep 22, 2017
e2e5a42
rename conesearch tutorial
adrn Sep 22, 2017
ee18d3b
add all tutorials to index
adrn Sep 22, 2017
902ea00
change timeout for nbconvert
adrn Sep 22, 2017
5f1c3a7
fix section header level
adrn Sep 22, 2017
a95ddaf
change search region and fix column names
adrn Sep 22, 2017
b344bca
change to md so sphinx doesn't collect
adrn Sep 22, 2017
086a556
try to resolve title level warnings
adrn Sep 22, 2017
5625206
Renaming for consistency
adrn Sep 28, 2017
86519e9
fix links in index
adrn Sep 28, 2017
098987c
add link to tutorials in docs dir
adrn Sep 28, 2017
fd3947a
hide in/out prompts
adrn Sep 28, 2017
f3c5acb
add astropy-helpers
adrn Sep 22, 2017
8662b8a
move tutorials to docs subdir
adrn Sep 22, 2017
5873989
add sphinx template files
adrn Sep 22, 2017
1b8930f
copy in setup files
adrn Sep 22, 2017
0fe3467
move readme to RST
adrn Sep 22, 2017
d03c41a
remove grabbing version from package
adrn Sep 22, 2017
d7685fc
remove old html dir
adrn Sep 22, 2017
17f0e94
ignore generated stuff
adrn Sep 22, 2017
8bf776f
rename conesearch tutorial
adrn Sep 22, 2017
052ee89
add all tutorials to index
adrn Sep 22, 2017
a582b0e
change timeout for nbconvert
adrn Sep 22, 2017
9391a7a
fix section header level
adrn Sep 22, 2017
284d9ce
change search region and fix column names
adrn Sep 22, 2017
0182091
change to md so sphinx doesn't collect
adrn Sep 22, 2017
570fc01
try to resolve title level warnings
adrn Sep 22, 2017
bcbb8af
Renaming for consistency
adrn Sep 28, 2017
caf5c44
fix links in index
adrn Sep 28, 2017
9f5710e
add link to tutorials in docs dir
adrn Sep 28, 2017
403faa6
set prompt width to 0
adrn Oct 3, 2017
abe2dd4
ah bootstrap file was missing
adrn Oct 3, 2017
74c7a6c
the most hacky of hacks to monkey-patch the RST template hard-coded i…
adrn Oct 10, 2017
c586954
added a link
adrn Oct 10, 2017
bd3da1d
fix css, link, and conf
adrn Oct 10, 2017
f400ab1
fix astropy-helpers url
adrn Oct 10, 2017
2d1a2f1
modify deploy script
adrn Oct 10, 2017
a7a4478
no longer need prepare deploy script
adrn Oct 10, 2017
6142f6f
move text to index
adrn Oct 10, 2017
1880c52
clean up section on nbsphinx
adrn Oct 10, 2017
94b2440
add header above list of tutorials
adrn Oct 10, 2017
751ebd6
Merge remote-tracking branch 'origin/sphinx' into sphinx
adrn Oct 20, 2017
da14bc1
script to execute and convert notebook
adrn Oct 21, 2017
c39893c
add skeleton of test
adrn Oct 21, 2017
ee77cef
comments
adrn Oct 21, 2017
ef0620f
walk through path, if a path is specified
adrn Oct 21, 2017
73263e0
add a simple test of the nbconvert machinery
adrn Oct 21, 2017
99a24f1
add option to remove the executed notebook
adrn Oct 21, 2017
960c9d6
add raises-exception tag to cell metadata
adrn Oct 21, 2017
e44858e
skip any notebook files in a checkpoints directory
adrn Oct 21, 2017
769bff2
also skip notebooks that have already been executed
adrn Oct 21, 2017
8cc186f
very rough, zeroth draft of developer docs
adrn Oct 21, 2017
f67bafa
added raises-exception tags where needed
adrn Oct 21, 2017
010020e
ignore executed notebooks
adrn Oct 21, 2017
9ec162c
remove nbsphinx
adrn Oct 21, 2017
7716d2b
remove link
adrn Oct 21, 2017
2cac97a
add option to specify output path
adrn Oct 21, 2017
f682a4e
add option to specify a template and move tutorials
adrn Oct 21, 2017
d0b08e9
added makefile option
adrn Oct 21, 2017
77bf998
use posixpath
adrn Oct 22, 2017
f532142
remove scripts from setup.py
adrn Oct 22, 2017
c659b3f
ignore generated tutorials
adrn Oct 22, 2017
1dd89e5
generate toctree from generated rst files
adrn Oct 22, 2017
ae09207
don't specify full path to nboutput for plots
adrn Oct 22, 2017
336140e
travis config
adrn Oct 22, 2017
3212caa
also install nbconvert
adrn Oct 22, 2017
2932b5a
add scipy to requirements - needed in coordinates cross-matching
adrn Oct 22, 2017
e052501
install dev version of nbconvert
adrn Oct 22, 2017
cdbac48
add nb->rst build to conf.py
adrn Oct 22, 2017
7abb090
add readthedocs config
adrn Oct 22, 2017
7f1f903
argh typo
adrn Oct 22, 2017
00007dc
update rtd environment to include nbconvert
adrn Oct 22, 2017
239c0ab
add jupyter and notebook to requirements
adrn Oct 22, 2017
1425686
ensure output dir exists
adrn Oct 22, 2017
5e8bf75
cleaning up old deploy scripts
adrn Oct 22, 2017
e6c5148
added some developer documentation
adrn Oct 22, 2017
55f751f
add binder link to each rendered page
adrn Oct 22, 2017
d198451
add note about nbconv version in rtd env
eteq Nov 2, 2017
d0780be
Add README section on building the tutorials
eteq Nov 2, 2017
fd032da
fixed env check
eteq Nov 2, 2017
94c5ec6
add missing requriements for vo
eteq Nov 2, 2017
092bcd1
add nosdiebar
eteq Nov 2, 2017
1ffa409
add kernelspec option
eteq Nov 2, 2017
e7fe198
add default nbfile_or_path to be sensible
eteq Nov 2, 2017
07fcd3e
Update description of build workflow in README
eteq Nov 3, 2017
1e02586
supressed nonlocal uri warnings
eteq Nov 3, 2017
9b3a380
rename dir structure
eteq Nov 3, 2017
7dc2751
add static path
eteq Nov 3, 2017
2883cf2
Merge pull request #7 from eteq/sphinx
adrn Nov 3, 2017
5cf4766
add pinned scipy version to pip req
adrn Nov 3, 2017
04ef725
rename class
adrn Nov 3, 2017
2d3dc39
fix travis execute path
adrn Nov 3, 2017
779e187
we renamed the docs dir
adrn Nov 3, 2017
76bf86a
possible fix for static nbs
eteq Nov 6, 2017
632a5f2
Add custom stylesheet to change text width
adrn Nov 13, 2017
b517e82
Merge branch 'sphinx' of github.com:adrn/astropy-tutorials into sphinx
adrn Nov 13, 2017
d612584
move Makefile to base with correct directories
eteq Nov 14, 2017
91a01ef
also move make.bat (not tested)
eteq Nov 14, 2017
5643b97
change path add to use the supplied helpers regardless of import success
eteq Nov 15, 2017
0a53993
make useful error message to help with what to do with missing helpers
eteq Nov 15, 2017
5c35023
add mismatch helpers warning
eteq Nov 15, 2017
75064ac
remove setups
eteq Nov 16, 2017
226581f
rewrite readme to defer to 'documentation'
adrn Nov 17, 2017
e2f1ba8
clean up landing page
adrn Nov 17, 2017
cc08da1
add make html instructions
adrn Nov 17, 2017
0801873
add back in cfg with metadata for the tutorials
eteq Nov 17, 2017
a1693a0
remove unnecessary ah_bootstrap.py
eteq Nov 17, 2017
3d32db3
add additional dev info
eteq Nov 17, 2017
ee479d0
use sensible dev versions
eteq Nov 17, 2017
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
14 changes: 8 additions & 6 deletions .gitignore
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
*.pdf
*.png
*.jpg
*.pyc
*.tex
exec*.ipynb
3 changes: 3 additions & 0 deletions .gitmodules
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
17 changes: 17 additions & 0 deletions .rtd-environment.yml
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
55 changes: 39 additions & 16 deletions .travis.yml
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'
Copy link
Member

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_TYPEs?

Copy link
Member

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.


- 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
# - |
Copy link
Member

Choose a reason for hiding this comment

The 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

29 changes: 0 additions & 29 deletions DEPLOY.md

This file was deleted.

29 changes: 0 additions & 29 deletions README.md

This file was deleted.

36 changes: 36 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Astropy Tutorials

This repository contains tutorials for the [Astropy](http://astropy.org)
project (also on [github](https://github.com/astropy/astropy)).

## Running Tutorials

The easiest way to get started quickly is to use binder to run the tutorials in
your web browser - when this loads, click the "tutorials" folder and you should
see all the tutorials:

.. image:: http://mybinder.org/badge.svg
:target: http://mybinder.org/repo/astropy/astropy-tutorials/docs/tutorials

To run the tutorials *locally*, you need jupyter notebook installed::

jupyter notebook

The tutorials are initially empty of any output. You can run them by pressing
"Run All" under the "Cell" menu in the notebook file.

## Dependencies

See the conda environment file or pip requirements file for a list of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which one is it? For that matter, is there any reason now to have both?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astrofrog made both - maybe it's just to give people the option of package manager? But agree it's slightly more overhead for us. I'll leave for now.

dependencies.

## Building the tutorial web pages

To build all of the tutorials in the form they appear on the web site, you just
do the sphinx build as for a Python package::

>>> python setup.py build_docs

For more information on this and other ways to execute the tutorials, see the
"Documentation on tutorials infrastructure" section of the generated
sphinx docs.
Loading