Scaffold

class geojson_modelica_translator.scaffold.Scaffold(root_dir, project_name, overwrite=False)

Bases: object

Scaffold to hold the entire directory structure for the project. The purpose of this class is to allow a developer/user to easily access the various paths of the project without having to manually strip/replace strings/filenames/paths/etc.

The project structure where an URBANopt-Modelica analysis will occur follows a well defined structure and includes multiple levels of nested directories, data files, and scripts.

Presently, the scaffold stops at the loads, substation, plant, districts, scripts path and does not create a list of all of the submodels (yet).

__init__(root_dir, project_name, overwrite=False)

Initialize the scaffold. This will clear out the directory if it already exists, so use this with caution.

Parameters
  • root_dir – Directory where to create the scaffold

  • project_name – Name of the project to create (should contain no spaces)

  • overwrite – boolean, overwrite the project if it already exists?

Methods

__init__(root_dir, project_name[, overwrite])

Initialize the scaffold.

clear_or_create_path(path[, overwrite])

create()

run the scaffolding

create()

run the scaffolding