Skip to content

Commit 27a5fc6

Browse files
authored
Merge pull request #3 from gcermsu/docs
Create documentation and host at readthedocs.io
2 parents 5b7237c + 3b8cdcb commit 27a5fc6

33 files changed

Lines changed: 462535 additions & 203 deletions

.gitignore

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,14 @@ Pipfile.lock
7474
# rioxarray lock
7575
.lock
7676

77-
# Planetary Computer signed URLs
78-
*.pc_signed_url
77+
78+
# Sphinx build output
79+
docs/_build/
80+
docs/.doctrees/
81+
docs/.ipynb_checkpoints/
82+
# docs/examples
83+
84+
# nbsphinx and Jupyter
85+
**/.ipynb_checkpoints/
86+
87+
# # Sphinx apidoc autogenerated files (optional, if you regenerate them)

.readthedocs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Set the OS, Python version, and other tools you might need
2+
build:
3+
os: ubuntu-24.04
4+
tools:
5+
python: "3.12"
6+
7+
# Build documentation in the "docs/" directory with Sphinx
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
# Optionally, but recommended,
12+
# declare the Python requirements required to build your documentation
13+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
14+
python:
15+
install:
16+
- requirements: docs/requirements.txt

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ A Python package for seamless querying, downloading, and processing of Microsoft
44

55
[![PyPI version](https://img.shields.io/pypi/v/pcxarray.svg)](https://pypi.org/project/pcxarray/)
66
[![Downloads](https://pepy.tech/badge/pcxarray)](https://pepy.tech/project/pcxarray)
7-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://pcxarray.readthedocs.io/en/stable/license.html)
8+
[![Documentation Status](https://readthedocs.org/projects/pcxarray/badge/?version=stable)](https://pcxarray.readthedocs.io/en/stable/?badge=stable)
9+
![example workflow](https://github.com/gcermsu/pcxarray/actions/workflows/pypi-release.yml/badge.svg)
810
[![Open in NBViewer](https://img.shields.io/badge/Open%20in-NBViewer-orange?logo=jupyter)](https://nbviewer.org/github/gcermsu/pcxarray/blob/main/examples/hls_timeseries.ipynb)
911

1012
## Overview
@@ -195,7 +197,7 @@ Use `get_pc_collections()` to discover available collections. Note that not all
195197

196198
## Complete Examples
197199

198-
Explore these comprehensive examples in the [`examples/`](examples/) directory:
200+
Explore these comprehensive examples in the [`examples/`](examples/) directory of the repository:
199201

200202
- **[`hls_timeseries.ipynb`](examples/hls_timeseries.ipynb)**: Water quality monitoring with HLS data [![Open in NBViewer](https://img.shields.io/badge/Open%20in-NBViewer-orange?logo=jupyter)](https://nbviewer.org/github/gcermsu/pcxarray/blob/main/examples/hls_timeseries.ipynb)
201203
- **[`naip.ipynb`](examples/naip.ipynb)**: NAIP imagery processing with grid creation [![Open in NBViewer](https://img.shields.io/badge/Open%20in-NBViewer-orange?logo=jupyter)](https://nbviewer.org/github/gcermsu/pcxarray/blob/main/examples/naip.ipynb)
@@ -205,12 +207,7 @@ Explore these comprehensive examples in the [`examples/`](examples/) directory:
205207

206208
## API Reference
207209

208-
Documentation is currently unavailable, but each function should have descriptive docstrings and full type hints. Use python's built-in `help()` function or IDE tooltips to explore available methods and parameters.
209-
210-
```python
211-
import pcxarray as pcx
212-
help(pcx.prepare_data) # View function signature and docstring
213-
```
210+
Documentation can be found at [pcxarray.readthedocs.io](https://pcxarray.readthedocs.io/en/stable/).
214211

215212
## Known Issues
216213

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/_static/gcer_alt.png

281 KB
Loading

docs/conf.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import os
2+
import sys
3+
import shutil
4+
sys.path.insert(0, os.path.abspath('../src'))
5+
6+
# Copy notebooks into docs/examples before build
7+
examples_src = os.path.abspath('../examples')
8+
examples_dst = os.path.abspath('examples')
9+
shutil.copytree(examples_src, examples_dst, dirs_exist_ok=True)
10+
11+
# Configuration file for the Sphinx documentation builder.
12+
#
13+
# For the full list of built-in configuration values, see the documentation:
14+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
15+
16+
# -- Project information -----------------------------------------------------
17+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
18+
19+
project = 'pcxarray'
20+
copyright = '2025, Mississippi State University'
21+
author = "GCER Lab @ Mississippi State University"
22+
23+
# -- General configuration ---------------------------------------------------
24+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
25+
26+
extensions = []
27+
28+
templates_path = ['_templates']
29+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
30+
31+
extensions = [
32+
'sphinx.ext.autodoc',
33+
'sphinx.ext.napoleon', # For Google/Numpy style docstrings
34+
'numpydoc',
35+
'nbsphinx',
36+
'myst_parser',
37+
]
38+
autodoc_default_options = {
39+
'members': True,
40+
'undoc-members': True,
41+
'show-inheritance': True,
42+
}
43+
44+
45+
# -- Options for HTML output -------------------------------------------------
46+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
47+
48+
# html_theme = 'alabaster'
49+
html_theme = "sphinx_rtd_theme"
50+
html_static_path = ['_static']
51+
html_logo = '_static/gcer_alt.png'

docs/examples/gnatsgo.ipynb

Lines changed: 783 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)