MECO™ API Reference
Public Member Functions | Static Public Member Functions | List of all members
mMeco.libs.projectLib.Project Class Reference

[ CLASS ] - Class to operate on Meco projects. More...

Inheritance diagram for mMeco.libs.projectLib.Project:

Public Member Functions

def __init__ (self, name=None)
 Constructor. More...
 
def setProject (self, name)
 Set project. More...
 
def getLocalPath (self, relativePath)
 Get absolute path of given relativePath. More...
 
def getLocalHelpFile (self, folder)
 Get absolute path of the requested local help file. More...
 
def createReservedEnvironment (self, developerName=getuser())
 Create reserved environment. More...
 
def createDevelopmentEnvironment (self, name, developerName=getuser())
 Create development environment. More...
 
def createStageEnvironment (self, name, developmentEnvName, developerName=getuser(), verbose=False)
 Create stage environment. More...
 
PROPERTIES
def name (self)
 Property. More...
 
def projectRoot (self)
 Property. More...
 

Static Public Member Functions

def create (name)
 Create a project. More...
 
def list ()
 List projects. More...
 

Detailed Description

[ CLASS ] - Class to operate on Meco projects.

Constructor & Destructor Documentation

◆ __init__()

def mMeco.libs.projectLib.Project.__init__ (   self,
  name = None 
)

Constructor.

This method calls setPackage method regardless absolutePath argument is provided or not.

Parameters
name[ str | None | in ] - Name of the project to be set.
Exceptions
N/A
Returns
None - None.

Member Function Documentation

◆ name()

def mMeco.libs.projectLib.Project.name (   self)

Property.

Exceptions
N/A
Returns
str - Project name.

◆ projectRoot()

def mMeco.libs.projectLib.Project.projectRoot (   self)

Property.

Exceptions
N/A
Returns
str - Project root.

◆ setProject()

def mMeco.libs.projectLib.Project.setProject (   self,
  name 
)

Set project.

Parameters
name[ str | None | in ] - Name of the project to be set.
Exceptions
IOError- If a project with given name doesn't exist.
Returns
bool - Result.

◆ getLocalPath()

def mMeco.libs.projectLib.Project.getLocalPath (   self,
  relativePath 
)

Get absolute path of given relativePath.

Method doesn't check whether the returned path exists.

Parameters
relativePath[ str | None | in ] - A value from mMeco.libs.enumLib.ProjectFolderStructure enum class.
Exceptions
N/A
Returns
str - Absolute path of the requested folder.
None - If no package has been set.

◆ getLocalHelpFile()

def mMeco.libs.projectLib.Project.getLocalHelpFile (   self,
  folder 
)

Get absolute path of the requested local help file.

Parameters
folder[ str | None | in ] - A value from mMeco.libs.enumLib.ProjectFolderStructure enum class.
Exceptions
N/A
Returns
str - Absolute path of the help file.
None - If help file doesn't exist.
None - If no project has been set.

◆ createReservedEnvironment()

def mMeco.libs.projectLib.Project.createReservedEnvironment (   self,
  developerName = getuser() 
)

Create reserved environment.

Parameters
developerName[ str | getuser() | in ] - Name of the developer.
Exceptions
IOError- If reserved environment already exists.
Returns
str - Absolute path of the reserved environment.

◆ createDevelopmentEnvironment()

def mMeco.libs.projectLib.Project.createDevelopmentEnvironment (   self,
  name,
  developerName = getuser() 
)

Create development environment.

Parameters
name[ str | None | in ] - Name of the development environment.
developerName[ str | getuser() | in ] - Name of the developer.
Exceptions
IOError- If development environment with given name already exists.
Returns
str - Absolute path of the development environment.

◆ createStageEnvironment()

def mMeco.libs.projectLib.Project.createStageEnvironment (   self,
  name,
  developmentEnvName,
  developerName = getuser(),
  verbose = False 
)

Create stage environment.

Parameters
name[ str | None | in ] - Name of the stage environment.
developmentEnvName[ str | None | in ] - Name of the development environment where packages will be copied from.
developerName[ str | getuser() | in ] - Name of the developer who owns the development and stage environment.
verbose[ bool | False | in ] - Displayed created package names.
Exceptions
IOError- If development environment with given developmentEnvName doesn't exist.
IOError- If stage environment with given name already exists.
IOError- If no package found in development environment.
Returns
str - Absolute path of the stage environment.

◆ create()

def mMeco.libs.projectLib.Project.create (   name)
static

Create a project.

Parameters
name[ str | None | in ] - Name of the project, which will be created.
Exceptions
IOError- If a project with given name already exists.
Returns
mMeco.libs.projectLib.Project - Instance of mMeco.libs.projectLib.Project, which represents the created project.

◆ list()

def mMeco.libs.projectLib.Project.list ( )
static

List projects.

Exceptions
IOError- If projects path doesn't exist.
Returns
list of str - Name of the projects.

The documentation for this class was generated from the following file: