tstore.archive package#

Subpackages#

Submodules#

tstore.archive.checks module#

Created on Mon Jun 12 21:32:37 2023.

@author: ghiggi

tstore.archive.checks.check_is_tstore(base_dir)[source]#

Check is a TStore.

tstore.archive.checks.check_start_end_time(start_time, end_time)[source]#

Check start_time and end_time validity.

tstore.archive.checks.check_time(time)[source]#

Check time validity.

It returns a datetime.datetime object.

Parameters:

time ((datetime.datetime, datetime.date, np.datetime64, str)) – Time object. Accepted types: datetime.datetime, datetime.date, np.datetime64, str If string type, it expects the isoformat ‘YYYY-MM-DD hh:mm:ss’.

Returns:

time – datetime.datetime object.

Return type:

datetime.datetime

tstore.archive.checks.check_ts_variables(ts_variables, base_dir)[source]#

Check valid ts_variables.

If None, return all the available ts_variables.

tstore.archive.checks.check_tstore_ids(tstore_ids, base_dir)[source]#

Check valid tstore_ids.

If tstore_ids=None, return None.

tstore.archive.checks.get_available_ts_variables(base_dir)[source]#

Get available TStore timeseries.

tstore.archive.io module#

TStore I/O tools.

tstore.archive.io.check_tstore_directory(base_dir, overwrite)[source]#

Check TStore directory.

tstore.archive.io.check_tstore_structure(tstore_structure)[source]#

Check validity of TStore structure.

tstore.archive.io.define_attributes_filepath(base_dir)[source]#

Define filepath of TStore attributes.

tstore.archive.io.define_metadata_filepath(base_dir)[source]#

Define TStore metadata filepath.

tstore.archive.io.define_tsarray_filepath(base_dir, tstore_id, ts_variable, tstore_structure)[source]#

Define filepath of a TStore TS.

tstore.archive.io.get_id_var(base_dir)[source]#

Get TStore ID variable.

tstore.archive.io.get_partitions(base_dir, ts_variable)[source]#

Get TStore time series partitioning.

tstore.archive.io.get_ts_info(base_dir, ts_variable)[source]#

Retrieve filepaths and tstore_ids for a specific ts_variable.

tstore.archive.io.get_tstore_structure(base_dir)[source]#

Get TStore structure.

tstore.archive.partitions module#

Created on Mon Apr 8 17:05:26 2024.

@author: ghiggi

tstore.archive.partitions.add_partitioning_columns(df, partitioning_str, time_var, backend)[source]#

Add partitioning columns to the dataframe based on the partitioning string.

tstore.archive.partitions.check_partitioning(partitioning, ts_variables)[source]#

Check to_tstore partitioning values.

tstore.archive.partitions.check_partitions(partitioning_str)[source]#

Check partitioning components of partitinoning string.

Return the partitioning components.

tstore.archive.partitions.get_datetime_properties(df, time_var)[source]#

Get datetime properties from time column or index.

tstore.archive.partitions.get_partitioning_mapping_dict(time_var, backend='pandas')[source]#

Get partitioning mapping dict.

tstore.archive.partitions.get_valid_partitions()[source]#

Get valid partitioning components.

Module contents#

Created on Mon Jun 12 22:23:06 2023.

@author: ghiggi