Module trase.tools.sei_pcs_internal.supply_chain
Classes
class SupplyChain (directory: str, bucket: str = 'trase-storage', *args, **kwargs)-
Core object from which supply chain models are run.
This object is responsible for the following:
-
Executing the data preparation script
-
Loading data into memory from CSV files that were produced by the data preparation script, according to the rules in the model definition
-
Providing an interface by which these data can be modifed
-
Executing the model script, which uses the aforementioned interface
-
Generating the "results" file according to the rules in the model definition: a CSV file containing the data as it is after the model has modified it
Args
directory:str- path to the directory containing the definition.py file relative to the "trase/models" directory.
bucket:str, optional- S3 bucket to connect to, defaults to bucket specified in defaults.toml.
Ancestors
Methods
def create_file_name(self, year, country=None, commodity=None)def get_key_prefix(self, country=None, commodity=None)def upload_results(self, bucket=None, key_prefix=None, filename=None, country=None, commodity=None, suffix='', dry_run=False)
Inherited members
-