From 97edb291e273ed95304002f65db83ee78f91f32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20M=C3=BChlbauer?= Date: Wed, 21 Feb 2024 09:27:57 +0100 Subject: [PATCH] Check/Update/Pin dependencies (#104) * 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 --- .github/workflows/build-book-pullrequest.yaml | 2 + .github/workflows/build-book.yaml | 1 + binder/environment.yml | 38 +++--- environment.yml | 34 ++--- notebooks/wradlib/wradlib_data_quality.ipynb | 122 +++--------------- .../wradlib/wradlib_differential_phase.ipynb | 4 +- .../wradlib_quasi_vertical_profiles.ipynb | 2 +- .../wradlib/wradlib_radar_data_io_vis.ipynb | 6 +- 8 files changed, 66 insertions(+), 143 deletions(-) diff --git a/.github/workflows/build-book-pullrequest.yaml b/.github/workflows/build-book-pullrequest.yaml index 2119eb7b..85be074e 100644 --- a/.github/workflows/build-book-pullrequest.yaml +++ b/.github/workflows/build-book-pullrequest.yaml @@ -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 diff --git a/.github/workflows/build-book.yaml b/.github/workflows/build-book.yaml index f3d36cac..542a284e 100644 --- a/.github/workflows/build-book.yaml +++ b/.github/workflows/build-book.yaml @@ -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 diff --git a/binder/environment.yml b/binder/environment.yml index 3a8f2bd6..30a0b61a 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -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 @@ -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 diff --git a/environment.yml b/environment.yml index e4429a0b..9776d424 100644 --- a/environment.yml +++ b/environment.yml @@ -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 diff --git a/notebooks/wradlib/wradlib_data_quality.ipynb b/notebooks/wradlib/wradlib_data_quality.ipynb index ad4fa730..b002c515 100644 --- a/notebooks/wradlib/wradlib_data_quality.ipynb +++ b/notebooks/wradlib/wradlib_data_quality.ipynb @@ -67,11 +67,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "import glob\n", @@ -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", @@ -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]" @@ -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", @@ -144,11 +128,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "display(vol)" @@ -166,11 +146,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "sweep_number = 3\n", @@ -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", @@ -230,11 +202,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "swp = vol[sweep_number]\n", @@ -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", @@ -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", @@ -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", @@ -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", @@ -366,11 +318,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "elev = xr.DataArray(\n", @@ -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", @@ -423,11 +367,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "import hvplot\n", @@ -446,11 +386,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "outputs_hidden": false - } - }, + "metadata": {}, "outputs": [], "source": [ "cl = (\n", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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)" diff --git a/notebooks/wradlib/wradlib_differential_phase.ipynb b/notebooks/wradlib/wradlib_differential_phase.ipynb index 93e63e6b..b9dce850 100644 --- a/notebooks/wradlib/wradlib_differential_phase.ipynb +++ b/notebooks/wradlib/wradlib_differential_phase.ipynb @@ -18,7 +18,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "---" + "***" ] }, { @@ -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", diff --git a/notebooks/wradlib/wradlib_quasi_vertical_profiles.ipynb b/notebooks/wradlib/wradlib_quasi_vertical_profiles.ipynb index 8f756ca7..313c5bef 100644 --- a/notebooks/wradlib/wradlib_quasi_vertical_profiles.ipynb +++ b/notebooks/wradlib/wradlib_quasi_vertical_profiles.ipynb @@ -313,7 +313,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)" ] diff --git a/notebooks/wradlib/wradlib_radar_data_io_vis.ipynb b/notebooks/wradlib/wradlib_radar_data_io_vis.ipynb index 0f18f74a..2da0a908 100644 --- a/notebooks/wradlib/wradlib_radar_data_io_vis.ipynb +++ b/notebooks/wradlib/wradlib_radar_data_io_vis.ipynb @@ -18,7 +18,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "---" + "***" ] }, { @@ -740,9 +740,9 @@ "- [matplotlib axisartist](https://matplotlib.org/stable/tutorials/toolkits/axisartist.html)\n", "- [cartopy](https://scitools.org.uk/cartopy/docs/latest)\n", "- [gdal](https://gdal.org/index.html)\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", "- [rioxarray](https://corteva.github.io/rioxarray/stable/)\n", - "- [wradlib scan strategy](https://docs.wradlib.org/en/stable/notebooks/visualisation/wradlib_plot_scan_strategy.html)\n", + "- [wradlib scan strategy](https://docs.wradlib.org/projects/old-docs/en/1.16.0/notebooks/visualisation/wradlib_plot_scan_strategy.html)\n", "- [Leonardo - Rainbow5](https://electronics.leonardo.com/en/products/rainbow-5-application-software)\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)"