Skip to content

Commit 19c84f3

Browse files
authored
Merge branch 'SCECcode:master' into master
2 parents d758a15 + d13f74f commit 19c84f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+57947
-357
lines changed

.github/workflows/build-sphinx-no-deploy.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
name: docs
1+
name: build-docs
2+
23
on:
34
pull_request:
45
branches: [ master ]
6+
57
jobs:
68
build_docs:
79
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
shell: bash -l {0}
13+
814
steps:
915
- uses: actions/checkout@v2
10-
- name: Set up Python 3.7
11-
uses: actions/setup-python@v2
16+
- uses: conda-incubator/setup-miniconda@v2
1217
with:
13-
python-version: 3.7
18+
python-version: '3.10'
19+
activate-environment: csep-dev
20+
channels: conda-forge
21+
1422
- name: Install dependencies
1523
run: |
16-
sudo apt-get update
17-
sudo apt-get install libproj-dev proj-data proj-bin
18-
sudo apt-get install libgeos-dev
19-
sudo apt-get install python3-sphinx
20-
python -m pip install --upgrade pip
21-
pip install numpy
22-
pip install wheel
23-
pip install pytest pytest-cov
24-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25-
pip install pillow
26-
- name: Install PyCSEP
24+
conda env update --file requirements.yml
25+
conda info -a
26+
conda list
27+
28+
- name: Install pyCSEP
2729
run: |
28-
python setup.py install
30+
pip install --no-deps -e .
31+
python -c "import csep; print('Version: ', csep.__version__)"
32+
2933
- name: Build documentation
3034
run: |
3135
make -C docs clean

.github/workflows/build-sphinx.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,29 @@ on:
77
jobs:
88
build_docs:
99
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
shell: bash -l {0}
13+
1014
steps:
1115
- uses: actions/checkout@v2
12-
- name: Set up Python 3.7
13-
uses: actions/setup-python@v2
16+
- uses: conda-incubator/setup-miniconda@v2
1417
with:
15-
python-version: 3.7
18+
python-version: '3.10'
19+
activate-environment: csep-dev
20+
channels: conda-forge
21+
1622
- name: Install dependencies
1723
run: |
18-
sudo apt-get update
19-
sudo apt-get install libproj-dev proj-data proj-bin
20-
sudo apt-get install libgeos-dev
21-
sudo apt-get install python3-sphinx
22-
python -m pip install --upgrade pip
23-
pip install numpy
24-
pip install wheel
25-
pip install pytest pytest-cov
26-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
27-
pip install pillow
28-
- name: Install PyCSEP
24+
conda env update --file requirements.yml
25+
conda info -a
26+
conda list
27+
28+
- name: Install pyCSEP
2929
run: |
30-
python setup.py install
30+
pip install --no-deps -e .
31+
python -c "import csep; print('Version: ', csep.__version__)"
32+
3133
- name: Build documentation
3234
env:
3335
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -46,7 +48,5 @@ jobs:
4648
echo "Empty README.md for documenation cache." > README.md
4749
echo "docs.cseptesting.org" > CNAME
4850
git add .
49-
git commit -am "Updating PyCSEP docs for commit ${GITHUB_SHA} made on `date -d"@{SOURCE_DATE_EPOCH} --iso-8601=seconds` from ${GITHUB_REF} by ${GITHUB_ACTOR}"
51+
git commit -am "Updating pyCSEP docs for commit ${GITHUB_SHA} made on `date -d"@{SOURCE_DATE_EPOCH} --iso-8601=seconds` from ${GITHUB_REF} by ${GITHUB_ACTOR}"
5052
git push deploy gh-pages --force
51-
shell: bash
52-

.github/workflows/build-test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'v*'
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
if: github.repository == 'SCECCode/pycsep'
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest]
17+
python-version: ['3.7', '3.8', '3.9', '3.10']
18+
defaults:
19+
run:
20+
shell: bash -l {0}
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: conda-incubator/setup-miniconda@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
activate-environment: csep-dev
28+
channels: conda-forge
29+
30+
- name: Install dependencies
31+
run: |
32+
conda env update --file requirements.yml
33+
conda info -a
34+
conda list
35+
36+
- name: Install pyCSEP
37+
run: |
38+
pip install --no-deps -e .
39+
python -c "import csep; print('Version: ', csep.__version__)"
40+
41+
- name: Test with pytest
42+
run: |
43+
conda install pytest-cov
44+
pytest --cov=./ --cov-config=.coveragerc
45+
46+
- name: Upload coverage
47+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
48+
run: |
49+
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'

.github/workflows/publish-pypi.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and upload to PyPI
2+
3+
# Only build on tagged releases
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
build:
11+
name: Build and upload sdist
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: conda-incubator/setup-miniconda@v2
20+
with:
21+
activate-environment: csep-dev
22+
python-version: '3.10'
23+
channels: conda-forge
24+
25+
- name: Install dependencies
26+
run: |
27+
conda env update --file requirements.yml
28+
conda info -a
29+
conda list
30+
31+
- name: Create sdist
32+
run: |
33+
python setup.py check
34+
python setup.py sdist
35+
36+
- name: Publish Package
37+
uses: pypa/gh-action-pypi-publish@master
38+
with:
39+
user: __token__
40+
password: ${{ secrets.pypi_upload_token }}

