Skip to content

Commit

Permalink
Use pdbufr to read DWD radar data in bufr format
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Jul 23, 2021
1 parent 48fc337 commit b9a919c
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
echo "Installing package and requirements for ${flavor}"

if [[ "${flavor}" = "testing" ]]; then
poetry install --no-interaction --extras=sql --extras=export --extras=restapi --extras=explorer
poetry install --no-interaction --extras=sql --extras=export --extras=restapi --extras=explorer --extras=bufr --extras=pdbufr

elif [[ "${flavor}" = "docs" ]]; then
poetry install --no-interaction --extras=docs
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ jobs:
path: ${{ steps.poetry-cache-dir.outputs.dir }}
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}-${{ env.CACHE_NUMBER }}

- name: Install eccodes (Mac only)
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install eccodes
fi
shell: bash

- name: Install dependencies
#run: poetry install --no-interaction --no-root --extras=sql --extras=export --extras=restapi --extras=explorer
run: .github/workflows/install.sh testing
#if: steps.poetry-cache-flag.outputs.cache-hit != 'true'

#- name: Install library
# run: poetry install --no-interaction
# #if: steps.poetry-cache-flag.outputs.cache-hit != 'true'

- name: Test
run: poetry run poe test
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Added

- Enable selecting a parameter precisely from a dataset by passing a tuple like [("precipitation_height", "kl")] or
[("precipitation_height", "precipitation_more")], or for cli/restapi use "precipitation_height/kl"
- Allow parsing DWD radar data in bufr format to a pandas DataFrame

Changed
=======
Expand Down
103 changes: 75 additions & 28 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ click-params = "^0.1.1"
cloup = "^0.8.0"

# Optional dependencies aka. "extras"
matplotlib = { version = "^3.3.2", optional = true }
matplotlib = { version = "^3.3.2", optional = true }

openpyxl = { version = "^3.0.7", optional = true }
pyarrow = { version = "^3.0.0", optional = true, markers = "sys_platform != 'darwin' or (sys_platform == 'darwin' and platform_machine != 'arm64')" }
Expand All @@ -119,23 +119,25 @@ psycopg2-binary = { version = "^2.8.6", optional = true }
# HTTP REST API service
fastapi = { version = "^0.61.1", optional = true }
uvicorn = { version = "^0.13.3", optional = true }

# Radar
wradlib = { version = "^1.9.0", optional = true }
pdbufr = { version = "^0.9.0", optional = true }

# Explorer UI service
plotly = { version = "^4.14.3", optional = true }
dash = { version = "^1.19.0", optional = true }
dash-bootstrap-components = { version = "^0.12.0", optional = true }

sphinx = { version = "^3.2.1", optional = true }
sphinx-material = { version = "^0.0.30", optional = true }
sphinx-autodoc-typehints = { version = "^1.11.0", optional = true }
sphinxcontrib-svg2pdfconverter = { version = "^1.1.0", optional = true }
tomlkit = { version = "^0.7.0", optional = true }
ipython = { version = "^7.10.1", optional = true }
ipython-genutils = { version = "^0.2.0", optional = true }
zarr = { version = "^2.7.0", optional = true, markers = "sys_platform != 'darwin' or (sys_platform == 'darwin' and platform_machine != 'arm64')" } # not supported through numcodecs
xarray = { version = "^0.17.0", optional = true }

sphinx = { version = "^3.2.1", optional = true }
sphinx-material = { version = "^0.0.30", optional = true }
sphinx-autodoc-typehints = { version = "^1.11.0", optional = true }
sphinxcontrib-svg2pdfconverter = { version = "^1.1.0", optional = true }
tomlkit = { version = "^0.7.0", optional = true }
ipython = { version = "^7.10.1", optional = true }
ipython-genutils = { version = "^0.2.0", optional = true }
zarr = { version = "^2.7.0", optional = true, markers = "sys_platform != 'darwin' or (sys_platform == 'darwin' and platform_machine != 'arm64')" } # not supported through numcodecs
xarray = { version = "^0.17.0", optional = true }

[tool.poetry.dev-dependencies]
black = "^20.8b1"
Expand Down Expand Up @@ -183,8 +185,8 @@ influxdb = ["influxdb", "influxdb-client"]
cratedb = ["crate"]
mysql = ["mysqlclient"]
postgresql = ["psycopg2-binary"]
radar = ["wradlib", "pybufrkit", "h5py"]
bufr = ["pybufrkit"]
radar = ["wradlib", "pybufrkit", "h5py", "pdbufr"]
bufr = ["pybufrkit", "pdbufr"]

[tool.poetry.scripts]
wetterdienst = 'wetterdienst.ui.cli:cli'
Expand Down
4 changes: 4 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
mac_arm64_unsupported = pytest.mark.skipif(
mac_arm64, reason="can't be tested under mac arm64 due to h5py incompatibility"
)
mac_only = pytest.mark.skipif(
sys.platform.startswith("win") or sys.platform.startswith("lin"),
reason="can't be tested under windows due to eccodes incompatibility",
)
Loading

0 comments on commit b9a919c

Please sign in to comment.