Skip to content

Commit d819159

Browse files
authored
Merge pull request #311 from tobac-project/RC_v1.5.0
Merge `RC_v1.5.0` into `main`
2 parents 43060c2 + 033cf0d commit d819159

File tree

69 files changed

+100438
-2064
lines changed

Some content is hidden

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

69 files changed

+100438
-2064
lines changed

.github/workflows/check_formatting.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v2
8-
- uses: actions/setup-python@v2
8+
- name: Set up conda
9+
uses: conda-incubator/setup-miniconda@v2
910
with:
10-
python-version: '3.8'
11-
- run: pip install .
12-
- run: pip install black==22.6.0
13-
- run: black tobac --check
14-
11+
miniforge-version: latest
12+
miniforge-variant: mambaforge
13+
channel-priority: strict
14+
channels: conda-forge
15+
show-channel-urls: true
16+
use-only-tar-bz2: true
17+
18+
- name: Install dependencies and check formatting
19+
shell: bash -l {0}
20+
run:
21+
mamba install --quiet --yes --file requirements.txt black &&
22+
black tobac --check

.github/workflows/check_json.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Check Zenodo JSON Formatting
2+
on: [push, pull_request]
3+
jobs:
4+
check-json-formatting:
5+
runs-on: ubuntu-latest
6+
defaults:
7+
run:
8+
shell: bash -el {0}
9+
steps:
10+
- name: check out repository code
11+
uses: actions/checkout@v3
12+
- name: set up conda environment
13+
uses: conda-incubator/setup-miniconda@v2
14+
with:
15+
auto-update-conda: true
16+
auto-activate-base: false
17+
activate-environment: checkjson-env
18+
- name: Install check-jsonschema
19+
run: |
20+
pip install check-jsonschema
21+
- name: Check zenodo JSON formatting
22+
run: |
23+
check-jsonschema --schemafile https://zenodraft.github.io/metadata-schema-zenodo/latest/schema.json .zenodo.json
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Jupyter Notebooks CI
2+
on: [push, pull_request]
3+
jobs:
4+
Check-Notebooks:
5+
runs-on: ubuntu-latest
6+
defaults:
7+
run:
8+
shell: bash -el {0}
9+
steps:
10+
- name: check out repository code
11+
uses: actions/checkout@v3
12+
- name: set up conda environment
13+
uses: conda-incubator/setup-miniconda@v2
14+
with:
15+
auto-update-conda: true
16+
auto-activate-base: false
17+
activate-environment: notebook-env
18+
- name: Install tobac dependencies
19+
run: |
20+
conda install -c conda-forge --yes ffmpeg gcc jupyter pytables
21+
conda install -c conda-forge --yes --file example_requirements.txt
22+
- name: Install tobac
23+
run: |
24+
pip install .
25+
- name: Find all notebook files
26+
run: |
27+
find . -type f -name '*.ipynb' > nbfiles.txt
28+
cat nbfiles.txt
29+
- name: Execute all notebook files
30+
run: |
31+
while IFS= read -r nbpath; do
32+
jupyter nbconvert --inplace --ClearMetadataPreprocessor.enabled=True --clear-output $nbpath
33+
jupyter nbconvert --to notebook --inplace --execute $nbpath
34+
done < nbfiles.txt

