Skip to content

Commit cb7938c

Browse files
authored
Merge pull request stac-utils#44 from azavea/rde/stac-sprint-tutorial
Fix up docs
2 parents ec4966d + 6098a5a commit cb7938c

File tree

5 files changed

+4477
-189
lines changed

5 files changed

+4477
-189
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ To build and develop the documentation locally, make sure sphinx is available (w
9090

9191
Use 'make' without arguments to see a list of available commands.
9292

93+
__Note__: `nbsphinx` requires that a local `pystac` is installed; use `pip install -e .`.
94+
9395

9496

9597
## Runing the quickstart and tutorials

docs/concepts.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Concepts
22
########
33

4-
This page will give an overview of some important concepts to understand when working with PySTAC. If you want to check code examples, see the Jupyter notebook `tutorials in the GitHub repo <https://github.com/azavea/pystac/tree/develop/tutorials>`_.
4+
This page will give an overview of some important concepts to understand when working with PySTAC. If you want to check code examples, see the :ref:`tutorials`.
55

66
Reading STACs
77
=============

docs/conf.py

+13
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@
1414
#
1515
import os
1616
import sys
17+
import subprocess
1718
sys.path.insert(0, os.path.abspath('.'))
1819
sys.path.insert(0, os.path.abspath('../'))
1920
from pystac.version import __version__
2021

22+
git_branch = subprocess.check_output(['git',
23+
'rev-parse',
24+
'--abbrev-ref',
25+
'HEAD']) \
26+
.decode("utf-8") \
27+
.strip()
2128

2229
# -- Project information -----------------------------------------------------
2330

@@ -45,10 +52,16 @@
4552
'sphinx.ext.viewcode',
4653
'sphinx.ext.napoleon',
4754
'sphinx.ext.githubpages',
55+
'sphinx.ext.extlinks',
4856
'sphinxcontrib.fulltoc',
4957
'nbsphinx'
5058
]
5159

60+
extlinks = {
61+
'tutorial': ('https://github.com/azavea/pystac/'
62+
'tree/{}/docs/tutorials/%s'.format(git_branch), 'tutorial')
63+
}
64+
5265
# Add any paths that contain templates here, relative to this directory.
5366
templates_path = ['_templates']
5467

docs/tutorials.rst

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1+
.. _tutorials:
2+
13
Tutorials
24
#########
35

4-
The tutorials below are available on GitHub: https://github.com/azavea/pystac/tree/develop/docs/tutorials
5-
66
PySTAC Introduction
77
-------------------
88

9-
:ref:`This notebook </tutorials/pystac-introduction.ipynb>` gives an introduction to PySTAC concepts through code examples.
9+
- :tutorial:`GitHub version <pystac-introduction.ipynb>`
10+
- :ref:`Docs version </tutorials/pystac-spacenet-tutorial.ipynb>`
11+
12+
This tutorial gives an introduction to PySTAC concepts through code examples.
1013

1114
PySTAC SpaceNet tutorial
1215
------------------------
1316

14-
:ref:`This notebook </tutorials/pystac-spacenet-tutorial.ipynb>` shows how to create and manipulate a STAC of `SpaceNet <https://spacenetchallenge.github.io/>`_ data.
17+
- :tutorial:`GitHub version <pystac-spacenet-tutorial.ipynb>`
18+
- :ref:`Docs version </tutorials/pystac-spacenet-tutorial.ipynb>`
19+
20+
This tutorial shows how to create and manipulate a STAC of `SpaceNet <https://spacenetchallenge.github.io/>`_ data.
1521

1622
How to create STAC Catalogs with PySTAC
1723
---------------------------------------
18-
:ref:`This notebook </tutorials/how-to-create-stac-catalogs.ipynb>` is a tutorial that was part of a 30 minute presentation at the `community STAC sprint <https://github.com/radiantearth/community-sprints/tree/master/11052019-arlignton-va>`_ in Arlington, VA in November 2019. It runs through creating a STAC of image or label items from the `SpaceNet 5 <https://www.topcoder.com/challenges/30099956>`_ dataset.
24+
25+
- :tutorial:`GitHub version <how-to-create-stac-catalogs.ipynb>`
26+
- :ref:`Docs version </tutorials/how-to-create-stac-catalogs.ipynb>`
27+
28+
This was a tutorial that was part of a 30 minute presentation at the `community STAC sprint <https://github.com/radiantearth/community-sprints/tree/master/11052019-arlignton-va>`_ in Arlington, VA in November 2019. It runs through creating a STAC of image or label items from the `SpaceNet 5 <https://www.topcoder.com/challenges/30099956>`_ dataset.

0 commit comments

Comments
 (0)