Skip to content

Commit

Permalink
Check/Update/Pin dependencies (#104)
Browse files Browse the repository at this point in the history
* MNT: pin pyart to 1.12.7
* MNT: pin jupyter-book to 0.12.3
* MNT: fix wradlib links
* MNT: pin all necessary dependencies in environment.yaml
* MNT: force repo2docker version 2022.02.0
  • Loading branch information
kmuehlbauer authored Feb 21, 2024
1 parent 69f837d commit 97edb29
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 143 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-book-pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
PUBLIC_REGISTRY_CHECK: true
APPENDIX_FILE: "binder/appendix.txt"
REPO2DOCKER_EXTRA_ARGS: --Repo2Docker.base_image=docker.io/library/buildpack-deps:bionic
FORCE_REPO2DOCKER_VERSION: jupyter-repo2docker==2022.02.0

- name: list docker images
run: |
docker image ls -a
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
PUBLIC_REGISTRY_CHECK: true
APPENDIX_FILE: "binder/appendix.txt"
REPO2DOCKER_EXTRA_ARGS: --Repo2Docker.base_image=docker.io/library/buildpack-deps:bionic
FORCE_REPO2DOCKER_VERSION: jupyter-repo2docker==2022.02.0

build-book:
runs-on: ubuntu-latest
Expand Down
38 changes: 19 additions & 19 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ channels:
- conda-forge
dependencies:
- python=3.9
- jupyter-book
- numpy
- scipy
- matplotlib
- cartopy
- pandas
- xarray
- jupyter-book=0.12.3
- numpy<=1.23.2
- scipy<=1.9.1
- matplotlib<=3.5.3
- cartopy<=0.20.3
- pandas<=1.4.3
- xarray<=2022.6.0
- wradlib=1.16.2
- dask
- tqdm
- hvplot
- rioxarray
- geopandas
- datashader
- pyrad_arm
- cookiecutter
- dask<=2022.8.1
- tqdm<=4.64.0
- hvplot<=0.8.0
- rioxarray<=0.12.0
- geopandas<=0.11.1
- datashader<=0.14.2
- arm_pyart=1.12.7
- pyrad_arm<=0.6.0
- cookiecutter<=2.1.1
# this is needed for baltrad compilation
- compilers
- make
Expand All @@ -32,10 +33,9 @@ dependencies:
- libblas=*=*netlib
- liblapacke=*=*netlib
# this is needed for notebooks
- pip
- pyviz_comms>=2.0
- nbstripout
- pip<=22.2.2
- pyviz_comms>=2.0,<3
- nbstripout<=0.6.0
- zip
- pip:
- git+https://github.com/ARM-DOE/pyart.git
- sphinx-pythia-theme
34 changes: 17 additions & 17 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ channels:
- conda-forge
dependencies:
- python=3.9
- jupyter-book
- pip
- jupyter-book=0.12.3
- pip<=22.2.2
- wradlib=1.16.2
- dask
- tqdm
- hvplot
- rioxarray
- geopandas
- datashader
- arm_pyart
- pyrad_arm
- cartopy
- matplotlib
- numpy
- xarray
- metpy
- nbstripout
- cookiecutter
- dask<=2022.8.1
- tqdm<=4.64.0
- hvplot<=0.8.0
- rioxarray<=0.12.0
- geopandas<=0.11.1
- datashader<=0.14.2
- arm_pyart=1.12.7
- pyrad_arm<=0.6.0
- matplotlib<=3.5.3
- cartopy<=0.20.3
- numpy<=1.23.2
- xarray<=2022.6.0
- metpy<=1.3.1
- nbstripout<=0.6.0
- cookiecutter<=2.1.1
# this is needed for baltrad compilation
- compilers
- make
Expand Down
122 changes: 21 additions & 101 deletions notebooks/wradlib/wradlib_data_quality.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"import glob\n",
Expand Down Expand Up @@ -100,11 +96,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"fglob = \"../pyart/data/example_pyrad/22179/MLL22179/MLL2217907250U*.nc\"\n",
Expand All @@ -116,11 +108,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"ds = [xr.open_dataset(f, group=\"sweep_1\", engine=\"cfradial1\", chunks={}) for f in flist]"
Expand All @@ -129,11 +117,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"vol = wrl.io.RadarVolume(engine=\"cfradial1\")\n",
Expand All @@ -144,11 +128,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"display(vol)"
Expand All @@ -166,11 +146,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"sweep_number = 3\n",
Expand All @@ -193,11 +169,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"def extract_clutter(da, wsize=5, thrsnorain=0, tr1=6.0, n_p=6, tr2=1.3, rm_nans=False):\n",
Expand Down Expand Up @@ -230,11 +202,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"swp = vol[sweep_number]\n",
Expand Down Expand Up @@ -267,11 +235,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"fig = plt.figure(figsize=(15, 12))\n",
Expand Down Expand Up @@ -320,11 +284,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"extent = wrl.zonalstats.get_bbox(swpx.x.values, swpx.y.values)\n",
Expand All @@ -334,11 +294,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"# apply fake token, data is already available\n",
Expand All @@ -352,11 +308,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"elevation = wrl.georef.read_gdal_values(dem)\n",
Expand All @@ -366,11 +318,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"elev = xr.DataArray(\n",
Expand All @@ -391,11 +339,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"fig = plt.figure(figsize=(13, 10))\n",
Expand Down Expand Up @@ -423,11 +367,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"import hvplot\n",
Expand All @@ -446,11 +386,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"cl = (\n",
Expand Down Expand Up @@ -495,11 +431,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"rastervalues, rastercoords, proj = wrl.georef.extract_raster_dataset(\n",
Expand Down Expand Up @@ -529,11 +461,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"PBB = wrl.qual.beam_block_frac(polarvalues, swpx.z.values, beamradius)\n",
Expand All @@ -544,11 +472,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"CBB = wrl.qual.cum_beam_block_frac(PBB)\n",
Expand All @@ -565,11 +489,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"outputs_hidden": false
}
},
"metadata": {},
"outputs": [],
"source": [
"# just a little helper function to style x and y axes of our maps\n",
Expand Down Expand Up @@ -836,7 +756,7 @@
"- [dask](https://docs.dask.org/)\n",
"- [gdal](https://gdal.org/index.html)\n",
"- [hvplot](https://hvplot.holoviz.org/)\n",
"- [wradlib xarray backends](https://docs.wradlib.org/en/stable/notebooks/fileio/wradlib_xarray_backends.html)\n",
"- [wradlib xarray backends](https://docs.wradlib.org/projects/old-docs/en/1.16.0/notebooks/fileio/wradlib_xarray_backends.html)\n",
"- [CfRadial1](https://ncar.github.io/CfRadial/)\n",
"- [OPERA ODIM_H5](https://www.eumetnet.eu/activities/observations-programme/current-activities/opera/)\n",
"- [WMO JET-OWR](https://community.wmo.int/governance/commission-membership/commission-observation-infrastructure-and-information-systems-infcom/commission-infrastructure-officers/infcom-management-group/standing-committee-measurements-instrumentation-and-traceability-sc-mint/joint-expert-team)"
Expand Down
4 changes: 2 additions & 2 deletions notebooks/wradlib/wradlib_differential_phase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
"***"
]
},
{
Expand Down Expand Up @@ -1036,7 +1036,7 @@
"\n",
"- [xarray](https://docs.xarray.dev)\n",
"- [dask](https://docs.dask.org/)\n",
"- [wradlib xarray backends](https://docs.wradlib.org/en/stable/notebooks/fileio/wradlib_xarray_backends.html)\n",
"- [wradlib xarray backends](https://docs.wradlib.org/projects/old-docs/en/1.16.0/notebooks/fileio/wradlib_xarray_backends.html)\n",
"- [OPERA ODIM_H5](https://www.eumetnet.eu/activities/observations-programme/current-activities/opera/)\n",
"- [WMO JET-OWR](https://community.wmo.int/governance/commission-membership/commission-observation-infrastructure-and-information-systems-infcom/commission-infrastructure-officers/infcom-management-group/standing-committee-measurements-instrumentation-and-traceability-sc-mint/joint-expert-team)\n",
"- Testud, J., Le Bouar, E., Obligis, E., & Ali-Mehenni, M. (2000). The Rain Profiling Algorithm Applied to Polarimetric Weather Radar, Journal of Atmospheric and Oceanic Technology, 17(3), 332-356. Retrieved Nov 24, 2021, from https://journals.ametsoc.org/view/journals/atot/17/3/1520-0426_2000_017_0332_trpaat_2_0_co_2.xml\n",
Expand Down
Loading

0 comments on commit 97edb29

Please sign in to comment.