.github/workflows/codecov-CI.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ jobs:
77
runs-on: ubuntu-latest
88
env:
99
OS: ubuntu-latest
10-
PYTHON: '3.9'
10+
PYTHON: "3.9"
1111
steps:
12-
- uses: actions/checkout@v2
13-
# Similar to MetPy install-conda action
14-
- name: Set up conda
15-
uses: conda-incubator/setup-miniconda@v2
16-
with:
17-
miniforge-version: latest
18-
miniforge-variant: mambaforge
19-
channel-priority: strict
20-
channels: conda-forge
21-
show-channel-urls: true
22-
use-only-tar-bz2: true
23-
24-
- name: Install dependencies and generate report
25-
shell: bash -l {0}
26-
run: mamba install --quiet --yes --file conda-requirements.txt coverage pytest-cov &&
27-
python -m coverage run -m pytest --cov=./ --cov-report=xml
28-
- name: Upload Coverage to Codecov
29-
uses: codecov/codecov-action@v3
30-
with:
31-
fail_ci_if_error: true
32-
flags: unittests
33-
12+
- uses: actions/checkout@v2
13+
# Similar to MetPy install-conda action
14+
- name: Set up conda
15+
uses: conda-incubator/setup-miniconda@v2
16+
with:
17+
miniforge-version: latest
18+
miniforge-variant: mambaforge
19+
channel-priority: strict
20+
channels: conda-forge
21+
show-channel-urls: true
22+
use-only-tar-bz2: true
23+
24+
- name: Install dependencies and generate report
25+
shell: bash -l {0}
26+
run:
27+
mamba install --quiet --yes --file requirements.txt coverage pytest-cov &&
28+
python -m coverage run -m pytest --cov=./ --cov-report=xml
29+
- name: Upload Coverage to Codecov
30+
uses: codecov/codecov-action@v3
31+
with:
32+
fail_ci_if_error: true
33+
flags: unittests

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,12 @@ __pycache__
33
.vscode
44
htmlcov
55
.coverage
6-
build
6+
build
7+
.idea
8+
examples/*/Save
9+
examples/*/Plot
10+
examples/climate-processes-tobac_example_data-b3e69ee
11+
.ipynb_checkpoints
12+
.DS_Store
13+
*.egg-info
14+

