pytrnsys_process.config package#

Submodules#

pytrnsys_process.config.constants module#

class pytrnsys_process.config.constants.PlotSizes(*values)[source]#

Bases: Enum

A4 = (7.8, 3.9)#
A4_HALF = (3.8, 3.9)#
class pytrnsys_process.config.constants.FilePattern(patterns: list[str], prefix: str)[source]#

Bases: object

patterns: list[str]#
prefix: str#
__init__(patterns: list[str], prefix: str) None#
class pytrnsys_process.config.constants.FileType(*values)[source]#

Bases: Enum

MONTHLY = FilePattern(patterns=['_mo_', '_mo$', '^mo_'], prefix='mo_')#
HOURLY = FilePattern(patterns=['_hr_', '_hr$', '^hr_'], prefix='hr_')#
TIMESTEP = FilePattern(patterns=['_step_', '_step$', '^step_'], prefix='step_')#
HYDRAULIC = FilePattern(patterns=['_mfr_', '_mfr$', '_t$'], prefix='step_')#
DECK = '.dck'#
class pytrnsys_process.config.constants.FileNames(*values)[source]#

Bases: Enum

SIMULATION_PICKLE_FILE = 'simulation.pickle'#
SIMULATIONS_DATA_PICKLE_FILE = 'simulations_data.pickle'#
pytrnsys_process.config.constants.REPO_ROOT: Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/pytrnsys-process/checkouts/latest')#

Path to the repository root

pytrnsys_process.config.settings module#

class pytrnsys_process.config.settings.Plot(file_formats: ~collections.abc.Sequence[str] = <factory>, figure_sizes: dict[str, tuple[float, float]] = <factory>, inkscape_path: str = 'C://Program Files//Inkscape//bin//inkscape.exe', date_format: str = '%b %Y', label_font_size: int = 10, legend_font_size: int = 8, title_font_size: int = 12, markers: ~collections.abc.Sequence[str] = <factory>)[source]#

Bases: object

Class holding the global settings for plots.

file_formats#

List of file formats to which the plots will be exported when asked.

Type:

list[str]

figure_sizes#

Dictionary of figure sizes to save to file. By default these the ‘A4 plot’ will fit horizontally on an A4 page. Two of the ‘half A4 plot’ can fit horizontally on an A4 page.

Type:

dict[str, tuple[float, float]]

inkscape_path:

Path to the installation of Inkscape. This is required to save plots to the EMF format.

date_format:

Formatting to use when plotting datetimes.

file_formats: Sequence[str]#
figure_sizes: dict[str, tuple[float, float]]#
inkscape_path: str = 'C://Program Files//Inkscape//bin//inkscape.exe'#
date_format: str = '%b %Y'#
label_font_size: int = 10#
legend_font_size: int = 8#
title_font_size: int = 12#
markers: Sequence[str]#
__init__(file_formats: ~collections.abc.Sequence[str] = <factory>, figure_sizes: dict[str, tuple[float, float]] = <factory>, inkscape_path: str = 'C://Program Files//Inkscape//bin//inkscape.exe', date_format: str = '%b %Y', label_font_size: int = 10, legend_font_size: int = 8, title_font_size: int = 12, markers: ~collections.abc.Sequence[str] = <factory>) None#
class pytrnsys_process.config.settings.Reader(folder_name_for_printer_files: str = 'temp', read_step_files: bool = False, read_deck_files: bool = True, force_reread_prt: bool = False, starting_year: int = 2024)[source]#

Bases: object

Class holding global settings for the reading files.

folder_name_for_printer_files#

Name of the data folder inside the simulation directly (Default: ‘temp’)

Type:

str

read_step_files#

Step files are ignored by default.

Type:

bool

read_deck_files#

Deck files are parsed for constants by default.

Type:

bool

force_reread_prt#

Processing will use the faster pickle files, unless this is True.

Type:

bool

starting_year#

The reader will use this to set the year in which the data starts in the datetime index.

Type:

int

folder_name_for_printer_files: str = 'temp'#
read_step_files: bool = False#
read_deck_files: bool = True#
force_reread_prt: bool = False#
starting_year: int = 2024#
__init__(folder_name_for_printer_files: str = 'temp', read_step_files: bool = False, read_deck_files: bool = True, force_reread_prt: bool = False, starting_year: int = 2024) None#
class pytrnsys_process.config.settings.Settings(plot: Plot, reader: Reader)[source]#

Bases: object

Class holding the global settings for processing.

plot#

class holding global settings for plots

Type:

Plot

reader#

class holding global settings for readers

Type:

Reader

plot: Plot#
reader: Reader#
__init__(plot: Plot, reader: Reader) None#
class pytrnsys_process.config.settings.Defaults(*values)[source]#

Bases: Enum

Default settings for different use cases

DEFAULT = Settings(plot=Plot(file_formats=['.png', '.pdf', '.emf'], figure_sizes={'A4': (7.8, 3.9), 'A4_HALF': (3.8, 3.9)}, inkscape_path='C://Program Files//Inkscape//bin//inkscape.exe', date_format='%b %Y', label_font_size=10, legend_font_size=8, title_font_size=12, markers=['x', 'o', '^', 'D', 'v', '<', '>', 'p', '*', 's']), reader=Reader(folder_name_for_printer_files='temp', read_step_files=False, read_deck_files=True, force_reread_prt=False, starting_year=2024))#

Module contents#

class pytrnsys_process.config.Defaults(*values)[source]#

Bases: Enum

Default settings for different use cases

DEFAULT = Settings(plot=Plot(file_formats=['.png', '.pdf', '.emf'], figure_sizes={'A4': (7.8, 3.9), 'A4_HALF': (3.8, 3.9)}, inkscape_path='C://Program Files//Inkscape//bin//inkscape.exe', date_format='%b %Y', label_font_size=10, legend_font_size=8, title_font_size=12, markers=['x', 'o', '^', 'D', 'v', '<', '>', 'p', '*', 's']), reader=Reader(folder_name_for_printer_files='temp', read_step_files=False, read_deck_files=True, force_reread_prt=False, starting_year=2024))#
class pytrnsys_process.config.PlotSizes(*values)[source]#

Bases: Enum

A4 = (7.8, 3.9)#
A4_HALF = (3.8, 3.9)#
class pytrnsys_process.config.FilePattern(patterns: list[str], prefix: str)[source]#

Bases: object

__init__(patterns: list[str], prefix: str) None#
patterns: list[str]#
prefix: str#
class pytrnsys_process.config.FileType(*values)[source]#

Bases: Enum

MONTHLY = FilePattern(patterns=['_mo_', '_mo$', '^mo_'], prefix='mo_')#
HOURLY = FilePattern(patterns=['_hr_', '_hr$', '^hr_'], prefix='hr_')#
TIMESTEP = FilePattern(patterns=['_step_', '_step$', '^step_'], prefix='step_')#
HYDRAULIC = FilePattern(patterns=['_mfr_', '_mfr$', '_t$'], prefix='step_')#
DECK = '.dck'#
class pytrnsys_process.config.FileNames(*values)[source]#

Bases: Enum

SIMULATION_PICKLE_FILE = 'simulation.pickle'#
SIMULATIONS_DATA_PICKLE_FILE = 'simulations_data.pickle'#