.github/workflows/python-app.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# v0.6.0 (02/04/2022)
2+
3+
## Change-log
4+
Adds support for quadtree regions [#184](https://github.com/SCECcode/pycsep/pull/184)
5+
6+
## Credits
7+
Khawaja Asim (@khawajasim)
8+
William Savran (@wsavran)
9+
10+
# v0.5.2 (01/25/2022)
11+
## Change-log
12+
Fixed failing build from matplotlib 3.5.0 release (#162)
13+
Updates to documentation and tutorials (#165)
14+
Added theory of tests to documentation (#171)
15+
Added notebooks folder for community recipes (#173)
16+
Pin numpy version to 1.25.1 to fix (#168)
17+
18+
## Credits
19+
William Savran (@wsavran)
20+
Kirsty Bayliss (@kirstybayliss)
21+
22+
# v0.5.1 (11/15/2021)
23+
24+
## Change-log
25+
Modified plot_spatial_dataset and plot_catalog to correctly handle Global plots (#150)
26+
Updated plot_customizations example in the docs (#150)
27+
Added DOI badge and conda downloads badge (#156)
28+
Added plotting args to catalog evaluation plots (#154)
29+
Add option to ignore colorbar in spatial dataset plots (#154)
30+
31+
## Credits
32+
William Savran (@wsavran)
33+
Pablo Iturrieta (@pabloitu)
34+
35+
# v0.5.0 (11/03/2021)
36+
37+
## Change-log
38+
- Removed normalization of rates on CL-Test (#117)
39+
- Added function to compute bin-wise log-likelihood scores (#118)
40+
- Properly use region to compute spatial counts and spatial magnitude counts in region class (#122)
41+
- Fix for simplified 'fast' lat-lon ratio calculation (#125)
42+
- Add feature to read forecasts with swapped lat/lon values in file (#130)
43+
- Add 'percentile' argument for plotting Poisson evaluations (#131)
44+
- Modify comparison plot to simultaneously plot T and W tests (#132)
45+
- Add feature to trace region outline when plotting spatial data sets (#133)
46+
- Better handling for magnitude ticks in plotting catalogs (#134)
47+
- Refactor polygon to models module (#135)
48+
- Added arguments to modify the fontsize for grid labels and basemap plots (#136)
49+
- Added function to return the midpoints of the valid testing region (#137)
50+
- Include regions when serializing catalogs to JSON (#138)
51+
- Add support for spatial forecasts (#142)
52+
- Upated CI workflows to reduce time required and fix intermittent OOM issues (#145)
53+
- Adds function `get_event_counts` to catalog forecasts (#146)
54+
- Updated README.md (#147)
55+
56+
## Credits
57+
Jose Bayona (@bayonato89)
58+
Marcus Hermann (@mherrmann3)
59+
Pablo Iturrieta (@pabloitu)
60+
Philip Maechling (@pjmaechling)
61+
62+
63+
# v0.4.1 04/14/2021
64+
- Added 'fast' projection option for plotting spatial datasets (#110)
65+
- Fixed region border missing when plotted in various projections (#110)
66+
- Fixed bug where ascii catalog-based forecasts could be incorrectly loaded (#111)
67+
68+
# v0.4.0 03/24/2021
69+
- Fixed issue in plot_poisson_consistency_test where one_sided_lower argument not coloring markers correctly
70+
- Added several plot configurations based on Cartopy
71+
- Plotting spatial datasets with ESRI basemap
72+
- Plotting catalog
73+
- Plotting regions using outline of polygon
74+
- Added defaults to forecasts and catalogs
75+
- Added reader for gzipped UCERF3-ETAS forecasts
76+
- Updates for INGV readers
77+
- Fixed bug causing certain events to be placed into incorrrect bins
78+
79+
# v0.2 11/11/2020
80+
Added new catalog formats, support for masked forecast bins, and bug fixes, where applicable PR id are shown in parenthesis.
81+
82+
- Fixed bug where filtering by catalog by lists did not remove all desired events (#37)
83+
- Included fast reader for Horus catalog (#39)
84+
- Modified INGV emrcmt reader (#40)
85+
- Fixed ndk reader and added unit tests (#44)
86+
- Fixed issue where magnitues were not correctly bound to gridded-forecast class (#46)
87+
- Fixed issue where forecasts did not work if lat/lon were not sorted (#47)
88+
- Fixed minor bug where catalog class did not implement inherited method (#52)
89+
- Gridded forecasts now parse flag from the ASCII file (#50)
90+
- Fixed issue where catalog did not filter properly using datetimes (#55)
91+
92+
93+
94+
# v0.1 10/08/2020
95+
Initial release to PyPI and conda-forge
96+
97+
- Poisson evaluations for gridded forecasts
98+
- Likelihood-free evaluations for catalog-based forecasts
99+
- Catalog gridding and filtering
100+
- Plotting utilities
101+
- Forecast input and output
102+
- Documentation at docs.cseptesting.org
103+
104+
# v0.1-dev, 08/16/2018 -- Initial release.

CHANGELOG.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.

CREDITS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ Contributors:
44
* William Savran, Southern California Earthquake Center
55
* Pablo Iturrieta, GFZ Potsdam
66
* Khawaja Asim, GFZ Potsdam
7-
* Thomas Beutin, GFZ Potsdam
7+
* Han Bao, University of California, Los Angeles
8+
* Kirsty Bayliss, University of Edinburgh
89
* Jose Bayona, University of Bristol
10+
* Thomas Beutin, GFZ Potsdam
911
* Marcus Hermann, University of Naples 'Frederico II'
1012
* Edric Pauk, Southern California Earthquake Center
1113
* Max Werner, University of Bristol

0 commit comments

Comments
 (0)