mirror of
https://github.com/jdejaegh/irm-kmi-api.git
synced 2025-06-27 12:09:26 +02:00
Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
9f0ff16acd | |||
5f6ff3ba30 |
5 changed files with 1666 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
__version__ = '0.1.6'
|
__version__ = '0.2.0'
|
|
@ -26,6 +26,7 @@ MAP_WARNING_ID_TO_SLUG: Final = {
|
||||||
3: 'thunder',
|
3: 'thunder',
|
||||||
7: 'fog',
|
7: 'fog',
|
||||||
9: 'cold',
|
9: 'cold',
|
||||||
|
10: 'heat',
|
||||||
12: 'thunder_wind_rain',
|
12: 'thunder_wind_rain',
|
||||||
13: 'thunderstorm_strong_gusts',
|
13: 'thunderstorm_strong_gusts',
|
||||||
14: 'thunderstorm_large_rainfall',
|
14: 'thunderstorm_large_rainfall',
|
||||||
|
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "irm-kmi-api"
|
name = "irm-kmi-api"
|
||||||
version = "0.1.6"
|
version = "0.2.0"
|
||||||
description = "Retrieve data from the Belgian IRM KMI in Python"
|
description = "Retrieve data from the Belgian IRM KMI in Python"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{ name = "Jules Dejaeghere", email = "curable.grass491@mailer.me" }]
|
authors = [{ name = "Jules Dejaeghere", email = "curable.grass491@mailer.me" }]
|
||||||
|
@ -26,7 +26,7 @@ requires-python = ">=3.11"
|
||||||
Homepage = "https://github.com/jdejaegh/irm-kmi-api"
|
Homepage = "https://github.com/jdejaegh/irm-kmi-api"
|
||||||
|
|
||||||
[tool.bumpver]
|
[tool.bumpver]
|
||||||
current_version = "0.1.6"
|
current_version = "0.2.0"
|
||||||
version_pattern = "MAJOR.MINOR.PATCH"
|
version_pattern = "MAJOR.MINOR.PATCH"
|
||||||
commit_message = "bump version {old_version} -> {new_version}"
|
commit_message = "bump version {old_version} -> {new_version}"
|
||||||
tag_message = "{new_version}"
|
tag_message = "{new_version}"
|
||||||
|
|
1647
tests/fixtures/antwerp_with_heat_warning.json
vendored
Normal file
1647
tests/fixtures/antwerp_with_heat_warning.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -22,3 +22,18 @@ async def test_warning_data() -> None:
|
||||||
assert first.get('friendly_name') == 'Fog'
|
assert first.get('friendly_name') == 'Fog'
|
||||||
assert first.get('id') == 7
|
assert first.get('id') == 7
|
||||||
assert first.get('level') == 1
|
assert first.get('level') == 1
|
||||||
|
|
||||||
|
async def test_warning_heat() -> None:
|
||||||
|
api = get_api_with_data("antwerp_with_heat_warning.json")
|
||||||
|
|
||||||
|
result = api.get_warnings(lang='en')
|
||||||
|
|
||||||
|
assert isinstance(result, list)
|
||||||
|
assert len(result) == 1
|
||||||
|
|
||||||
|
first = result[0]
|
||||||
|
|
||||||
|
assert first.get('slug') == 'heat'
|
||||||
|
assert first.get('friendly_name') == 'Heat'
|
||||||
|
assert first.get('id') == 10
|
||||||
|
assert first.get('level') == 1
|
Loading…
Add table
Reference in a new issue