Skip to content

Commit 65a838d

Browse files
authored
pre-release commit for v0.5.0 (#149)
* add _version.py * update changelog to markdown for github formatting * update codemeta.json with version information * add sphinx to requirements in setup.py * add instructions to documentation about issuing releases added downloads badges to readme * added note about diff results from catalog filtering example included figure thumbnail in documents for catalog filtering * moved files relative to conf.py * changed PyCSEP -> pyCSEP
1 parent 9e53c0a commit 65a838d

17 files changed

+146
-81
lines changed

CHANGELOG.txt renamed to CHANGELOG.md

+33-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,37 @@
1-
v0.4.1 04/14/2021
1+
# v0.4.2 (11/03/2021)
2+
3+
## Change-log
4+
- Removed normalization of rates on CL-Test (#117)
5+
- Added function to compute bin-wise log-likelihood scores (#118)
6+
- Properly use region to compute spatial counts and spatial magnitude counts in region class (#122)
7+
- Fix for simplified 'fast' lat-lon ratio calculation (#125)
8+
- Add feature to read forecasts with swapped lat/lon values in file (#130)
9+
- Add 'percentile' argument for plotting Poisson evaluations (#131)
10+
- Modify comparison plot to simultaneously plot T and W tests (#132)
11+
- Add feature to trace region outline when plotting spatial data sets (#133)
12+
- Better handling for magnitude ticks in plotting catalogs (#134)
13+
- Refactor polygon to models module (#135)
14+
- Added arguments to modify the fontsize for grid labels and basemap plots (#136)
15+
- Added function to return the midpoints of the valid testing region (#137)
16+
- Include regions when serializing catalogs to JSON (#138)
17+
- Add support for spatial forecasts (#142)
18+
- Upated CI workflows to reduce time required and fix intermittent OOM issues (#145)
19+
- Adds function `get_event_counts` to catalog forecasts (#146)
20+
- Updated README.md (#147)
21+
22+
## Credits
23+
Jose Bayona (@bayonato89)
24+
Marcus Hermann (@mherrmann3)
25+
Pablo Iturrieta (@pabloitu)
26+
Philip Maechling (@pjmaechling)
27+
28+
29+
# v0.4.1 04/14/2021
230
- Added 'fast' projection option for plotting spatial datasets (#110)
331
- Fixed region border missing when plotted in various projections (#110)
432
- Fixed bug where ascii catalog-based forecasts could be incorrectly loaded (#111)
533

6-
v0.4.0 03/24/2021
34+
# v0.4.0 03/24/2021
735
- Fixed issue in plot_poisson_consistency_test where one_sided_lower argument not coloring markers correctly
836
- Added several plot configurations based on Cartopy
937
- Plotting spatial datasets with ESRI basemap
@@ -14,7 +42,7 @@ v0.4.0 03/24/2021
1442
- Updates for INGV readers
1543
- Fixed bug causing certain events to be placed into incorrrect bins
1644
17-
v0.2 11/11/2020
45+
# v0.2 11/11/2020
1846
Added new catalog formats, support for masked forecast bins, and bug fixes, where applicable PR id are shown in parenthesis.
1947

2048
- Fixed bug where filtering by catalog by lists did not remove all desired events (#37)
@@ -29,7 +57,7 @@ v0.2 11/11/2020
2957

3058

3159

32-
v0.1 10/08/2020
60+
# v0.1 10/08/2020
3361
Initial release to PyPI and conda-forge
3462

3563
- Poisson evaluations for gridded forecasts
@@ -39,4 +67,4 @@ v0.1 10/08/2020
3967
- Forecast input and output
4068
- Documentation at docs.cseptesting.org
4169

42-
v0.1-dev, 08/16/2018 -- Initial release.
70+
# v0.1-dev, 08/16/2018 -- Initial release.

MANIFEST.in

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
include README.md
22
include CONTRIBUTING.md
33
include CODE_OF_CONDUCT.md
4-
include LICENSE
5-
include CHANGELOG.txt
4+
include LICENSE.txt
5+
include CHANGELOG.md
6+
include CREDITS.md
7+
include codemeta.json
8+
include CITATION.cff
69
include run_tests.sh
710
include requirements.txt
811
include requirements.yml

README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# pyCSEP: Collaboratory for the Study of Earthquake Predictability
22
![](https://i.postimg.cc/Bb60rVQP/CSEP2-Logo-CMYK.png)
3-
![Python version](https://gist.githubusercontent.com/wsavran/efce311162c32460336a4f9892218532/raw/1b9c060efd1c6e52eb53f82d4249107417d6a5ec/pycsep_python_badge.svg)
4-
![Python application](https://github.com/SCECCode/csep2/workflows/Python%20application/badge.svg)
5-
[![Build sphinx documentation](https://github.com/SCECCode/csep2/workflows/Build%20sphinx%20documentation/badge.svg)](https://cseptesting.org)
6-
[![codecov](https://codecov.io/gh/SCECcode/pycsep/branch/master/graph/badge.svg?token=HTMKM29MAU)](https://codecov.io/gh/SCECcode/pycsep)
3+
<p align=center>
4+
<a target="_blank" href="https://python.org" title="Python version"><img src="https://gist.githubusercontent.com/wsavran/efce311162c32460336a4f9892218532/raw/1b9c060efd1c6e52eb53f82d4249107417d6a5ec/pycsep_python_badge.svg">
5+
<a target="_blank" href="https://pypi.org/project/pycsep"><img src="https://img.shields.io/pypi/dm/pycsep">
6+
<a target="_blank" href="https://github.com/SCECcode/pycsep/actions"><img src="https://github.com/SCECCode/pycsep/workflows/Python%20application/badge.svg">
7+
<a target="_blank" href="https://github.com/SCECcode/pycsep/actions"><img src="https://github.com/SCECCode/csep2/workflows/Build%20sphinx%20documentation/badge.svg">
8+
<a target="_blank" href="https://codecov.io/gh/SCECcode/pycsep"><img src="https://codecov.io/gh/SCECcode/pycsep/branch/master/graph/badge.svg?token=HTMKM29MAU">
9+
</p>
710

811
# Description:
912
The pyCSEP Toolkit helps earthquake forecast model developers evaluate their forecasts with the goal of understanding
@@ -21,7 +24,7 @@ pyCSEP should:
2124
2. [Installation](#installation)
2225
3. [Usage](#usage)
2326
4. [Contributing](#contributing)
24-
5. [Change Log](https://github.com/SCECcode/pycsep/blob/master/CHANGELOG.txt)
27+
5. [Change Log](https://github.com/SCECcode/pycsep/blob/master/CHANGELOG.md)
2528
6. [Credits](#credits)
2629
7. [License](#license)
2730

codemeta.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"codeRepository": "https://github.com/sceccode/pycsep.git",
66
"dateCreated": "2021-10-31",
77
"datePublished": "2020-10-20",
8-
"dateModified": "2021-04-02",
8+
"dateModified": "2021-11-03",
99
"downloadUrl": "https://github.com/sceccode/pycsep",
1010
"issueTracker": "https://github.com/sceccode/pycsep/issues",
11-
"name": "PyCSEP",
12-
"version": "0.4.0",
13-
"description": "The PyCSEP Toolkit helps earthquake forecast model developers evaluate their forecasts with the goal of understanding earthquake predictability.",
11+
"name": "pyCSEP",
12+
"version": "0.5.0",
13+
"description": "The pyCSEP Toolkit helps earthquake forecast model developers evaluate their forecasts with the goal of understanding earthquake predictability.",
1414
"applicationCategory": "Seismology",
1515
"developmentStatus": "active",
1616
"funder": {
@@ -27,9 +27,12 @@
2727
],
2828
"softwareRequirements": [
2929
"Python 3.7 or later (https://python.org)",
30-
"NumPy 1.10 or later (https://numpy.org)",
31-
"GEOS 3.3.3 or later (https://trac.osgeo.org/geos/)",
32-
"PROJ 4.9.0 or later (https://proj4.org/)"
30+
"NumPy 1.21.3 or later (https://numpy.org)",
31+
"SciPy 1.7.1 or later (https://scipy.org)",
32+
"pandas 1.3.4 or later (https://pandas.pydata.org)",
33+
"cartopy 0.20.0 or later (https://scitools.org.uk/cartopy/docs/latest)",
34+
"GEOS 3.7.2 or later (https://trac.osgeo.org/geos/)",
35+
"PROJ 8.0.0 or later (https://proj.org/)"
3336
],
3437
"author": [
3538
{

csep/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import time
44

5+
from csep._version import __version__
56

67
from csep.core import forecasts
78
from csep.core import catalogs
@@ -56,9 +57,12 @@
5657
'strptime_to_utc_datetime',
5758
'datetime_to_utc_epoch',
5859
'epoch_time_to_utc_datetime',
59-
'utc_now_epoch'
60+
'utc_now_epoch',
61+
'__version__'
6062
]
6163

64+
65+
6266
def load_stochastic_event_sets(filename, type='csv', format='native', **kwargs):
6367
""" General function to load stochastic event sets
6468

csep/_version.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__version__ = "0.5.0"
2+

docs/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ help:
1515
livehtml:
1616
sphinx-autobuild -b html $(SOURCEDIR) $(ALLSPHINXOPTS) $(BUILDDIR)/html
1717

18+
clean:
19+
rm -rf $(BUILDDIR)/*
20+
rm -rf auto_examples/
21+
1822
.PHONY: help Makefile
1923

2024
# Catch-all target: route all unknown targets to Sphinx using the new

docs/_static/CSEP2_Logo_CMYK.png

80.7 KB
Loading

docs/conf.py

+17-13
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121

2222
# -- Project information -----------------------------------------------------
2323

24-
project = 'PyCSEP'
24+
project = 'pyCSEP'
2525
author = 'William Savran'
2626

2727
html_show_copyright = False
2828
html_show_sphinx = False
2929

3030
# The short X.Y version
31-
version = 'v0.4'
31+
version = 'v0.5'
3232
# The full version, including alpha/beta/rc tags
33-
release = 'v0.4.1'
33+
release = 'v0.5.0'
3434

3535

3636
# -- General configuration ---------------------------------------------------
@@ -109,21 +109,25 @@
109109
html_theme_options = {}
110110
html_context = {
111111
"github_links": [
112+
(
113+
'Getting help',
114+
"https://github.com/SCECCode/pycsep/issues"
115+
),
116+
(
117+
'Change log',
118+
"https://github.com/SCECcode/pycsep/blob/master/CHANGELOG.md"
119+
),
112120
(
113121
'Contributing',
114-
"https://github.com/SCECcode/pycsep/blob/master/CONTRIBUTING.md",
122+
"https://github.com/SCECcode/pycsep/blob/master/CONTRIBUTING.md"
115123
),
116124
(
117125
'Code of Conduct',
118-
"https://github.com/SCECcode/pycsep/blob/master/CODE_OF_CONDUCT.md",
126+
"https://github.com/SCECcode/pycsep/blob/master/CODE_OF_CONDUCT.md"
119127
),
120128
(
121129
'License',
122-
"https://github.com/SCECcode/pycsep/blob/master/LICENSE",
123-
),
124-
(
125-
'Getting help',
126-
"https://github.com/SCECCode/pycsep/issues",
130+
"https://github.com/SCECcode/pycsep/blob/master/LICENSE"
127131
),
128132
(
129133
'Source Code',
@@ -135,7 +139,7 @@
135139
# Add any paths that contain custom static files (such as style sheets) here,
136140
# relative to this directory. They are copied after the builtin static files,
137141
# so a file named "default.css" will overwrite the builtin "default.css".
138-
# html_static_path = ["_static"]
142+
html_static_path = ["_static"]
139143

140144
# These paths are either relative to html_static_path
141145
# or fully qualified paths (eg. https://...)
@@ -213,7 +217,7 @@
213217
# One entry per manual page. List of tuples
214218
# (source start file, name, description, authors, manual section).
215219
man_pages = [
216-
(master_doc, 'pycsep', 'PyCSEP Documentation',
220+
(master_doc, 'pycsep', 'pyCSEP Documentation',
217221
[author], 1)
218222
]
219223

@@ -224,7 +228,7 @@
224228
# (source start file, target name, title, author,
225229
# dir menu entry, description, category)
226230
texinfo_documents = [
227-
(master_doc, 'pycsep', 'PyCSEP Documentation',
231+
(master_doc, 'pycsep', 'pyCSEP Documentation',
228232
author, 'William Savran', 'Python tools for earthquake forecast evaluation.',
229233
'Miscellaneous'),
230234
]

docs/getting_started/installing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Installing PyCSEP
1+
Installing pyCSEP
22
=================
33

44
We are working on a ``conda-forge`` recipe and PyPI distribution.

docs/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ pyCSEP: Tools for Earthquake Forecast Developers
3939
reference/glossary
4040
reference/publications
4141
reference/roadmap
42-
reference/changelog
4342
reference/developer_notes
4443
reference/api_reference
4544

docs/reference/changelog.rst

-6
This file was deleted.

docs/reference/developer_notes.rst

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
Developer Notes
22
===============
33

4-
Last updated: 10 August 2020
4+
Last updated: 3 November 2021
55

6-
Reproducibility Files
7-
---------------------
6+
Creating a new release of pyCSEP
7+
--------------------------------
88

9-
Store information for reproducibility. This should include the following:
10-
1. version information (git hash of commit)
11-
2. forecast filename
12-
3. evaluation catalog (including necessary information to recreate the filtering properties); maybe just md5
13-
4. do we need calculation dates?
9+
These are the steps required to create a new release of pyCSEP. This requires a combination of updates to the repository
10+
and Github. You will need to build the wheels for distribution on PyPI and upload them to GitHub to issue a release.
11+
The final step involves uploading the tar-ball of the release to PyPI. CI tools provided by `conda-forge` will automatically
12+
bump the version on `conda-forge`. Note: permissions are required to push new versions to PyPI.
1413

15-
Evaluation Results
16-
------------------
14+
1. Code changes
15+
***************
16+
1. Bump the version number in `_version.py <https://github.com/SCECcode/pycsep/tree/master/csep/_version.py>`_
17+
2. Update `codemeta.json <https://github.com/SCECcode/pycsep/blob/master/codemeta.json>`_
18+
3. Update `CHANGELOG.md <https://github.com/SCECcode/pycsep/blob/master/CHANGELOG.md>`_. Include links to Github pull requests if possible.
19+
4. Update `CREDITS.md <https://github.com/SCECcode/pycsep/blob/master/CREDITS.md>`_ if required.
20+
5. Update the version in `conf.py <https://github.com/SCECcode/pycsep/blob/master/docs/conf.py>`_.
21+
6. Issue a pull request that contains these changes.
22+
7. Merge pull request when all changes are merged into `master` and versions are correct.
1723

18-
* Each evaluation should return an evaluation result class that has an associated .plot() method.
19-
* We should be able to .plot() most everything that makes sense including forecasts and evaluation results.
24+
2. Creating source distribution
25+
*******************************
2026

21-
* How do we .plot() a catalog?
22-
* Should we .plot() a region?
23-
* For serialization, we can identify the appropriate class as a string in the class state and use that to create the correct object on load.
27+
Issue these commands from the top-level directory of the project::
2428

25-
Forecast metadata information
26-
-----------------------------
29+
python setup.py check
2730

28-
1. Forecast should contain metadata information to identify properties of the forecast
31+
If that executes with no warnings or failures build the source distribution using the command::
2932

30-
* Start and end date
31-
* Spatial region
32-
* Magnitude bins
33+
python setup.py sdist
3334

34-
Working with GriddedForecasts
35-
-----------------------------
35+
This creates a folder called `dist` that contains a file called `pycsep-X.Y.Z.tar.gz`. This is the distribution
36+
that will be uploaded to `PyPI`, `conda-forge`, and Github.
3637

37-
* Right now, we can only spatial counts over the entire magnitude range. What if we wanted to have some control over this?
38-
* Might want to plot above some magnitude threshold or within some incremental threshold.
39-
* Should be able to have a method that returns a new GriddedForecast with specified parameters such as min/max magnitude.
40-
41-
Region information
42-
------------------
43-
* The region information will need to accommodate more complex spaces including 3D areas and those with non-regular grids (e.g.,
44-
quadtrees or meshes)
38+
Upload to PyPI using `twine`. This requires permissions to push to the PyPI account.
4539

40+
3. Create release on Github
41+
***************************
42+
1. Create a new `release <https://github.com/SCECcode/pycsep/releases>`_ on GitHub. This can be saved as a draft until it's ready.
43+
2. Copy new updates information from `CHANGELOG.md <https://github.com/SCECcode/pycsep/blob/master/CHANGELOG.md>`_.
44+
3. Upload tar-ball created from `setup.py`.
45+
4. Publish release.

docs/reference/roadmap.rst

+11-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
Development Roadmap
55
###################
66

7-
1. Include simple examples that people should be able work through by hand
8-
2. Example scripts and/or programs that expand on the tutorials to show users how to complete more complex end-to-end
9-
processing tasks
10-
3. Expand the :mod:`regions<csep.core.regions>` to accommodate more complex regions, such as a quad-tree or triangulated
11-
mesh.
7+
This page contains expected changes for new releases of `pyCSEP`.
8+
Last updated 3 November 2021.
9+
10+
v0.6.0
11+
======
12+
13+
1. Include receiver operating characteristic (ROC) curve
14+
2. Kagan I1 score
15+
3. Add function to plot spatial log-likelihood scores
16+
4. Add documentation section to explain maths of CSEP tests
17+
1218

1319

examples/tutorials/catalog_filtering.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import csep
2525
from csep.core import regions
2626
from csep.utils import time_utils, comcat
27+
# sphinx_gallery_thumbnail_path = '_static/CSEP2_Logo_CMYK.png'
2728

2829
####################################################################################################################################
2930
# Load catalog
@@ -55,7 +56,8 @@
5556
# We need to define desired start and end times for the catalog using a time-string format. PyCSEP uses integer times for doing
5657
# time manipulations. Time strings can be converted into integer times using
5758
# :func:`csep.utils.time_utils.strptime_to_utc_epoch`. The :meth:`csep.core.catalog.AbstractBaseCatalog.filter` also
58-
# accepts a list of strings to apply multiple filters.
59+
# accepts a list of strings to apply multiple filters. Note: The number of events may differ if this script is ran
60+
# at a later date than shown in this example.
5961

6062
# create epoch times from time-string formats
6163
start_epoch = csep.utils.time_utils.strptime_to_utc_epoch('2019-07-06 03:19:54.040000')

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ pytest-cov
1212
sphinx
1313
sphinx-gallery
1414
sphinx-rtd-theme
15-
pillow
15+
pillow

0 commit comments

Comments
 (0)