pyiron_base.project.path.GenericPath#

class pyiron_base.project.path.GenericPath(root_path: str, project_path: str)[source]#

Bases: object

Basic class to represent a project path in PyIron. A path consists of two parts, the root part which defines directory path where the project repository is located (top_level_path) and the project part which defines the relative path from the root_path to the project.

This class is meant for storing and accessing a path, not for moving around which is done by the ProjectPath class.

Parameters:
  • root_path (str) – absolute path name of the repository

  • project_path (str) – relative path to the specific project

.. attribute:: root_path

the pyiron user directory, defined in the .pyiron configuration

.. attribute:: project_path

the relative path of the current project / folder starting from the root path of the pyiron user directory

.. attribute:: path

the absolute path of the current project / folder

.. attribute:: base_name

the name of the current project / folder

Author: Jan Janssen

__init__(root_path: str, project_path: str)[source]#

Methods

__init__(root_path, project_path)

copy()

Copy the GenericPath object

Attributes

base_name

The name of the current project folder

path

The absolute path to of the current object.

project_path

the relative path of the current project / folder starting from the root path of the pyiron user directory

root_path

the pyiron user directory, defined in the .pyiron configuration

property base_name: str#

The name of the current project folder

Returns:

name of the current project folder

Return type:

str

copy() GenericPath[source]#

Copy the GenericPath object

Returns:

independent GenericPath object pointing to the same project folder

Return type:

GenericPath

property path: str#

The absolute path to of the current object.

Returns:

current project path

Return type:

str

property project_path: str#

the relative path of the current project / folder starting from the root path of the pyiron user directory

Returns:

relative path of the current project / folder

Return type:

str

property root_path: str#

the pyiron user directory, defined in the .pyiron configuration

Returns:

pyiron user directory of the current project

Return type:

str