pipeline.src.entities.pnos ========================== .. py:module:: pipeline.src.entities.pnos Classes ------- .. autoapisummary:: pipeline.src.entities.pnos.PnoCatch pipeline.src.entities.pnos.PnoSource pipeline.src.entities.pnos.PnoToRender pipeline.src.entities.pnos.PreRenderedPno pipeline.src.entities.pnos.ReturnToPortPurpose pipeline.src.entities.pnos.PnoAddressee pipeline.src.entities.pnos.RenderedPno pipeline.src.entities.pnos.PnoToSend pipeline.src.entities.pnos.PriorNotificationSentMessage Module Contents --------------- .. py:class:: PnoCatch .. py:attribute:: species_code :type: str .. py:attribute:: species_name :type: str .. py:attribute:: species_name_code :type: str .. py:attribute:: weight :type: float .. py:attribute:: number_of_fish :type: int .. py:attribute:: fao_area :type: str .. py:attribute:: statistical_rectangle :type: str .. py:method:: __post_init__() .. py:class:: PnoSource(*args, **kwds) Bases: :py:obj:`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 - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: MANUAL :value: 'MANUAL' .. py:attribute:: LOGBOOK :value: 'LOGBOOK' .. py:class:: PnoToRender .. py:attribute:: id :type: int .. py:attribute:: operation_datetime_utc :type: datetime.datetime .. py:attribute:: report_id :type: str .. py:attribute:: report_datetime_utc :type: datetime.datetime .. py:attribute:: vessel_id :type: str .. py:attribute:: cfr :type: str .. py:attribute:: ircs :type: str .. py:attribute:: external_identification :type: str .. py:attribute:: vessel_name :type: str .. py:attribute:: flag_state :type: str .. py:attribute:: purpose :type: str .. py:attribute:: catch_onboard :type: List[dict] .. py:attribute:: port_locode :type: str .. py:attribute:: port_name :type: str .. py:attribute:: facade :type: str .. py:attribute:: predicted_arrival_datetime_utc :type: datetime.datetime .. py:attribute:: predicted_landing_datetime_utc :type: datetime.datetime .. py:attribute:: trip_gears :type: List[dict] .. py:attribute:: trip_segments :type: List[dict] .. py:attribute:: pno_types :type: List[dict] .. py:attribute:: note :type: str .. py:attribute:: vessel_length :type: float .. py:attribute:: mmsi :type: str .. py:attribute:: risk_factor :type: float .. py:attribute:: last_control_datetime_utc :type: datetime.datetime .. py:attribute:: last_control_infractions :type: List[dict] .. py:attribute:: is_verified :type: bool .. py:attribute:: is_being_sent :type: bool .. py:attribute:: source :type: PnoSource .. py:attribute:: is_correction :type: bool .. py:attribute:: previous_notification_date_utc :type: datetime.datetime | None .. py:method:: __post_init__() .. py:class:: PreRenderedPno .. py:attribute:: id :type: int .. py:attribute:: operation_datetime_utc :type: datetime.datetime .. py:attribute:: report_id :type: str .. py:attribute:: report_datetime_utc :type: datetime.datetime .. py:attribute:: vessel_id :type: str .. py:attribute:: cfr :type: str .. py:attribute:: ircs :type: str .. py:attribute:: external_identification :type: str .. py:attribute:: vessel_name :type: str .. py:attribute:: flag_state :type: str .. py:attribute:: purpose :type: str .. py:attribute:: catch_onboard :type: pandas.DataFrame .. py:attribute:: bft_summary :type: str .. py:attribute:: port_locode :type: str .. py:attribute:: port_name :type: str .. py:attribute:: facade :type: str .. py:attribute:: predicted_arrival_datetime_utc :type: datetime.datetime .. py:attribute:: predicted_landing_datetime_utc :type: datetime.datetime .. py:attribute:: trip_gears :type: List[src.entities.fleet_segments.FishingGear] .. py:attribute:: trip_segments :type: List[src.entities.fleet_segments.FleetSegment] .. py:attribute:: pno_types :type: List[str] .. py:attribute:: note :type: str .. py:attribute:: vessel_length :type: float .. py:attribute:: mmsi :type: str .. py:attribute:: risk_factor :type: float .. py:attribute:: last_control_datetime_utc :type: datetime.datetime .. py:attribute:: last_control_infractions :type: List[src.entities.missions.Infraction] .. py:attribute:: is_verified :type: bool .. py:attribute:: is_being_sent :type: bool .. py:attribute:: is_landing :type: bool .. py:attribute:: source :type: PnoSource .. py:attribute:: purpose_suffix :type: str .. py:attribute:: is_zero :type: bool .. py:attribute:: is_correction :type: bool .. py:attribute:: previous_notification_date_utc :type: datetime.datetime | None .. py:method:: assert_equal(left: object, right: object) :staticmethod: .. py:class:: ReturnToPortPurpose(*args, **kwds) Bases: :py:obj:`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 - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: SHE :value: 'SHE' .. py:attribute:: OTH :value: 'OTH' .. py:attribute:: LAN :value: 'LAN' .. py:attribute:: REF :value: 'REF' .. py:attribute:: REP :value: 'REP' .. py:attribute:: RES :value: 'RES' .. py:attribute:: ECY :value: 'ECY' .. py:attribute:: TRA :value: 'TRA' .. py:attribute:: SCR :value: 'SCR' .. py:attribute:: GRD :value: 'GRD' .. py:attribute:: ACS :value: 'ACS' .. py:method:: label() .. py:class:: PnoAddressee .. py:attribute:: name :type: str .. py:attribute:: organization :type: str .. py:attribute:: communication_means :type: src.entities.communication_means.CommunicationMeans .. py:attribute:: email_address_or_number :type: str .. py:class:: RenderedPno .. py:attribute:: report_id :type: str .. py:attribute:: vessel_id :type: int .. py:attribute:: cfr :type: str .. py:attribute:: vessel_name :type: str .. py:attribute:: is_verified :type: bool .. py:attribute:: is_being_sent :type: bool .. py:attribute:: trip_segments :type: list .. py:attribute:: pno_types :type: List[str] .. py:attribute:: port_locode :type: str .. py:attribute:: facade :type: str .. py:attribute:: source :type: PnoSource .. py:attribute:: purpose_suffix :type: str .. py:attribute:: html_for_pdf :type: str | None :value: None .. py:attribute:: pdf_document :type: bytes | None :value: None .. py:attribute:: generation_datetime_utc :type: datetime.datetime | None :value: None .. py:attribute:: html_email_body :type: str | None :value: None .. py:attribute:: sms_content :type: str | None :value: None .. py:attribute:: control_units :type: List[src.entities.control_units.ControlUnit] | None :value: None .. py:attribute:: additional_addressees :type: List[PnoAddressee] :value: None .. py:attribute:: is_zero :type: bool :value: False .. py:attribute:: is_correction :type: bool :value: False .. py:attribute:: previous_notification_date_utc :type: datetime.datetime | None :value: None .. py:method:: get_addressees(communication_means: src.entities.communication_means.CommunicationMeans) -> List[PnoAddressee] .. py:class:: PnoToSend .. py:attribute:: pno :type: RenderedPno .. py:attribute:: message :type: email.message.EmailMessage .. py:attribute:: communication_means :type: src.entities.communication_means.CommunicationMeans .. py:class:: PriorNotificationSentMessage .. py:attribute:: prior_notification_report_id :type: str .. py:attribute:: prior_notification_source :type: PnoSource .. py:attribute:: date_time_utc :type: datetime.datetime .. py:attribute:: communication_means :type: src.entities.communication_means.CommunicationMeans .. py:attribute:: recipient_address_or_number :type: str .. py:attribute:: success :type: bool .. py:attribute:: recipient_name :type: str .. py:attribute:: recipient_organization :type: str .. py:attribute:: error_message :type: Optional[str] :value: None