From 663edde231af9ad4a782c5438027ef7f839806ea Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 14 Oct 2024 02:23:10 +0200 Subject: package with python --- pyproject.toml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pyproject.toml (limited to 'pyproject.toml') diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..53cd3e7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[project] +name = "metchart" +version = "0.0.1" +dependencies = [ + "metpy", + "xarray", + "cfgrib", + "pyyaml", + "cartopy" +] +description = "declarative weather chart plotter" +readme = "Readme.md" + +[project.scripts] +metchart = "metchart.run:main" + +[tool.setuptools.packages.find] +include = [ + "metchart" +] + +[build-system] +requires = ['setuptools >= 61.0'] +build-backend = "setuptools.build_meta" -- cgit v1.2.3 From 32863e21fa16e949fc20c4588e84b90916265367 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 14 Oct 2024 02:34:11 +0200 Subject: structure cleanup --- config.yaml | 136 --------------------------------------------------- examples/config.yaml | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + requirements.txt | 5 -- testsetup.sh | 6 +++ 5 files changed, 143 insertions(+), 141 deletions(-) delete mode 100644 config.yaml create mode 100644 examples/config.yaml delete mode 100644 requirements.txt create mode 100644 testsetup.sh (limited to 'pyproject.toml') diff --git a/config.yaml b/config.yaml deleted file mode 100644 index 4f2a23b..0000000 --- a/config.yaml +++ /dev/null @@ -1,136 +0,0 @@ ---- -index: web/data/index.json -aggregator: - icon_eu_other: - module: aggregator.dwd_icon - output: dwd_icon_cache - model: icon-eu - model_long: icon-eu_europe - parameter_caps_in_filename: true - pressure_level_parameters: - - t - - relhum - - u - - v - - fi - - clc - single_level_parameters: - - pmsl - - t_2m - - relhum_2m - - hbas_con - - htop_con - - htop_dc - - tot_prec - - h_snow - pressure_levels: [1000, 950, 925, 900, 875, 850, 825, 800, 775, 700, 600, 500, 400, 300, 250, 200, 150, 100] - steps: [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72] - description: FORECAST DWD ICON-EU - icon_eu_10m_params: - module: aggregator.dwd_icon - output: dwd_icon_cache - model: icon-eu - model_long: icon-eu_europe - parameter_caps_in_filename: true - pressure_level_parameters: [] - single_level_parameters: - - u_10m - - v_10m - - vmax_10m - pressure_levels: [1000, 950, 925, 900, 875, 850, 825, 800, 775, 700, 600, 500, 400, 300, 250, 200, 150, 100] - steps: [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72] - description: FORECAST DWD ICON-EU -modifier: - icon_eu: - module: modifier.merge - aggregator: - - icon_eu_other - - icon_eu_10m_params -plotter: - - module: plotter.meteogram - aggregator: icon_eu - output: web/data - plots: - - name: meteogram_antersberg - lat: 47.96 - lon: 11.99 - - name: meteogram_munich - lat: 48.16 - lon: 11.57 - - - module: 'plotter.vertical_from_grib' - aggregator: icon_eu - output: web/data - plots: - - lat: 47.96 - lon: 11.99 - name: skewt_antersberg - analysis: lcl - - lat: 11.57 - lon: 48.16 - name: skewt_munich - analysis: lcl - - module: 'plotter.horizontal' - aggregator: icon_eu - output: web/data - plots: - - name: dry_con_top - area: null - layers: - - layertype: raster - field: HTOP_DC - - name: t_fi_850 - area: null - layers: - - layertype: raster - field: t - level: 850 - plot_units: degC - colormap: jet - - layertype: contour - field: z - level: 850 - plot_units: '_gpdm' - contours: 5 - clabels: true - - name: t_fi_500 - area: null - layers: - - layertype: raster - field: t - level: 500 - plot_units: degC - colormap: jet - - layertype: contour - field: z - level: 500 - plot_units: '_gpdm' - contours: 5 - clabels: true - - name: t_fi_200 - area: null - layers: - - layertype: raster - field: t - level: 200 - plot_units: degC - colormap: jet - - layertype: contour - field: z - level: 200 - plot_units: '_gpdm' - contours: 5 - clabels: true - - name: pmsl_t850 - area: null - layers: - - layertype: raster - field: t - level: 850 - plot_units: degC - colormap: jet - - layertype: contour - field: prmsl - plot_units: 'hPa' - contours: 10 - clabels: true diff --git a/examples/config.yaml b/examples/config.yaml new file mode 100644 index 0000000..4f2a23b --- /dev/null +++ b/examples/config.yaml @@ -0,0 +1,136 @@ +--- +index: web/data/index.json +aggregator: + icon_eu_other: + module: aggregator.dwd_icon + output: dwd_icon_cache + model: icon-eu + model_long: icon-eu_europe + parameter_caps_in_filename: true + pressure_level_parameters: + - t + - relhum + - u + - v + - fi + - clc + single_level_parameters: + - pmsl + - t_2m + - relhum_2m + - hbas_con + - htop_con + - htop_dc + - tot_prec + - h_snow + pressure_levels: [1000, 950, 925, 900, 875, 850, 825, 800, 775, 700, 600, 500, 400, 300, 250, 200, 150, 100] + steps: [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72] + description: FORECAST DWD ICON-EU + icon_eu_10m_params: + module: aggregator.dwd_icon + output: dwd_icon_cache + model: icon-eu + model_long: icon-eu_europe + parameter_caps_in_filename: true + pressure_level_parameters: [] + single_level_parameters: + - u_10m + - v_10m + - vmax_10m + pressure_levels: [1000, 950, 925, 900, 875, 850, 825, 800, 775, 700, 600, 500, 400, 300, 250, 200, 150, 100] + steps: [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72] + description: FORECAST DWD ICON-EU +modifier: + icon_eu: + module: modifier.merge + aggregator: + - icon_eu_other + - icon_eu_10m_params +plotter: + - module: plotter.meteogram + aggregator: icon_eu + output: web/data + plots: + - name: meteogram_antersberg + lat: 47.96 + lon: 11.99 + - name: meteogram_munich + lat: 48.16 + lon: 11.57 + + - module: 'plotter.vertical_from_grib' + aggregator: icon_eu + output: web/data + plots: + - lat: 47.96 + lon: 11.99 + name: skewt_antersberg + analysis: lcl + - lat: 11.57 + lon: 48.16 + name: skewt_munich + analysis: lcl + - module: 'plotter.horizontal' + aggregator: icon_eu + output: web/data + plots: + - name: dry_con_top + area: null + layers: + - layertype: raster + field: HTOP_DC + - name: t_fi_850 + area: null + layers: + - layertype: raster + field: t + level: 850 + plot_units: degC + colormap: jet + - layertype: contour + field: z + level: 850 + plot_units: '_gpdm' + contours: 5 + clabels: true + - name: t_fi_500 + area: null + layers: + - layertype: raster + field: t + level: 500 + plot_units: degC + colormap: jet + - layertype: contour + field: z + level: 500 + plot_units: '_gpdm' + contours: 5 + clabels: true + - name: t_fi_200 + area: null + layers: + - layertype: raster + field: t + level: 200 + plot_units: degC + colormap: jet + - layertype: contour + field: z + level: 200 + plot_units: '_gpdm' + contours: 5 + clabels: true + - name: pmsl_t850 + area: null + layers: + - layertype: raster + field: t + level: 850 + plot_units: degC + colormap: jet + - layertype: contour + field: prmsl + plot_units: 'hPa' + contours: 10 + clabels: true diff --git a/pyproject.toml b/pyproject.toml index 53cd3e7..3dbfe5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ dependencies = [ ] description = "declarative weather chart plotter" readme = "Readme.md" +license = {"file" = "LICENSE"} [project.scripts] metchart = "metchart.run:main" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 5b491b3..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -metpy -xarray -cfgrib -pyyaml -cartopy diff --git a/testsetup.sh b/testsetup.sh new file mode 100644 index 0000000..abe19dc --- /dev/null +++ b/testsetup.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +[ ! -f venv/bin/activate ] && python -m virtualenv venv +source venv/bin/activate + +pip install -e . -- cgit v1.2.3