Skip to content

Commit

Permalink
Merge pull request #49 from mivek/feature/human_readable
Browse files Browse the repository at this point in the history
human readable reports
  • Loading branch information
mivek authored Jul 23, 2023
2 parents 21ab26c + 7041fa0 commit c8b628b
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 114 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log

## [1.6.4] - 2023-06-TBD
## [1.6.5] - 2023-07-TBD

### Added

- Implementation of method `__repr__` on class of module `model`.

## [1.6.4] - 2023-06-23

### Fixed

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ This package contains the parser module with the `MetarParser` and `TAFParser` c

### Objects

![model.png](model.png)

#### Wind

Represents the wind part of a metar, taf or trend
Expand Down
24 changes: 12 additions & 12 deletions metar_taf_parser/model/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CloudQuantity(enum.Enum):
OVC = 'OVC' # Overcast
NSC = 'NSC' # No significant cloud

def __str__(self):
def __repr__(self):
return _('CloudQuantity.' + self.value)


Expand All @@ -28,7 +28,7 @@ class CloudType(enum.Enum):
NS = 'NS' # Nimbostratus
SC = 'SC' # Stratocumulus

def __str__(self):
def __repr__(self):
return _('CloudType.' + self.value)


Expand All @@ -39,7 +39,7 @@ class DepositCoverage(enum.Enum):
FROM_26_TO_50 = '5'
FROM_51_TO_100 = '9'

def __str__(self):
def __repr__(self):
return _('DepositCoverage.' + self.name)


Expand All @@ -56,7 +56,7 @@ class DepositType(enum.Enum):
COMPACTED_SNOW = '8'
FROZEN_RIDGES = '9'

def __str__(self):
def __repr__(self):
return _('DepositType.' + self.name)


Expand All @@ -70,7 +70,7 @@ class Descriptive(enum.Enum):
BLOWING = 'BL'
FREEZING = 'FZ'

def __str__(self):
def __repr__(self):
return _('Descriptive.' + self.value)


Expand All @@ -81,7 +81,7 @@ class Flag(enum.Enum):
COR = 'COR'
NIL = 'NIL'

def __str__(self):
def __repr__(self):
return _('Flag.' + self.value)


Expand All @@ -97,7 +97,7 @@ class IcingIntensity(enum.Enum):
SEVERE_RIME_ICING_CLOUD = '8'
SEVERE_CLEAR_ICING_PRECIPITATION = '9'

def __str__(self) -> str:
def __repr__(self) -> str:
return _('IcingIntensity.' + self.value)


Expand All @@ -106,7 +106,7 @@ class Intensity(enum.Enum):
HEAVY = '+'
IN_VICINITY = 'VC'

def __str__(self):
def __repr__(self):
return _('Intensity.' + self.value)


Expand Down Expand Up @@ -134,7 +134,7 @@ class Phenomenon(enum.Enum):
SANDSTORM = 'SS'
FUNNEL_CLOUD = 'FC'

def __str__(self):
def __repr__(self):
return _('Phenomenon.' + self.value)


Expand All @@ -143,7 +143,7 @@ class TimeIndicator(enum.Enum):
FM = 'FM'
TL = 'TL'

def __str__(self):
def __repr__(self):
return _('TimeIndicator.' + self.value)


Expand All @@ -160,7 +160,7 @@ class TurbulenceIntensity(enum.Enum):
SEVERE_CLOUD_FREQUENT = '9'
EXTREME = 'X'

def __str__(self) -> str:
def __repr__(self) -> str:
return _('TurbuleneIntensity.' + self.value)


Expand All @@ -171,5 +171,5 @@ class WeatherChangeType(enum.Enum):
PROB = 'PROB'
INTER = 'INTER'

def __str__(self):
def __repr__(self):
return _('WeatherChangeType.' + self.value)
Loading

0 comments on commit c8b628b

Please sign in to comment.