.zenodo.json

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
{
22
"title": "tobac - Tracking and Object-based Analysis of Clouds",
3-
"description": "tobac is a Python package to identify, track and analyze clouds in different types of gridded datasets, such as 3D model output from cloud-resolving model simulations or 2D data from satellite retrievals.",
3+
"description": "tobac is a Python package to identify, track and analyze clouds and other atmospheric phenomena in different types of gridded datasets, such as 3D model output from cloud-resolving model simulations or 2D data from satellite retrievals.",
44
"creators": [
55
{
66
"name": "tobac Community"
77
},
88
{
9-
"name": "Heikenfeld, Max",
10-
"affiliation": "University of Oxford",
11-
"orcid": "0000-0001-8124-8048"
12-
},
13-
{
14-
"name": "Marinescu, Peter J.",
15-
"affiliation": "Colorado State University",
16-
"orcid": "0000-0002-5842-969X"
9+
"name": "Brunner, Kelcy",
10+
"affiliation": "Texas Tech University",
11+
"orcid": "0000-0003-3938-0963"
1712
},
1813
{
1914
"name": "Freeman, Sean W.",
20-
"affiliation": "Colorado State University",
15+
"affiliation": "The University of Alabama in Huntsville",
2116
"orcid": "0000-0002-7398-1597"
2217
},
23-
{
24-
"name": "Kukulies, Julia",
25-
"affiliation": "University of Gothenburg (Sweden)",
26-
"orcid": "0000-0001-6084-0069"
27-
},
2818
{
2919
"name": "Jones, William K.",
3020
"affiliation": "University of Oxford",
3121
"orcid": "0000-0001-9786-3723"
3222
},
23+
24+
{
25+
"name": "Kukulies, Julia",
26+
"affiliation": "University of Gothenburg (Sweden)",
27+
"orcid": "0000-0001-6084-0069"
28+
},
3329
{
3430
"name": "Senf, Fabian",
3531
"affiliation": "Leibniz Institute for Tropospheric Research, Leipzig (Germany)",
@@ -41,40 +37,46 @@
4137
"orcid": "0000-0003-1959-442X"
4238
},
4339
{
44-
"name": "Brunner, Kelcy",
45-
"affiliation": "Texas Tech University",
46-
"orcid": "0000-0003-3938-0963"
40+
"name": "Stier, Philip",
41+
"affiliation": "University of Oxford",
42+
"orcid": "0000-0002-1191-0128"
43+
},
44+
{
45+
"name": "van den Heever, Sue C.",
46+
"affiliation": "Colorado State University",
47+
"orcid": "0000-0001-9843-3864"
48+
},
49+
{
50+
"name": "Heikenfeld, Max",
51+
"affiliation": "University of Oxford",
52+
"orcid": "0000-0001-8124-8048"
53+
},
54+
{
55+
"name": "Marinescu, Peter J.",
56+
"affiliation": "Colorado State University",
57+
"orcid": "0000-0002-5842-969X"
4758
},
4859
{
4960
"name": "Collis, Scott M.",
5061
"affiliation": "Argonne National Laboratory",
5162
"orcid": "0000-0002-2303-687X"
5263
},
5364
{
54-
"name": "Pfeifer, Nils",
65+
"name": "Lettl, Kolya",
5566
"affiliation": "Leibniz Institute for Tropospheric Research, Leipzig (Germany)",
56-
"orcid": "0000-0002-5350-1445"
67+
"orcid": "0000-0002-4524-8152"
5768
},
69+
5870
{
59-
"name": "Lettl, Kolya",
71+
"name": "Pfeifer, Nils",
6072
"affiliation": "Leibniz Institute for Tropospheric Research, Leipzig (Germany)",
61-
"orcid": "0000-0002-4524-8152"
73+
"orcid": "0000-0002-5350-1445"
6274
},
6375
{
6476
"name": "Raut, Bhupendra A.",
6577
"affiliation": "Northwestern-Argonne Institute of Science and Engineering, Argonne National Laboratory",
6678
"orcid": "0000-0001-5598-1393"
6779
},
68-
{
69-
"name": "Stier, Philip",
70-
"affiliation": "University of Oxford",
71-
"orcid": "0000-0002-1191-0128"
72-
},
73-
{
74-
"name": "van den Heever, Sue C.",
75-
"affiliation": "Colorado State University",
76-
"orcid": "0000-0001-9843-3864"
77-
},
7880
{
7981
"name": "Zhang, Xin",
8082
"affiliation": "Nanjing University of Information Science & Technology (China)",

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
### Tobac Changelog
22

3+
_**Version 1.5.0:**_
4+
5+
**Enhancements for Users**
6+
7+
- Feature detection and tracking in three dimensions is now supported [#209](https://github.com/tobac-project/tobac/pull/209)
8+
- Feature detection, segmentation, and tracking across periodic boundaries is now supported [#259](https://github.com/tobac-project/tobac/pull/259)
9+
- Transformation of feature detection points to allow segmentation on a new grid is now supported [#242](https://github.com/tobac-project/tobac/pull/242)
10+
- `n_min_threshold` in feature detection can now be set for each threshold level instead of uniformly for all thresholds [#208](https://github.com/tobac-project/tobac/pull/208)
11+
- Feature detection now has the option to only detect a feature if all previous thresholds have been met [#283](https://github.com/tobac-project/tobac/pull/283)
12+
- Unsegmented points can now have their marker value selected [#285](https://github.com/tobac-project/tobac/pull/285)
13+
- Minimum distance filtering is now substantially faster [#249](https://github.com/tobac-project/tobac/pull/249)
14+
- `combine_feature_dataframes` now allows the retention of feature numbers [#300](https://github.com/tobac-project/tobac/pull/300)
15+
- `scikit-learn` is now a required dependency; `pytables` and `cf-units` are no longer direct dependencies of *tobac* [#204](https://github.com/tobac-project/tobac/pull/204)
16+
17+
**Bug fixes**
18+
19+
- An error is now raised if none of the search range parameters (`v_max`, `d_max`, `d_min`) are set in `linking_trackpy` [#223](https://github.com/tobac-project/tobac/pull/223)
20+
- Minimum distance filtering in feature detection (set through `min_distance` in `feature_detection_multithreshold`, run through `filter_min_distance`) has been fixed to properly work when `target=minimum`. [#244](https://github.com/tobac-project/tobac/pull/244)
21+
- Interpolated numeric coordinates now preserve their datatypes (i.e., `float`s stay `float`s) in feature detection [#250](https://github.com/tobac-project/tobac/pull/250)
22+
- Fixes to the internal `find_axis_from_coord` utility to allow for non-dimensional coordinates to be correctly dealt with [#255](https://github.com/tobac-project/tobac/pull/255)
23+
- Jupyter notebooks changed to use string paths to work around an Iris bug [#294](https://github.com/tobac-project/tobac/pull/294)
24+
- Minimum distance filtering updated to produce consistent results [#249](https://github.com/tobac-project/tobac/pull/249)
25+
26+
**Documentation**
27+
28+
- Enhancements to the documentation of how *tobac* links features together [210](https://github.com/tobac-project/tobac/pull/210)
29+
- Fixes to the API documentation generation when using type hints [#305](https://github.com/tobac-project/tobac/pull/305)
30+
31+
**Internal Enhancements**
32+
33+
- New converting decorators (`xarray_to_iris`, `iris_to_xarray`, `xarray_to_irispandas`, `irispandas_to_xarray`) have been added for internal use that will allow the upcoming transition to xarray throughout *tobac* to occur more smoothly. [#179](https://github.com/tobac-project/tobac/pull/179)
34+
- The `utils` module has been broken up from a single `utils.py` file to multiple files inside a `utils` folder, allowing for ease of maintenance and fewer long code files. [#191](https://github.com/tobac-project/tobac/pull/191)
35+
- `scipy.interpolate.interp2d` in `add_coordinates` and `add_coordinates_3D` has been replaced with `scipy.interpolate.interpn` as `interp2d` has been deprecated. [#279](https://github.com/tobac-project/tobac/pull/279)
36+
- `setup.py` updated to draw its required packages from `requirements.txt` [#288](https://github.com/tobac-project/tobac/pull/288)
37+
38+
39+
40+
**Repository Enhancements**
41+
42+
- New CI was added to automatically check the example and documentation Jupyter notebooks [#258](https://github.com/tobac-project/tobac/pull/258), [#290](https://github.com/tobac-project/tobac/pull/290)
43+
- The `check_formatting` CI action has been revised to install dependencies through `conda` [#288](https://github.com/tobac-project/tobac/pull/288)
44+
- Repository authors updated [#289](https://github.com/tobac-project/tobac/pull/289)
45+
- CI added to check author list formatting for Zenodo [#292](https://github.com/tobac-project/tobac/pull/292)
46+
47+
48+
**Deprecations**
49+
50+
- All functions in `centerofgravity.py` (`calculate_cog`, `calculate_cog_untracked`, `center_of_gravity`) have been deprecated and will be removed or significantly changed in v2.0. [#200](https://github.com/tobac-project/tobac/pull/200)
51+
- `plot_mask_cell_track_follow`, `plot_mask_cell_individual_follow`, `plot_mask_cell_track_static`, `plot_mask_cell_individual_static`, `plot_mask_cell_track_2D3Dstatic`, `plot_mask_cell_track_3Dstatic`, `plot_mask_cell_individual_3Dstatic`, and `plot_mask_cell_track_static_timeseries` in `plotting.py` have been deprecated and will be removed or significantly changed in v2.0. [#200](https://github.com/tobac-project/tobac/pull/200)
52+
- The wrapper functions in `wrapper.py` (`tracking_wrapper` and `maketrack`) have been deprecated and will be removed in v2.0. [#200](https://github.com/tobac-project/tobac/pull/200)
53+
- `cell_statistics_all`, `cell_statistics`, and `cog_cell` in the analysis module have been deprecated and will be removed or significantly changed in v2.0. [#207](https://github.com/tobac-project/tobac/pull/207)
54+
- `tobac.utils.combine_tobac_feats` has been renamed to `tobac.utils.combine_feature_dataframes`, and the original name has been deprecated and will be removed in a future release. [#300](https://github.com/tobac-project/tobac/pull/300)
55+
56+
57+
358
_**Version 1.4.2:**_
459

560

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can also install conda via git, either for development purposes or to use sp
3636

3737
If you are using anaconda, the following command from within the cloned repository should make sure all dependencies are met and up to date:
3838
```
39-
conda install -c conda-forge --yes --file conda-requirements.txt
39+
conda install -c conda-forge --yes --file requirements.txt
4040
```
4141
You can directly install the package directly from github with pip and either of the two following commands:
4242
```

conda-requirements.txt renamed to dev_requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
numpy
33
scipy
44
scikit-image
5+
scikit-learn
56
pandas
6-
pytables
77
matplotlib
88
iris
9-
cf-units
109
xarray
1110
cartopy
1211
trackpy
1312
pre-commit
13+
black
14+
pytest
15+

doc/analysis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
..
22
Documentation of analysis functions
33
TODO: include descriptions of the analysis functions and examples
4+
45
Analysis
56
=========
67
tobac provides several analysis functions that allow for the calculation of important quantities based on the tracking results. This includes the calculation of properties such as feature lifetimes and feature areas/volumes, but also allows for a convenient calculation of statistics for arbitrary fields of the same shape as as the input data used for the tracking analysis.
7-

0 commit comments

Comments
 (0)