Project Component

The Project component is the most important component within LASIF as it is the component which defines the project and sets up all the other components.

Contents:

Project components class.

It is important to not import necessary things at the method level to make importing this file as fast as possible. Otherwise using the command line interface feels sluggish and slow. Import things only the functions they are needed.

copyright

Lion Krischer (krischer@geophysik.uni-muenchen.de), 2013 Solvi Thrastarson (soelvi.thrastarson@erdw.ethz.ch), 2020 Dirk-Philip van Herwaarden (dirkphilip.vanherwaarden@erdw.ethz.ch), 2020

license

GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html)

class lasif.components.project.Project(project_root_path: pathlib.Path, init_project: bool = False)[source]

A class managing LASIF projects.

It represents the heart of LASIF.

get_log_file(log_type, description)[source]

Returns the name of a log file. It will create all necessary directories along the way but not the log file itsself.

Parameters
  • log_type – The type of logging. Will result in a subfolder. Examples for this are "PROCESSING", "DOWNLOADS", …

  • description – Short description of what is being downloaded. Will be used to derive the name of the logfile.

get_output_folder(type, tag, timestamp=True)[source]

Generates a output folder in a unified way.

Parameters
  • type – The type of data. Will be a subfolder.

  • tag – The tag of the folder. Will be postfix of the final folder.

  • timestamp – Add timestamp to folder name to ensure uniqueness. Defaults to True

get_project_function(fct_type: str)[source]

Helper importing the project specific function.

Parameters

fct_type (str) – The desired function.