Skip to content

Commit c4d737d

Browse files
committed
docs: added references in each docstring to where the function is used in the tutorials. Added and fixed multiple docs references. Added changelogs in docstrings with versionchanged/versionadded directives to outline major changes. Added optional label to multiple args in docstrings
ft: re-added xlabel_rotation for comparison_plots fix: typos in docstrings build-sphinx: rewrite "make clean" directive, to effectively delete generated sphinx-gallery and sphinx-autodocs material.
1 parent 7e3ac59 commit c4d737d

14 files changed

+378
-166
lines changed

csep/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def query_gns(start_time, end_time, min_magnitude=2.950,
333333
verbose (bool): print catalog summary statistics
334334
335335
Returns:
336-
:class:`csep.core.catalogs.CSEPCatalog
336+
:class:`csep.core.catalogs.CSEPCatalog`
337337
"""
338338

339339
# Timezone should be in UTC

csep/utils/plots.py

Lines changed: 311 additions & 152 deletions
Large diffs are not rendered by default.

docs/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ livehtml:
1717

1818
clean:
1919
rm -rf $(BUILDDIR)/*
20-
rm -rf auto_examples/
20+
rm -rf tutorials/*
21+
rm -rf reference/generated
2122

2223
.PHONY: help Makefile
2324

docs/concepts/evaluations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ statistics from these catalogs and compare them against one another.
9191

9292
We provide four statistics that probe fundamental aspects of the earthquake forecasts. Please see
9393
:ref:`Savran et al., 2020<savran-2020>` for a complete description of the individual tests. For the implementation
94-
details please follow the links below and see the :ref:`example<catalog-forecast-evaluation>` for catalog-based
94+
details please follow the links below and see the :ref:`Example <tutorial-catalog-forecast-evaluation>` for catalog-based
9595
forecast evaluation for an end-to-end walk through.
9696

9797
.. automodule:: csep.core.catalog_evaluations

docs/concepts/forecasts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Working with catalog-based forecasts
129129

130130
.. autosummary:: csep.core.forecasts.CatalogForecast
131131

132-
Please see visit :ref:`this<catalog-forecast-evaluation>` example for an end-to-end tutorial on how to evaluate a catalog-based
132+
Please see visit :ref:`this Example <tutorial-catalog-forecast-evaluation>` for an end-to-end tutorial on how to evaluate a catalog-based
133133
earthquake forecast. An example of a catalog-based forecast stored in the default pyCSEP format can be found
134134
`here <https://github.com/SCECcode/pycsep/blob/dev/csep/artifacts/ExampleForecasts/CatalogForecasts/ucerf3-landers_1992-06-28T11-57-34-14.csv>`__.
135135

docs/concepts/regions.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Regions
66

77
.. automodule:: csep.core.regions
88
:no-index:
9-
.. automodule:: csep.utils.basic_types
10-
:no-index:
119

1210
PyCSEP includes commonly used CSEP testing regions and classes that facilitate working with gridded data sets. This
1311
module is early in development and will be a focus of future development.

docs/getting_started/theory.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ examples use the Helmstetter et al (2007) smoothed seismicity forecast
104104
Found 24 events in the ComCat catalog.
105105
106106
107+
.. _theory-consistency-tests:
108+
107109
Consistency tests
108110
~~~~~~~~~~~~~~~~~
109111

@@ -655,6 +657,8 @@ case, the model with aftershocks performs statistically worse than the
655657
benchmark model. We note that this comparison is used for demonstation
656658
purposes only.
657659

660+
.. _theory-catalog-forecasts:
661+
658662
Catalog-based forecast tests
659663
----------------------------
660664

examples/tutorials/catalog_filtering.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100

101101

102102
####################################################################################################################################
103+
#
104+
# .. _tutorial-catalog-filtering-plot:
105+
#
103106
# Plot catalog
104107
# -------------
105108
#

examples/tutorials/catalog_forecast_evaluation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@
102102
comcat_catalog.plot(show=True)
103103

104104
####################################################################################################################################
105+
#
106+
# .. _catalog-forecast-evaluation-exploratory:
107+
#
105108
# Exploratory visualizations
106109
# --------------------------
107110
#
@@ -126,6 +129,9 @@
126129
number_test_result = catalog_evaluations.number_test(forecast, comcat_catalog)
127130

128131
####################################################################################################################################
132+
#
133+
# .. _catalog-forecast-evaluation-plot:
134+
#
129135
# Plot number test result
130136
# -----------------------
131137
#

examples/tutorials/gridded_forecast_evaluation.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
csep.write_json(spatial_test_result, 'example_spatial_test.json')
9494

9595
####################################################################################################################################
96+
#
97+
# .. _grid-forecast-evaluation-plot:
98+
#
9699
# Plot spatial test results
97100
# -------------------------
98101
#
@@ -105,6 +108,9 @@
105108

106109

107110
####################################################################################################################################
111+
#
112+
# .. _grid-forecast-evaluation-plot-comparison:
113+
#
108114
# Performing a comparative test
109115
# -----------------------------
110116
#
@@ -126,6 +132,9 @@
126132

127133

128134
####################################################################################################################################
135+
#
136+
# .. _grid-forecast-evaluation-concentration-roc:
137+
#
129138
# Plot ROC Curves
130139
# ---------------
131140
#
@@ -149,6 +158,9 @@
149158

150159

151160
####################################################################################################################################
161+
#
162+
# .. _grid-forecast-evaluation-roc-and-molchan:
163+
#
152164
# Plot ROC and Molchan curves using the alarm-based approach
153165
# ----------------------------------------------------------
154166

0 commit comments

Comments
 (0)