DataStore module#

DataStore module.

class gfinder.datastore.DataStore(app_data_dir='/Users/nmanaud/workspace/majis/gfinder-data', user_data_dir='/Users/nmanaud/workspace/majis/data')[source]#

Bases: object

DataStore.

app_data_dir#

Application data directory output_dir.

Type

str

user_data_dir#

User data directory output_dir.

Type

str

odf_basedir#
Type

str

opportunities_basedir#
Type

str

roi_basedir#
Type

str

mission_scenarios#

List of mission scenarios.

Type

list

opportunities#

List of opportunities.

Type

list

opportunity_definitions#

List of opportunity definitions (ODF).

Type

list

observation_types#

List of observation types.

Type

list

valid#

Validity flag.

Type

bool

Constructor method.

Parameters
  • app_data_dir (str, optional) – Set application data directory output_dir.

  • user_data_dir (str, optional) – Set user data directory output_dir.

assignOpportunityID(opportunity, suffix=None)[source]#
assignOpportunityPath(opportunity, suffix=None)[source]#
getAddendumKernels(opportunity_id)[source]#
getMissionScenario(id)[source]#
getMissionScenarioIDs()[source]#
getOpportunityDict(opportunity_id)[source]#
getOpportunityIDs()[source]#
getOpportunityPath(opportunity_id)[source]#
get_ODF_filename(odf_path)[source]#

Returns ODF file full output_dir name from relative output_dir.

Parameters

odf_path – Input ODF file output_dir relative to ODF base directory.

Returns:

get_definitions(obs_type=None, target=None)[source]#
get_observation_types()[source]#
load_opportunity(opportunity_id)[source]#
opportunityExists(opportunity, suffix=None)[source]#
writeOpportunity(opportunity, overwrite=False, suffix=None)[source]#
gfinder.datastore.MISSION_SCENARIOS_INDEX_FILE = 'mission_scenarios.json'#

Mission Scenarios index file.

gfinder.datastore.OBSERVATION_TYPES_INDEX_FILE = 'observation_types.json'#

Observation types index file.