pepys_import.core.store package¶
Submodules¶
pepys_import.core.store.common_db module¶
- class pepys_import.core.store.common_db.ActivationMixin[source]¶
Bases:
object
- left_arc¶
- max_range¶
- min_range¶
- platform_id¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372ca59710; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- right_arc¶
- sensor = <RelationshipProperty at 0x7f372ca5c9e0; no key>¶
- sensor_name¶
A descriptor that presents a read/write view of an object attribute.
- source = <RelationshipProperty at 0x7f372ca5c710; no key>¶
- class pepys_import.core.store.common_db.CommentMixin[source]¶
Bases:
object
- comment_type = <RelationshipProperty at 0x7f372ca6cc20; no key>¶
- comment_type_name¶
A descriptor that presents a read/write view of an object attribute.
- platform = <RelationshipProperty at 0x7f372ca6cef0; no key>¶
- platform_id¶
A descriptor that presents a read/write view of an object attribute.
- platform_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372ca5c8c0; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- source = <RelationshipProperty at 0x7f372ca17440; no key>¶
- source_reference¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.ContactMixin[source]¶
Bases:
object
- ambig_bearing¶
- bearing¶
- freq¶
- major¶
- minor¶
- mla¶
- orientation¶
- platform_id¶
A descriptor that presents a read/write view of an object attribute.
- platform_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372ca24e60; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- range¶
- rel_bearing¶
- sensor = <RelationshipProperty at 0x7f372ca24cb0; no key>¶
- sensor_host¶
A descriptor that presents a read/write view of an object attribute.
- sensor_name¶
A descriptor that presents a read/write view of an object attribute.
- soa¶
- source = <RelationshipProperty at 0x7f372ca24dd0; no key>¶
- source_reference¶
A descriptor that presents a read/write view of an object attribute.
- subject = <RelationshipProperty at 0x7f372ca217a0; no key>¶
- subject_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.DatafileMixin[source]¶
Bases:
object
- create_comment(data_store, platform, timestamp, comment, comment_type, parser_name)[source]¶
Creates a new Comment object to record textual information logged by a particular platform at a specific time.
- Parameters
data_store – DataStore connected to the database that the Comment object should be
created in :type data_store: DataStore :param platform: Platform that the Comment was recorded from :type platform: Platform :param timestamp: Timestamp of the Comment information :type timestamp: datetime.datetime :param comment: Text of the comment :type comment: String :param comment_type: Type of the comment :type comment_type: CommentType :return: Newly-created Comment object :rtype: Comment
Note: The Comment object will automatically be added to a list of pending Comment objects (stored in Datafile.measurements) which will be committed to the database later, if the full import succeeds.
- create_contact(data_store, platform, sensor, timestamp, parser_name)[source]¶
Creates a new Contact object to record information on a Contact observed by a particular platform at a specific time.
- Parameters
data_store – DataStore connected to the database that the Contact object should be
created in :type data_store: DataStore :param platform: Platform that the Contact was observed from :type platform: Platform :param sensor: Sensor used to record this Contact information :type sensor: Sensor :param timestamp: Timestamp of the Contact information :type timestamp: datetime.datetime :param parser_name: Name of parser used to import the data for this Contact :type parser_name: String :return: Newly-created Contact object :rtype: Contact
Note: The Contact object will automatically be added to a list of pending Contact objects (stored in Datafile.measurements) which will be committed to the database later, if the full import succeeds.
- create_state(data_store, platform, sensor, timestamp, parser_name)[source]¶
Creates a new State object to record information on the state of a particular platform at a specific time.
- Parameters
data_store – DataStore connected to the database that the State object should be
created in :type data_store: DataStore :param platform: Platform that the State is recording information about :type platform: Platform :param sensor: Sensor used to record this state information :type sensor: Sensor :param timestamp: Timestamp of the State information :type timestamp: datetime.datetime :param parser_name: Name of parser used to import the data for this State :type parser_name: String :return: Newly-created State object :rtype: State
Note: The State object will automatically be added to a list of pending State objects (stored in Datafile.measurements) which will be committed to the database later, if the full import succeeds.
- datafile_type = <RelationshipProperty at 0x7f372ca239e0; no key>¶
- datafile_type_name¶
A descriptor that presents a read/write view of an object attribute.
- flush_extracted_tokens()[source]¶
Flush the current list of extracted tokens out to the dict linking measurement objects to tokens, ready for writing to the database at the end of the import.
This should be called when all the extractions have been done for a _single_ measurement object (State/Contact etc). Often this will be at the end of the _load_this_line() method, but in more complex importers it may be needed elsewhere.
- privacy = <RelationshipProperty at 0x7f372ca6cdd0; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.GeometryMixin[source]¶
Bases:
object
- geo_sub_type = <RelationshipProperty at 0x7f372cb24ef0; no key>¶
- geo_sub_type_name¶
A descriptor that presents a read/write view of an object attribute.
- geo_type = <RelationshipProperty at 0x7f372cb24dd0; no key>¶
- geo_type_name¶
A descriptor that presents a read/write view of an object attribute.
- geometry¶
- privacy = <RelationshipProperty at 0x7f372cb24c20; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- sensor_platform = <RelationshipProperty at 0x7f372ca238c0; no key>¶
- serial = <RelationshipProperty at 0x7f372ca5c680; no key>¶
- source = <RelationshipProperty at 0x7f372cb24b00; no key>¶
- subject_platform = <RelationshipProperty at 0x7f372cb24cb0; no key>¶
- class pepys_import.core.store.common_db.GeometrySubTypeMixin[source]¶
Bases:
object
- parent_ = <RelationshipProperty at 0x7f372cb25a70; no key>¶
- parent__name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.HostedByMixin[source]¶
Bases:
object
- host = <RelationshipProperty at 0x7f372cb25ef0; no key>¶
- host_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372cb25dd0; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- subject = <RelationshipProperty at 0x7f372cb2a3b0; no key>¶
- subject_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.LogMixin[source]¶
Bases:
object
- change = <RelationshipProperty at 0x7f372cb2aef0; no key>¶
- change_reason¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.LogsHoldingMixin[source]¶
Bases:
object
- commodity_type = <RelationshipProperty at 0x7f372cb2add0; no key>¶
- commodity_type_name¶
A descriptor that presents a read/write view of an object attribute.
- platform = <RelationshipProperty at 0x7f372c9954d0; no key>¶
- platform_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372c9953b0; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- source = <RelationshipProperty at 0x7f372c995320; no key>¶
- source_reference¶
A descriptor that presents a read/write view of an object attribute.
- unit_type = <RelationshipProperty at 0x7f372c995170; no key>¶
- unit_type_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.MediaMixin[source]¶
Bases:
object
- media_type = <RelationshipProperty at 0x7f372c995f80; no key>¶
- media_type_name¶
A descriptor that presents a read/write view of an object attribute.
- platform = <RelationshipProperty at 0x7f372c995e60; no key>¶
- platform_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372c995cb0; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- sensor = <RelationshipProperty at 0x7f372c995b90; no key>¶
- sensor_name¶
A descriptor that presents a read/write view of an object attribute.
- source = <RelationshipProperty at 0x7f372cb25f80; no key>¶
- subject = <RelationshipProperty at 0x7f372cb25c20; no key>¶
- subject_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.PlatformMixin[source]¶
Bases:
object
- get_sensor(data_store, sensor_name=None, sensor_type=None, privacy=None, change_id=None)[source]¶
Lookup or create a sensor of this name for this
Platform
. Specified sensor will be added to theSensor
table. It uses find_sensor method to search existing sensors.- Parameters
data_store (DataStore) – DataStore object to to query DB and use missing data resolver
sensor_name (String) – Name of
Sensor
sensor_type (String) – Type of
Sensor
privacy (String) – Privacy of
Sensor
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
Sensor
entity- Return type
- nationality = <RelationshipProperty at 0x7f372c995d40; no key>¶
- nationality_name¶
A descriptor that presents a read/write view of an object attribute.
- platform_type = <RelationshipProperty at 0x7f372cb2a200; no key>¶
- platform_type_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372c9d8290; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- wargame_participations¶
A descriptor that presents a read/write view of an object attribute.
- wargame_participations_objects¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.SensorMixin[source]¶
Bases:
object
- classmethod find_sensor(data_store, sensor_name, platform_id)[source]¶
This method tries to find a Sensor entity with the given sensor_name. If it finds, it returns the entity. If it is not found, it searches synonyms.
- Parameters
data_store (DataStore) – A
DataStore
objectsensor_name (String) – Name of
Sensor
platform_id (int) – Primary key of the Platform that Sensor belongs to
- Returns
- host_ = <RelationshipProperty at 0x7f372c995950; no key>¶
- host__identifier¶
A descriptor that presents a read/write view of an object attribute.
- host__name¶
A descriptor that presents a read/write view of an object attribute.
- host__nationality_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372c9d8680; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- sensor_type = <RelationshipProperty at 0x7f372c9d89e0; no key>¶
- sensor_type_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.SerialMixin[source]¶
Bases:
object
- add_participant(data_store, wargame_participant, force_type, privacy, start=None, end=None, change_id=None)[source]¶
Add a participant to this Serial. This creates a SerialParticipant object.
- Parameters
data_store (DataStore) – DataStore
wargame_participant (WargameParticipant or WargameParticipant ID value) – Wargame participant which defines the Platform that this SerialParticipant is representing
force_type (str ("Blue" or "Red" normally)) – Force to assign this participant
privacy (str) – Privacy to assign this participant
start (datetime, optional) – Start timestamp for this participant, defaults to None
end (datetime, optional) – End timestamp for this participant, defaults to None
change_id (ID, optional) – Change ID for this change, defaults to None
- Returns
New SerialParticipant instance
- Return type
- participants_platform_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372c9d8d40; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- wargame_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.SerialParticipantMixin[source]¶
Bases:
object
- force_type = <RelationshipProperty at 0x7f372c9d8560; no key>¶
- force_type_color¶
A descriptor that presents a read/write view of an object attribute.
- force_type_name¶
A descriptor that presents a read/write view of an object attribute.
- platform¶
A descriptor that presents a read/write view of an object attribute.
- platform_identifier¶
A descriptor that presents a read/write view of an object attribute.
- platform_name¶
A descriptor that presents a read/write view of an object attribute.
- platform_nationality_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372caec4d0; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- serial = <RelationshipProperty at 0x7f372caec5f0; no key>¶
- serial_exercise¶
A descriptor that presents a read/write view of an object attribute.
- serial_number¶
A descriptor that presents a read/write view of an object attribute.
- wargame_participant = <RelationshipProperty at 0x7f372c9d8440; no key>¶
- class pepys_import.core.store.common_db.SeriesMixin[source]¶
Bases:
object
- child_wargames = <RelationshipProperty at 0x7f372c9d8830; no key>¶
- privacy = <RelationshipProperty at 0x7f372caeca70; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.StateMixin[source]¶
Bases:
object
- course¶
- heading¶
- platform_id¶
A descriptor that presents a read/write view of an object attribute.
- platform_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372caec560; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- sensor = <RelationshipProperty at 0x7f372c96ae60; no key>¶
- sensor_host¶
A descriptor that presents a read/write view of an object attribute.
- sensor_name¶
A descriptor that presents a read/write view of an object attribute.
- source = <RelationshipProperty at 0x7f372caecb90; no key>¶
- source_reference¶
A descriptor that presents a read/write view of an object attribute.
- speed¶
- class pepys_import.core.store.common_db.TaggedItemMixin[source]¶
Bases:
object
- tag = <RelationshipProperty at 0x7f372c96e0e0; no key>¶
- tag_name¶
A descriptor that presents a read/write view of an object attribute.
- tagged_by = <RelationshipProperty at 0x7f372c96ef80; no key>¶
- tagged_by_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.WargameMixin[source]¶
Bases:
object
- add_participant(data_store, platform, privacy, change_id)[source]¶
Add a new participant to this Wargame. This creates a WargameParticipant entry.
- Parameters
data_store (DataStore) – DataStore
platform (Platform object or Platform ID value) – Platform to add as a participant
privacy (str) – Privacy to assign to this participant
change_id (Change ID) – Change ID for this change
- Returns
Newly created WargameParticipant object
- Return type
- child_serials = <RelationshipProperty at 0x7f372caecb00; no key>¶
- participants = <RelationshipProperty at 0x7f372c9155f0; no key>¶
- participants_platform_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372c9153b0; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- series_name¶
A descriptor that presents a read/write view of an object attribute.
- class pepys_import.core.store.common_db.WargameParticipantMixin[source]¶
Bases:
object
- platform = <RelationshipProperty at 0x7f372c96e440; no key>¶
- platform_identifier¶
A descriptor that presents a read/write view of an object attribute.
- platform_name¶
A descriptor that presents a read/write view of an object attribute.
- platform_nationality_name¶
A descriptor that presents a read/write view of an object attribute.
- privacy = <RelationshipProperty at 0x7f372c915950; no key>¶
- privacy_name¶
A descriptor that presents a read/write view of an object attribute.
- wargame = <RelationshipProperty at 0x7f372c915a70; no key>¶
- wargame_name¶
A descriptor that presents a read/write view of an object attribute.
pepys_import.core.store.constants module¶
pepys_import.core.store.data_store module¶
- class pepys_import.core.store.data_store.DataStore(db_username, db_password, db_host, db_port, db_name, db_type, missing_data_resolver=<pepys_import.resolvers.default_resolver.DefaultResolver object>, welcome_text='Pepys_import', show_status=True, error_on_db_version_mismatch=False)[source]¶
Bases:
object
Representation of database
- Returns
- add_to_changes(user, modified, reason)[source]¶
Adds the specified event to the
Change
table if not already present.- Parameters
user – Username of the current login
modified – Change date
reason – Reason of the change
- Returns
Created
Change
entity
- add_to_comment_types(name, change_id)[source]¶
Adds the specified comment type to the CommentType table if not already present
- Parameters
name (String) – Name of
CommentType
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created entity of
CommentType
table- Return type
- add_to_config_options(name, description, value, change_id)[source]¶
Adds the specified confg option to the ConfigOptions table.
- Parameters
name (String) – Name of configuration option
description (String) – Description of config option
value (String) – Value of config option
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
PlatformType
entity- Return type
- add_to_datafile_types(name, change_id)[source]¶
Adds the specified datafile type to the datafile types table if not already present.
- Parameters
name (String) – Name of
DatafileType
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Wrapped database entity for
DatafileType
- Return type
- add_to_datafiles(privacy, file_type, reference=None, simulated=False, file_size=None, file_hash=None, url=None, change_id=None)[source]¶
Adds the specified datafile to the Datafile table if not already present.
- Parameters
simulated (Boolean) –
Datafile
is simulated or notprivacy (Privacy) –
Privacy
ofDatafile
file_type (String) – Type of
Datafile
reference (String) – Reference of
Datafile
file_size (Integer) – Size of the file (in bytes)
file_hash (String) – Hashed value of the file
url (String) – URL of datafile
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
Datafile
entity- Return type
- add_to_force_types(name, color, change_id)[source]¶
Adds the specified force type to the ForceTypes table if not already present
- Parameters
name (String) – Name of
ForceType
color (String) – Color of the ForceType
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
ForceType
entity- Return type
- add_to_geometry_sub_types(name, parent_name, change_id)[source]¶
Adds the specified geometry sub type to the
GeometrySubType
table if not already present.- Parameters
name (String) – Name of
GeometrySubType
parent_name (String) – Name of parent
GeometryType
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
GeometrySubType
entity- Return type
- add_to_geometry_types(name, change_id)[source]¶
Adds the specified geometry type to the
GeometryType
table if not already present.- Parameters
name (String) – Name of
GeometryType
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
GeometryType
entity- Return type
- add_to_help_texts(id, guidance, change_id)[source]¶
Adds the specified help text to the
HelpText
table if not already present.- Parameters
id (Integer) – ID of prompt question
guidance (String) – Guidance text for contextual help
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
HelpText
entity- Return type
- add_to_logs(table, row_id, field=None, previous_value=None, change_id=None)[source]¶
Adds the specified event to the
Logs
table if not already present.- Parameters
table – Name of the table
row_id – Entity ID of the tale
field – Name of the field
previous_value – Previous value of the field
change_id (Integer or UUID) – ID of the
Change
objectchange_id – Row ID of entity of
Changes
about the change
- Returns
Created
Logs
entity
- add_to_nationalities(name, change_id, priority=None)[source]¶
Adds the specified nationality to the nationalities table if not already present
- Parameters
name (String) – Name of
Nationality
change_id (Integer or UUID) – ID of the
Change
objectpriority (Integer) – Priority to print in defaults of CLI
- Returns
Created
Nationality
entity- Return type
- add_to_platform_types(name, change_id, default_data_interval_secs=None)[source]¶
Adds the specified platform type to the platform types table if not already present.
- Parameters
name (String) – Name of
PlatformType
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
PlatformType
entity- Return type
- add_to_platforms(name, identifier, nationality, platform_type, privacy, trigraph=None, quadgraph=None, change_id=None)[source]¶
Adds the specified platform to the Platform table if not already present.
- Parameters
name (String) – Name of
Platform
nationality (Nationality) – Nationality of
Platform
platform_type (PlatformType) – Type of
Platform
privacy (Privacy) –
Privacy
ofPlatform
trigraph (String) – Trigraph of
Platform
quadgraph (String) – Quadgraph of
Platform
identifier (String) – Identifier string of
Platform
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created Platform entity
- Return type
- add_to_privacies(name, level, change_id)[source]¶
Adds the specified privacy entry to the
Privacy
table if not already present.- Parameters
name (String) – Name of
Privacy
level (Integer) – Level of
Privacy
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
Privacy
entity- Return type
- add_to_sensor_types(name, change_id)[source]¶
Adds the specified sensor type to the
SensorType
table if not already present.- Parameters
name (String) – Name of
SensorType
change_id (Integer or UUID) – ID of the
Change
object
- Returns
Created
SensorType
entity- Return type
- add_to_sensors(name, sensor_type, host_name, host_nationality, host_identifier, privacy, change_id, host_id=None)[source]¶
Adds the specified sensor to the
Sensor
table if not already present.- Parameters
name (String) – Name of sensor
sensor_type (String) – Type of sensor
host_name (String) – Name of Platform that sensor belongs to
host_nationality (String) – Nationality of Platform that sensor belongs to
host_identifier (String) – Identifier of Platform that sensor belongs to
privacy (String) –
Privacy
ofState
change_id (Integer or UUID) – ID of the
Change
objecthost_id – ID of Platform that sensor belongs to (optional, can be passed instead of host_name, host_nationality and host_identifier)
- Returns
Created Sensor entity
Notes: To specify the platform that the added sensor should belong to you can either:
Specify the host_name, host_nationality and host_identifier parameters, to uniquely identify the Platform
Specify the host_id parameter to give the ID of the Platform, and set host_name, host_nationality and host_identifier to None
- ask_for_missing_info(question, default_value, min_value=None, max_value=None, allow_empty=False)[source]¶
Requests any missing information that isn’t stored in the database e.g. missing date/time info :param question: The question to ask the resolver :param default_value: The default value to use if unresolved :param min_value: The minimum value allowed for the result, optional :param max_value: The maximum value allowed for the result, optional :param allow_empty: Whether to allow an empty input (for accepting defaults), optional :return: The missing information requested
- delete_objects(table_obj, id_list, change_id)[source]¶
Deletes the given objects.
- Parameters
table_obj (SQLAlchemy Model or str) – A table object, or name of the table that IDs belong to
id_list (list) – List of objects IDs
- edit_items(items, edit_dict, table_object)[source]¶
Edits the given list of items, changing the fields to the new ones specified in edit_dict
- Parameters
items (Database objects (eg. Platform, Sensor, Nationality)) – List of objects to edit
edit_dict – Dictionary with keys specifying the fields to be edited, and values specifying the new value.
For foreign keyed fields, the new value should be the ID of an existing entry in the foreign table :type edit_dict: Dict
- export_datafile(datafile_id, file_path, sensor_id=None, platform_id=None)[source]¶
Gets states, contacts and comments of a Datafile.
- Parameters
datafile_id (Integer or UUID) – ID of Datafile
file_path (String) – Path of a file to export
sensor_id (Integer or UUID) – ID of Sensor to export a specific sensor in the datafile, default is None
platform_id – ID of Platform to export comments of a specific platform in the datafile,
default is None :type platform_id: Integer or UUID
- export_objects_to_csv(table_obj, id_list, columns_list, output_filename, set_percentage=None)[source]¶
- find_datafile(datafile_name)[source]¶
This method tries to find a Datafile entity with the given datafile_name. If it finds, it returns the entity. If it is not found, it searches synonyms.
- Parameters
datafile_name (String) – Name of Datafile
- Returns
- find_dependent_objects(table_obj, id_list: list, set_percentage=None, is_cancelled=None) dict [source]¶
Finds the dependent objects of the given list of items. Counts them by their type, i.e. X Sensors, Y Platforms. Returns a dictionary that has table names as keys, and number of dependent objects as values.
- Parameters
table_obj (SQLAlchemy Model or str) – A table object, or name of the table that IDs belong to
id_list (list) – List of objects IDs
- find_min_and_max_date(table, filter_by, value)[source]¶
Queries the given table, finds the minimum date and the maximum date. Returns these values with including the source id.
- find_platform(name, nationality=None, identifier=None)[source]¶
This method tries to find a Platform entity with the given platform details.
If only the platform_name is given, then it searches synonyms ONLY. If all details are given then it searches for all the details in the database
It does not currently use a cache.
Finds all related datafile objects for the given platform ID and sensor IDs. Creates a list, which has the information of the found objects, and returns it.
- Parameters
platform_id (Integer or UUID) – ID of the
Platform
sensors_dict (dict) – A dictionary that contains Sensor names and IDs of the given Platform
- Returns
Returns found State-Contact-Comment objects in a list form
- Return type
list
- get_all_datafiles()[source]¶
Returns all datafiles.
- Returns
All Datafile entities in the DB
- Return type
List
- get_cached_comment_type_name(comment_type_id)[source]¶
Get comment type name from cache on “comment_type_id” If name is not found in the cache, sytem will load from the data store, and add it into cache.
- get_cached_platform_name(sensor_id=None, platform_id=None)[source]¶
Get platform name from cache on either “sensor_id” or “platform_id” If name is not found in the cache, system will load from this data store, and cache it.
- Parameters
sensor_id (Integer or UUID) – ID of the
Sensor
platform_id (Integer or UUID) – ID of the
Platform
- get_datafile(datafile_name=None, datafile_type=None, file_size=None, file_hash=None, change_id=None, privacy=None)[source]¶
Adds an entry to the datafiles table of the specified name (path) and type if not already present. It uses find_datafile method to search existing datafiles.
- Parameters
datafile_name (String) – Name of Datafile
datafile_type (String) – Type of Datafile
file_size (Integer) – Size of the file (in bytes)
file_hash (String) – Hashed value of the file
change_id (Integer or UUID) – ID of the
Change
objectprivacy (String) – Name of
Privacy
- Returns
Created Datafile entity
- Return type
- get_datafile_from_id(name)¶
- get_platform(platform_name=None, identifier=None, nationality=None, platform_type=None, privacy=None, trigraph=None, quadgraph=None, change_id=None, unknown=False)[source]¶
Adds an entry to the platforms table for the specified platform if not already present. It uses find_platform method to search existing platforms.
- Parameters
platform_name (String) – Name of
Platform
nationality (String) – Name of
Nationality
platform_type (String) – Name of
PlatformType
privacy (String) – Name of
Privacy
trigraph (String) – Trigraph of
Platform
quadgraph (String) – Quadgraph of
Platform
identifier (String) – Identifier string of
Platform
change_id (Integer or UUID) – ID of the
Change
objectunknown (Boolean) – Whether to create this as an ‘unknown’ Platform, which won’t ask the user to resolve details, and will assign Unknown nationality and Platform Types
- Returns
Created Platform entity
- get_status(table_type, exclude=None)[source]¶
Provides a summary of the contents of the
DataStore
.- Parameters
table_type (Enum) – one of Table Types
exclude (List) – List of table names to exclude from the report
- Returns
The summary of the contents of the
DataStore
- Return type
- is_datafile_loaded_before(file_size, file_hash)[source]¶
Queries the Datafile table to check whether the given file is loaded before or not.
- Parameters
file_size (Integer) – Size of the file (in bytes)
file_hash (String) – Hashed value of the file
- Returns
True if the datafile is loaded before, False otherwise
- Return type
bool
- merge_platforms(platform_list, master_id, change_id, set_percentage=None) bool [source]¶
Merges given platforms. Moves sensors from other platforms to the Target platform. If sensor with same name is already present on Target platform, moves measurements to that sensor. Also moves entities in Comments, WargameParticipants, LogsHoldings, Geometry, Media tables from other platforms to the Target platform.
- Parameters
platform_list (List) – A list of platform IDs or platform objects
master_id (UUID or Platform) – Target platform’s ID or objects itself
- Returns
True if merging completed successfully, False otherwise.
- Return type
bool
- populate_metadata(sample_data_folder=None)[source]¶
Import CSV files from the given folder to the related Metadata Tables
- populate_reference(reference_data_folder=None)[source]¶
Import given CSV file to the given reference table
- search_datafile(name)¶
- search_datafile_type(name)¶
- search_force_type(name)¶
- search_geometry_sub_type(name, parent)[source]¶
Search for any Geometry Sub Type featuring this name and parent
- search_geometry_type(name)¶
- search_nationality(name)¶
- search_platform(name, nationality, identifier)[source]¶
Search for any platform with this name, nationality and identifier
- search_platform_type(name)¶
- search_privacy(name)¶
- search_sensor_type(name)¶
- synonym_search(name, table, pk_field)[source]¶
This method looks up the Synonyms Table and returns if there is any matched entity.
- Parameters
name (String) – Name to search
table (
BasePostGIS
or :class``BaseSpatiaLite) – Table object to query found synonym entitypk_field (
sqlalchemy.orm.attributes.InstrumentedAttribute
) – Primary Key field of the table
- Returns
Returns found entity or None
pepys_import.core.store.db_base module¶
pepys_import.core.store.db_status module¶
pepys_import.core.store.postgres_db module¶
- class pepys_import.core.store.postgres_db.Activation(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ActivationMixin
- activation_id¶
- created_date¶
- end¶
- name¶
- platform_id = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- start¶
- table_type = 2¶
- table_type_id = 30¶
- class pepys_import.core.store.postgres_db.Change(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
- change_id¶
- created_date¶
- datafile_id¶
- modified¶
- reason¶
- table_type = 1¶
- table_type_id = 8¶
- user¶
- class pepys_import.core.store.postgres_db.ClassificationType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- class_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 19¶
- class pepys_import.core.store.postgres_db.Comment(*args, **kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.CommentMixin
- comment_id¶
- comment_type¶
- comment_type_id¶
- comment_type_name = ColumnAssociationProxyInstance(AssociationProxy('comment_type', 'name'))¶
- content¶
- created_date¶
- platform¶
- platform_id¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- table_type = 2¶
- table_type_id = 32¶
- time¶
- class pepys_import.core.store.postgres_db.CommentType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- comment_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 25¶
- class pepys_import.core.store.postgres_db.CommodityType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- commodity_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 26¶
- class pepys_import.core.store.postgres_db.ConfidenceLevel(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- confidence_level_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 27¶
- class pepys_import.core.store.postgres_db.ConfigOption(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
- config_option_id¶
- created_date¶
- description¶
- name¶
- table_type = 1¶
- table_type_id = 37¶
- value¶
- class pepys_import.core.store.postgres_db.Contact(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ContactMixin
,pepys_import.core.store.common_db.LocationPropertyMixin
,pepys_import.core.store.common_db.ElevationPropertyMixin
- classification¶
- confidence¶
- contact_id¶
- contact_type¶
- created_date¶
- name¶
- platform¶
- platform_id = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_host = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- subject¶
- subject_id¶
- subject_name = ColumnAssociationProxyInstance(AssociationProxy('subject', 'name'))¶
- table_type = 2¶
- table_type_id = 29¶
- time¶
- track_number¶
- class pepys_import.core.store.postgres_db.ContactType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- contact_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 20¶
- class pepys_import.core.store.postgres_db.Datafile(*args, **kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.DatafileMixin
- created_date¶
- datafile_id¶
- datafile_type¶
- datafile_type_id¶
- datafile_type_name = ColumnAssociationProxyInstance(AssociationProxy('datafile_type', 'name'))¶
- hash¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- reference¶
- simulated¶
- size¶
- table_type = 1¶
- table_type_id = 6¶
- url¶
- class pepys_import.core.store.postgres_db.DatafileType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- datafile_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 23¶
- class pepys_import.core.store.postgres_db.Extraction(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ExtractionMixin
- created_date¶
- datafile_id¶
- destination_table¶
- entry_id¶
- extraction_id¶
- field¶
- importer¶
- interpreted_value¶
- table_type = 1¶
- table_type_id = 10¶
- text¶
- text_location¶
- class pepys_import.core.store.postgres_db.ForceType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- color¶
- created_date¶
- force_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 40¶
- class pepys_import.core.store.postgres_db.Geometry1(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.GeometryMixin
- created_date¶
- end¶
- geo_sub_type¶
- geo_sub_type_id¶
- geo_sub_type_name = ColumnAssociationProxyInstance(AssociationProxy('geo_sub_type', 'name'))¶
- geo_type¶
- geo_type_id¶
- geo_type_name = ColumnAssociationProxyInstance(AssociationProxy('geo_type', 'name'))¶
- geometry_id¶
- name¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor_platform¶
- sensor_platform_id¶
- serial¶
- serial_id¶
- source¶
- source_id¶
- start¶
- subject_platform¶
- subject_platform_id¶
- table_type = 2¶
- table_type_id = 33¶
- class pepys_import.core.store.postgres_db.GeometrySubType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.GeometrySubTypeMixin
- created_date¶
- geo_sub_type_id¶
- name¶
- parent¶
- parent_¶
- parent__name = ColumnAssociationProxyInstance(AssociationProxy('parent_', 'name'))¶
- table_type = 3¶
- table_type_id = 16¶
- class pepys_import.core.store.postgres_db.GeometryType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- geo_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 15¶
- class pepys_import.core.store.postgres_db.HelpText(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
- guidance¶
- help_text_id¶
- id¶
- table_type = 3¶
- table_type_id = 35¶
- class pepys_import.core.store.postgres_db.HostedBy(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.HostedByMixin
- created_date¶
- host¶
- host_id¶
- host_name = ColumnAssociationProxyInstance(AssociationProxy('host', 'name'))¶
- host_to¶
- hosted_by_id¶
- hosted_from¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- subject¶
- subject_id¶
- subject_name = ColumnAssociationProxyInstance(AssociationProxy('subject', 'name'))¶
- table_type = 1¶
- table_type_id = 1¶
- class pepys_import.core.store.postgres_db.Log(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.LogMixin
- change¶
- change_id¶
- change_reason = ColumnAssociationProxyInstance(AssociationProxy('change', 'reason'))¶
- created_date¶
- field¶
- id¶
- log_id¶
- previous_value¶
- table¶
- table_type = 1¶
- table_type_id = 9¶
- class pepys_import.core.store.postgres_db.LogsHolding(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.LogsHoldingMixin
- comment¶
- commodity_id¶
- commodity_type¶
- commodity_type_name = ColumnAssociationProxyInstance(AssociationProxy('commodity_type', 'name'))¶
- created_date¶
- logs_holding_id¶
- platform¶
- platform_id¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- quantity¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- table_type = 2¶
- table_type_id = 31¶
- time¶
- unit_type¶
- unit_type_id¶
- unit_type_name = ColumnAssociationProxyInstance(AssociationProxy('unit_type', 'name'))¶
- class pepys_import.core.store.postgres_db.Media(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.MediaMixin
,pepys_import.core.store.common_db.ElevationPropertyMixin
,pepys_import.core.store.common_db.LocationPropertyMixin
- created_date¶
- media_id¶
- media_type¶
- media_type_id¶
- media_type_name = ColumnAssociationProxyInstance(AssociationProxy('media_type', 'name'))¶
- platform¶
- platform_id¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- subject¶
- subject_id¶
- subject_name = ColumnAssociationProxyInstance(AssociationProxy('subject', 'name'))¶
- table_type = 2¶
- table_type_id = 34¶
- time¶
- url¶
- class pepys_import.core.store.postgres_db.MediaType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- media_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 24¶
- class pepys_import.core.store.postgres_db.Nationality(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.NationalityMixin
- created_date¶
- name¶
- nationality_id¶
- priority¶
- table_type = 3¶
- table_type_id = 14¶
- class pepys_import.core.store.postgres_db.Platform(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.PlatformMixin
- created_date¶
- identifier¶
- name¶
- nationality¶
- nationality_id¶
- nationality_name = ColumnAssociationProxyInstance(AssociationProxy('nationality', 'name'))¶
- participations¶
- platform_id¶
- platform_type¶
- platform_type_id¶
- platform_type_name = ColumnAssociationProxyInstance(AssociationProxy('platform_type', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- quadgraph¶
- table_type = 1¶
- table_type_id = 3¶
- trigraph¶
- wargame_participations = ObjectAssociationProxyInstance(AssociationProxy('participations', 'wargame_name'))¶
- wargame_participations_objects = ObjectAssociationProxyInstance(AssociationProxy('participations', 'wargame'))¶
- class pepys_import.core.store.postgres_db.PlatformType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- default_data_interval_secs¶
- name¶
- platform_type_id¶
- table_type = 3¶
- table_type_id = 13¶
- class pepys_import.core.store.postgres_db.Privacy(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- level¶
- name¶
- privacy_id¶
- table_type = 3¶
- table_type_id = 22¶
- class pepys_import.core.store.postgres_db.Sensor(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SensorMixin
- created_date¶
- host¶
- host_¶
- host__identifier = ColumnAssociationProxyInstance(AssociationProxy('host_', 'identifier'))¶
- host__name = ColumnAssociationProxyInstance(AssociationProxy('host_', 'name'))¶
- host__nationality_name = ObjectAssociationProxyInstance(AssociationProxy('host_', 'nationality_name'))¶
- name¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- sensor_id¶
- sensor_type¶
- sensor_type_id¶
- sensor_type_name = ColumnAssociationProxyInstance(AssociationProxy('sensor_type', 'name'))¶
- table_type = 1¶
- table_type_id = 2¶
- class pepys_import.core.store.postgres_db.SensorType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- sensor_type_id¶
- table_type = 3¶
- table_type_id = 21¶
- class pepys_import.core.store.postgres_db.Serial(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SerialMixin
- created_date¶
- end¶
- environment¶
- exercise¶
- include_in_timeline¶
- location¶
- participants¶
- participants_platform_name = ObjectAssociationProxyInstance(AssociationProxy('participants', 'platform_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- serial_id¶
- serial_number¶
- start¶
- table_type = 1¶
- table_type_id = 37¶
- wargame¶
- wargame_id¶
- wargame_name = ColumnAssociationProxyInstance(AssociationProxy('wargame', 'name'))¶
- class pepys_import.core.store.postgres_db.SerialParticipant(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SerialParticipantMixin
- created_date¶
- end¶
- force_type¶
- force_type_color = ColumnAssociationProxyInstance(AssociationProxy('force_type', 'color'))¶
- force_type_id¶
- force_type_name = ColumnAssociationProxyInstance(AssociationProxy('force_type', 'name'))¶
- platform = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform'))¶
- platform_identifier = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform_identifier'))¶
- platform_name = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform_name'))¶
- platform_nationality_name = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform_nationality_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- serial¶
- serial_exercise = AmbiguousAssociationProxyInstance(AssociationProxy('serial', 'serial_exercise'))¶
- serial_id¶
- serial_number = ColumnAssociationProxyInstance(AssociationProxy('serial', 'serial_number'))¶
- serial_participant_id¶
- start¶
- table_type = 1¶
- table_type_id = 39¶
- wargame_participant¶
- wargame_participant_id¶
- class pepys_import.core.store.postgres_db.Series(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SeriesMixin
- child_wargames¶
- created_date¶
- name¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- series_id¶
- table_type = 1¶
- table_type_id = 36¶
- class pepys_import.core.store.postgres_db.State(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.StateMixin
,pepys_import.core.store.common_db.ElevationPropertyMixin
,pepys_import.core.store.common_db.LocationPropertyMixin
- created_date¶
- platform¶
- platform_id = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_host = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- state_id¶
- table_type = 2¶
- table_type_id = 28¶
- time¶
- class pepys_import.core.store.postgres_db.Synonym(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SynonymMixin
- created_date¶
- entity¶
- synonym¶
- synonym_id¶
- table¶
- table_type = 1¶
- table_type_id = 7¶
- class pepys_import.core.store.postgres_db.Tag(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- table_type = 1¶
- table_type_id = 11¶
- tag_id¶
- class pepys_import.core.store.postgres_db.TaggedItem(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.TaggedItemMixin
- created_date¶
- item_id¶
- private¶
- table_type = 1¶
- table_type_id = 12¶
- tag¶
- tag_id¶
- tag_name = ColumnAssociationProxyInstance(AssociationProxy('tag', 'name'))¶
- tagged_by¶
- tagged_by_id¶
- tagged_by_name = ColumnAssociationProxyInstance(AssociationProxy('tagged_by', 'name'))¶
- tagged_item_id¶
- tagged_on¶
- class pepys_import.core.store.postgres_db.UnitType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 18¶
- unit_type_id¶
- class pepys_import.core.store.postgres_db.User(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 17¶
- user_id¶
- class pepys_import.core.store.postgres_db.Wargame(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.WargameMixin
- child_serials¶
- created_date¶
- end¶
- name¶
- participants¶
- participants_platform_name = ObjectAssociationProxyInstance(AssociationProxy('participants', 'platform_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- series¶
- series_id¶
- series_name = ColumnAssociationProxyInstance(AssociationProxy('series', 'name'))¶
- start¶
- table_type = 1¶
- table_type_id = 37¶
- wargame_id¶
- class pepys_import.core.store.postgres_db.WargameParticipant(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.WargameParticipantMixin
- created_date¶
- platform¶
- platform_id¶
- platform_identifier = ColumnAssociationProxyInstance(AssociationProxy('platform', 'identifier'))¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- platform_nationality_name = ObjectAssociationProxyInstance(AssociationProxy('platform', 'nationality_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- serial_participants¶
- table_type = 1¶
- table_type_id = 38¶
- wargame¶
- wargame_id¶
- wargame_name = ColumnAssociationProxyInstance(AssociationProxy('wargame', 'name'))¶
- wargame_participant_id¶
pepys_import.core.store.sqlite_db module¶
- class pepys_import.core.store.sqlite_db.Activation(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ActivationMixin
- activation_id¶
- created_date¶
- end¶
- name¶
- platform_id = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- start¶
- table_type = 2¶
- table_type_id = 30¶
- class pepys_import.core.store.sqlite_db.Change(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
- change_id¶
- created_date¶
- datafile_id¶
- modified¶
- reason¶
- table_type = 1¶
- table_type_id = 8¶
- user¶
- class pepys_import.core.store.sqlite_db.ClassificationType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- class_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 19¶
- class pepys_import.core.store.sqlite_db.Comment(*args, **kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.CommentMixin
- comment_id¶
- comment_type¶
- comment_type_id¶
- comment_type_name = ColumnAssociationProxyInstance(AssociationProxy('comment_type', 'name'))¶
- content¶
- created_date¶
- platform¶
- platform_id¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- table_type = 2¶
- table_type_id = 32¶
- time¶
- class pepys_import.core.store.sqlite_db.CommentType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- comment_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 25¶
- class pepys_import.core.store.sqlite_db.CommodityType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- commodity_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 26¶
- class pepys_import.core.store.sqlite_db.ConfidenceLevel(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- confidence_level_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 27¶
- class pepys_import.core.store.sqlite_db.ConfigOption(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
- config_option_id¶
- created_date¶
- description¶
- name¶
- table_type = 1¶
- table_type_id = 37¶
- value¶
- class pepys_import.core.store.sqlite_db.Contact(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ContactMixin
,pepys_import.core.store.common_db.LocationPropertyMixin
,pepys_import.core.store.common_db.ElevationPropertyMixin
- classification¶
- confidence¶
- contact_id¶
- contact_type¶
- created_date¶
- name¶
- platform¶
- platform_id = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_host = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- subject¶
- subject_id¶
- subject_name = ColumnAssociationProxyInstance(AssociationProxy('subject', 'name'))¶
- table_type = 2¶
- table_type_id = 29¶
- time¶
- track_number¶
- class pepys_import.core.store.sqlite_db.ContactType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- contact_type_id¶
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 20¶
- class pepys_import.core.store.sqlite_db.Datafile(*args, **kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.DatafileMixin
- created_date¶
- datafile_id¶
- datafile_type¶
- datafile_type_id¶
- datafile_type_name = ColumnAssociationProxyInstance(AssociationProxy('datafile_type', 'name'))¶
- hash¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- reference¶
- simulated¶
- size¶
- table_type = 1¶
- table_type_id = 6¶
- url¶
- class pepys_import.core.store.sqlite_db.DatafileType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- datafile_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 23¶
- class pepys_import.core.store.sqlite_db.Extraction(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ExtractionMixin
- created_date¶
- datafile_id¶
- destination_table¶
- entry_id¶
- extraction_id¶
- field¶
- importer¶
- interpreted_value¶
- table_type = 1¶
- table_type_id = 10¶
- text¶
- text_location¶
- class pepys_import.core.store.sqlite_db.ForceType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- color¶
- created_date¶
- force_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 40¶
- class pepys_import.core.store.sqlite_db.Geometry1(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.GeometryMixin
- created_date¶
- end¶
- geo_sub_type¶
- geo_sub_type_id¶
- geo_sub_type_name = ColumnAssociationProxyInstance(AssociationProxy('geo_sub_type', 'name'))¶
- geo_type¶
- geo_type_id¶
- geo_type_name = ColumnAssociationProxyInstance(AssociationProxy('geo_type', 'name'))¶
- geometry_id¶
- name¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor_platform¶
- sensor_platform_id¶
- serial¶
- serial_id¶
- source¶
- source_id¶
- start¶
- subject_platform¶
- subject_platform_id¶
- table_type = 2¶
- table_type_id = 33¶
- class pepys_import.core.store.sqlite_db.GeometrySubType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.GeometrySubTypeMixin
- created_date¶
- geo_sub_type_id¶
- name¶
- parent¶
- parent_¶
- parent__name = ColumnAssociationProxyInstance(AssociationProxy('parent_', 'name'))¶
- table_type = 3¶
- table_type_id = 16¶
- class pepys_import.core.store.sqlite_db.GeometryType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- geo_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 15¶
- class pepys_import.core.store.sqlite_db.HelpText(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
- guidance¶
- help_text_id¶
- id¶
- table_type = 3¶
- table_type_id = 35¶
- class pepys_import.core.store.sqlite_db.HostedBy(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.HostedByMixin
- created_date¶
- host¶
- host_id¶
- host_name = ColumnAssociationProxyInstance(AssociationProxy('host', 'name'))¶
- host_to¶
- hosted_by_id¶
- hosted_from¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- subject¶
- subject_id¶
- subject_name = ColumnAssociationProxyInstance(AssociationProxy('subject', 'name'))¶
- table_type = 1¶
- table_type_id = 1¶
- class pepys_import.core.store.sqlite_db.Log(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.LogMixin
- change¶
- change_id¶
- change_reason = ColumnAssociationProxyInstance(AssociationProxy('change', 'reason'))¶
- created_date¶
- field¶
- id¶
- log_id¶
- previous_value¶
- table¶
- table_type = 1¶
- table_type_id = 9¶
- class pepys_import.core.store.sqlite_db.LogsHolding(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.LogsHoldingMixin
- comment¶
- commodity_id¶
- commodity_type¶
- commodity_type_name = ColumnAssociationProxyInstance(AssociationProxy('commodity_type', 'name'))¶
- created_date¶
- logs_holding_id¶
- platform¶
- platform_id¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- quantity¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- table_type = 2¶
- table_type_id = 31¶
- time¶
- unit_type¶
- unit_type_id¶
- unit_type_name = ColumnAssociationProxyInstance(AssociationProxy('unit_type', 'name'))¶
- class pepys_import.core.store.sqlite_db.Media(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.MediaMixin
,pepys_import.core.store.common_db.ElevationPropertyMixin
,pepys_import.core.store.common_db.LocationPropertyMixin
- created_date¶
- media_id¶
- media_type¶
- media_type_id¶
- media_type_name = ColumnAssociationProxyInstance(AssociationProxy('media_type', 'name'))¶
- platform¶
- platform_id¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- subject¶
- subject_id¶
- subject_name = ColumnAssociationProxyInstance(AssociationProxy('subject', 'name'))¶
- table_type = 2¶
- table_type_id = 34¶
- time¶
- url¶
- class pepys_import.core.store.sqlite_db.MediaType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- media_type_id¶
- name¶
- table_type = 3¶
- table_type_id = 24¶
- class pepys_import.core.store.sqlite_db.Nationality(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.NationalityMixin
- created_date¶
- name¶
- nationality_id¶
- priority¶
- table_type = 3¶
- table_type_id = 14¶
- class pepys_import.core.store.sqlite_db.Platform(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.PlatformMixin
- created_date¶
- identifier¶
- name¶
- nationality¶
- nationality_id¶
- nationality_name = ColumnAssociationProxyInstance(AssociationProxy('nationality', 'name'))¶
- participations¶
- platform_id¶
- platform_type¶
- platform_type_id¶
- platform_type_name = ColumnAssociationProxyInstance(AssociationProxy('platform_type', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- quadgraph¶
- table_type = 1¶
- table_type_id = 3¶
- trigraph¶
- wargame_participations = ObjectAssociationProxyInstance(AssociationProxy('participations', 'wargame_name'))¶
- wargame_participations_objects = ObjectAssociationProxyInstance(AssociationProxy('participations', 'wargame'))¶
- class pepys_import.core.store.sqlite_db.PlatformType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- default_data_interval_secs¶
- name¶
- platform_type_id¶
- table_type = 3¶
- table_type_id = 13¶
- class pepys_import.core.store.sqlite_db.Privacy(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- level¶
- name¶
- privacy_id¶
- table_type = 3¶
- table_type_id = 22¶
- class pepys_import.core.store.sqlite_db.Sensor(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SensorMixin
- created_date¶
- host¶
- host_¶
- host__identifier = ColumnAssociationProxyInstance(AssociationProxy('host_', 'identifier'))¶
- host__name = ColumnAssociationProxyInstance(AssociationProxy('host_', 'name'))¶
- host__nationality_name = ObjectAssociationProxyInstance(AssociationProxy('host_', 'nationality_name'))¶
- name¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- sensor_id¶
- sensor_type¶
- sensor_type_id¶
- sensor_type_name = ColumnAssociationProxyInstance(AssociationProxy('sensor_type', 'name'))¶
- table_type = 1¶
- table_type_id = 2¶
- class pepys_import.core.store.sqlite_db.SensorType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- sensor_type_id¶
- table_type = 3¶
- table_type_id = 21¶
- class pepys_import.core.store.sqlite_db.Serial(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SerialMixin
- created_date¶
- end¶
- environment¶
- exercise¶
- include_in_timeline¶
- location¶
- participants¶
- participants_platform_name = ObjectAssociationProxyInstance(AssociationProxy('participants', 'platform_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- serial_id¶
- serial_number¶
- start¶
- table_type = 1¶
- table_type_id = 37¶
- wargame¶
- wargame_id¶
- wargame_name = ColumnAssociationProxyInstance(AssociationProxy('wargame', 'name'))¶
- class pepys_import.core.store.sqlite_db.SerialParticipant(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SerialParticipantMixin
- created_date¶
- end¶
- force_type¶
- force_type_color = ColumnAssociationProxyInstance(AssociationProxy('force_type', 'color'))¶
- force_type_id¶
- force_type_name = ColumnAssociationProxyInstance(AssociationProxy('force_type', 'name'))¶
- platform = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform'))¶
- platform_identifier = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform_identifier'))¶
- platform_name = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform_name'))¶
- platform_nationality_name = ObjectAssociationProxyInstance(AssociationProxy('wargame_participant', 'platform_nationality_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- serial¶
- serial_exercise = AmbiguousAssociationProxyInstance(AssociationProxy('serial', 'serial_exercise'))¶
- serial_id¶
- serial_number = ColumnAssociationProxyInstance(AssociationProxy('serial', 'serial_number'))¶
- serial_participant_id¶
- start¶
- table_type = 1¶
- table_type_id = 39¶
- wargame_participant¶
- wargame_participant_id¶
- class pepys_import.core.store.sqlite_db.Series(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SeriesMixin
- child_wargames¶
- created_date¶
- name¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- series_id¶
- table_type = 1¶
- table_type_id = 36¶
- class pepys_import.core.store.sqlite_db.State(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.StateMixin
,pepys_import.core.store.common_db.ElevationPropertyMixin
,pepys_import.core.store.common_db.LocationPropertyMixin
- created_date¶
- platform¶
- platform_id = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- remarks¶
- sensor¶
- sensor_host = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'host'))¶
- sensor_id¶
- sensor_name = ColumnAssociationProxyInstance(AssociationProxy('sensor', 'name'))¶
- source¶
- source_id¶
- source_reference = ColumnAssociationProxyInstance(AssociationProxy('source', 'reference'))¶
- state_id¶
- table_type = 2¶
- table_type_id = 28¶
- time¶
- class pepys_import.core.store.sqlite_db.Synonym(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.SynonymMixin
- created_date¶
- entity¶
- synonym¶
- synonym_id¶
- table¶
- table_type = 1¶
- table_type_id = 7¶
- class pepys_import.core.store.sqlite_db.Tag(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- table_type = 1¶
- table_type_id = 11¶
- tag_id¶
- class pepys_import.core.store.sqlite_db.TaggedItem(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.TaggedItemMixin
- created_date¶
- item_id¶
- private¶
- table_type = 1¶
- table_type_id = 12¶
- tag¶
- tag_id¶
- tag_name = ColumnAssociationProxyInstance(AssociationProxy('tag', 'name'))¶
- tagged_by¶
- tagged_by_id¶
- tagged_by_name = ColumnAssociationProxyInstance(AssociationProxy('tagged_by', 'name'))¶
- tagged_item_id¶
- tagged_on¶
- class pepys_import.core.store.sqlite_db.UnitType(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 18¶
- unit_type_id¶
- class pepys_import.core.store.sqlite_db.User(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.ReferenceRepr
,pepys_import.core.store.common_db.ReferenceDefaultFields
- created_date¶
- name¶
- table_type = 3¶
- table_type_id = 17¶
- user_id¶
- class pepys_import.core.store.sqlite_db.Wargame(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.WargameMixin
- child_serials¶
- created_date¶
- end¶
- name¶
- participants¶
- participants_platform_name = ObjectAssociationProxyInstance(AssociationProxy('participants', 'platform_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- series¶
- series_id¶
- series_name = ColumnAssociationProxyInstance(AssociationProxy('series', 'name'))¶
- start¶
- table_type = 1¶
- table_type_id = 37¶
- wargame_id¶
- class pepys_import.core.store.sqlite_db.WargameParticipant(**kwargs)[source]¶
Bases:
sqlalchemy.orm.decl_api.Base
,pepys_import.core.store.common_db.WargameParticipantMixin
- created_date¶
- platform¶
- platform_id¶
- platform_identifier = ColumnAssociationProxyInstance(AssociationProxy('platform', 'identifier'))¶
- platform_name = ColumnAssociationProxyInstance(AssociationProxy('platform', 'name'))¶
- platform_nationality_name = ObjectAssociationProxyInstance(AssociationProxy('platform', 'nationality_name'))¶
- privacy¶
- privacy_id¶
- privacy_name = ColumnAssociationProxyInstance(AssociationProxy('privacy', 'name'))¶
- serial_participants¶
- table_type = 1¶
- table_type_id = 38¶
- wargame¶
- wargame_id¶
- wargame_name = ColumnAssociationProxyInstance(AssociationProxy('wargame', 'name'))¶
- wargame_participant_id¶
pepys_import.core.store.table_summary module¶
- class pepys_import.core.store.table_summary.TableSummary(session, table)[source]¶
Bases:
object
A summary of the contents of a table, which sends query to DB and finds number of rows and creation date of last item added.
- Parameters
session (SQLAlchemy Session) – Bounded session for querying table
table – SQLAlchemy Table object
- class pepys_import.core.store.table_summary.TableSummarySet(table_summaries)[source]¶
Bases:
object
A collection of TableSummary elements.
- report()[source]¶
Produce a pretty-printed report of the contents of the summary.
- Returns
String of text
- report_metadata_names(differences)[source]¶
Produce a pretty-printed report of the contents of the summary of metadata tables.
- Returns
String of text
- show_delta_of_rows_added(other: pepys_import.core.store.table_summary.TableSummarySet)[source]¶
Produce an pretty-printed report of the contents of the summary.
- Parameters
other (TableSummarySet) – A TableSummarySet object to compare
- Returns
A string that includes report of the contents of the summary
- show_delta_of_rows_added_metadata(other: pepys_import.core.store.table_summary.TableSummarySet)[source]¶
Produce an pretty-printed report of the contents of the summary.
- Parameters
other (TableSummarySet) – A TableSummarySet object to compare
- Returns
A string that includes report of the contents of the summary