Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calm wind #63

Merged
merged 3 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [1.8.2] - 2024-01-14

### Fixed

- Fix the calm wind regex to prevent parsing error with visibility.
- Fix single quotes in French translations.

## [1.8.0] - 2024-01-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion metar_taf_parser/command/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def execute(self, container: AbstractWeatherContainer, visibility_string: str):


class WindCommand:
regex = r'^(VRB|00|[0-3]\d{2})(\d{2})G?(\d{2,3})?(KT|MPS|KM\/H)?'
regex = r'^(VRB|000|[0-3]\d{2})(\d{2})G?(\d{2,3})?(KT|MPS|KM\/H)?'

def __init__(self):
self._pattern = re.compile(WindCommand.regex)
Expand Down
Binary file modified metar_taf_parser/locale/fr/LC_MESSAGES/messages.mo
Binary file not shown.
10 changes: 5 additions & 5 deletions metar_taf_parser/locale/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ msgstr "température horaire de {0}°C et point de rosée de {1}°C"

#:
msgid "Remark.Ice.Accretion.Amount"
msgstr "{0}/100 d''un pouce d''accrétion de glace au cours des {1} dernières heures"
msgstr "{0}/100 d'un pouce d'accrétion de glace au cours des {1} dernières heures"

#:
msgid "Remark.HVY"
Expand Down Expand Up @@ -572,7 +572,7 @@ msgstr "vent de pointe de {1} noeuds en provenance de {0} degrés à {2}:{3}"

#:
msgid "Remark.Precipitation.Amount.Hourly"
msgstr "{0}/100 d''un pouce de précipitation est tombé au cours de la dernière heure"
msgstr "{0}/100 d'un pouce de précipitation est tombé au cours de la dernière heure"

#:
msgid "Remark.Precipitation.Amount.3.6"
Expand Down Expand Up @@ -636,7 +636,7 @@ msgstr "{0} grésil"

#:
msgid "Remark.Sunshine.Duration"
msgstr "{0} minutes d''ensoleillement"
msgstr "{0} minutes d'ensoleillement"

#:
msgid "Remark.Surface.Visibility"
Expand Down Expand Up @@ -696,15 +696,15 @@ msgstr "trombe"

#:
msgid "Remark.Water.Equivalent.Snow.Ground"
msgstr "équivalent d''eau de {0} pouces de neige"
msgstr "équivalent d'eau de {0} pouces de neige"

#:
msgid "Remark.WindShift"
msgstr "changement de vent à {0}:{1}"

#:
msgid "Remark.WindShift.FROPA"
msgstr "changement de vent accompagné d''un passage de front à {0}:{1}"
msgstr "changement de vent accompagné d'un passage de front à {0}:{1}"

#:
msgid "MetarFacade.InvalidIcao"
Expand Down
2 changes: 1 addition & 1 deletion metar_taf_parser/tests/parser/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def test_parse_runway_deposit(self):

def test_parse_empty_wind(self):

metar = MetarParser().parse('KATW 022045Z 0000KT 10SM SCT120 00/M08 A2996')
metar = MetarParser().parse('KATW 022045Z 00000KT 10SM SCT120 00/M08 A2996')

self.assertEqual('KATW', metar.station)
self.assertIsNotNone(metar.wind)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = metar-taf-parser-mivek
version = 1.8.1
version = 1.8.2
author = Jean-Kevin KPADEY
author_email = [email protected]
description = Python project parsing metar and taf message
Expand Down