pipeline.src.entities.alerts

Classes

AlertType

Create a collection of name/value pairs.

GearSpecification

SpeciesSpecification

AdministrativeAreaType

Create a collection of name/value pairs.

AreasTableMetadata

AdminAreasSpecification

AdminAreasSpecWithTable

RegulatoryAreaSpecification

PositionAlertSpecification

Module Contents

class pipeline.src.entities.alerts.AlertType(*args, **kwds)[source]

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

MISSING_DEP_ALERT = 'MISSING_DEP_ALERT'[source]
MISSING_FAR_ALERT = 'MISSING_FAR_ALERT'[source]
MISSING_FAR_48_HOURS_ALERT = 'MISSING_FAR_48_HOURS_ALERT'[source]
SUSPICION_OF_UNDER_DECLARATION_ALERT = 'SUSPICION_OF_UNDER_DECLARATION_ALERT'[source]
POSITION_ALERT = 'POSITION_ALERT'[source]
class pipeline.src.entities.alerts.GearSpecification[source]
gear: str[source]
minMesh: float | None = None[source]
maxMesh: float | None = None[source]
class pipeline.src.entities.alerts.SpeciesSpecification[source]
species: str[source]
minWeight: float | None = None[source]
class pipeline.src.entities.alerts.AdministrativeAreaType(*args, **kwds)[source]

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

FAO_AREA = 'FAO_AREA'[source]
EEZ_AREA = 'EEZ_AREA'[source]
NEAFC_AREA = 'NEAFC_AREA'[source]
DISTANCE_TO_SHORE = 'DISTANCE_TO_SHORE'[source]
class pipeline.src.entities.alerts.AreasTableMetadata[source]
table_name: str[source]
geometry_column: str[source]
filter_column: str[source]
class pipeline.src.entities.alerts.AdminAreasSpecification[source]

Bases: pydantic.BaseModel

areaType: AdministrativeAreaType[source]
areas: List[source]
class pipeline.src.entities.alerts.AdminAreasSpecWithTable[source]
area_type: AdministrativeAreaType[source]
areas: List[source]
metadata: AreasTableMetadata[source]
table: sqlalchemy.Table[source]
class pipeline.src.entities.alerts.RegulatoryAreaSpecification[source]

Bases: pydantic.BaseModel

lawType: str | None = None[source]
topic: str | None = None[source]
zone: str | None = None[source]
class pipeline.src.entities.alerts.PositionAlertSpecification[source]

Bases: pydantic.BaseModel

id: int[source]
name: str[source]
description: str[source]
natinf_code: int[source]
threat: str[source]
threat_characterization: str[source]
is_activated: bool[source]
is_in_error: bool[source]
error_reason: str | None[source]
validity_start_datetime_utc: datetime.datetime | None[source]
validity_end_datetime_utc: datetime.datetime | None[source]
repeat_each_year: bool[source]
track_analysis_depth: float[source]
only_fishing_positions: bool[source]
gears: List[GearSpecification] | None[source]
species: List[SpeciesSpecification] | None[source]
species_catch_areas: List[str] | None[source]
administrative_areas: List[AdminAreasSpecification] | None[source]
regulatory_areas: List[RegulatoryAreaSpecification] | None[source]
min_depth: float | None[source]
flag_states_iso2: List[str] | None[source]
vessel_ids: List[int] | None[source]
district_codes: List[str] | None[source]
producer_organizations: List[str] | None[source]
model_post_init(__context)[source]