MECO™ API Reference
|
[ MODULE ] - Settings module. More...
Classes | |
class | PlatformName |
[ ENUM CLASS ] - Platform names. More... | |
Functions | |
def | getProjectsPath (platformName, projectName=MASTER_PROJECT_NAME) |
Get absolute path of projects. More... | |
def | getProjectRootPath (platformName, projectName=MASTER_PROJECT_NAME) |
Get absolute path of given project. More... | |
def | getReservedPackagesPath (developerName, platformName) |
Get reserved packages path. More... | |
def | getDevelopmentPackagesPath (projectName, developerName, developmentEnvName, platformName, create=False) |
Get development packages path. More... | |
def | getStagePackagesPath (projectName, developerName, stageEnvName, platformName) |
Get stage packages path. More... | |
def | getProjectInternalPackagesPath (projectName, platformName) |
Get project internal packages path. More... | |
def | getProjectExternalPackagesPath (projectName, platformName) |
Get project external packages path. More... | |
def | getMasterProjectInternalPackagesPath (platformName) |
Get master project internal packages path. More... | |
def | getMasterProjectExternalPackagesPath (platformName) |
Get master project external packages path. More... | |
def | getLogFilePath (projectName, userName, developmentEnvName, stageEnvName, platformName) |
Get absolute path of a log file. More... | |
def | getAppFilePath (projectName, developerName, developmentEnvName, stageEnvName, platformName, app) |
Get absolute path of an app file. More... | |
def | getScriptFilePath (projectName, userName, developmentEnvName, stageEnvName, platformName, appFile) |
Get absolute path of a script file. More... | |
def | getTerminalHeaderDisplayColors (platformName) |
Get terminal header display colors. More... | |
def | getTerminalDisplayColors (platformName) |
Get terminal display colors. More... | |
Variables | |
string | IS_WINDOWS = 'Windows' |
[ bool ] - Whether the current platform is Windows. | |
string | MASTER_PROJECT_NAME = 'master' |
[ str ] - Name of the master project. | |
string | RESERVED_ENV_NAME = 'main' |
[ str ] - Reserved env name. | |
[ MODULE ] - Settings module.
This is the settings module where you can change the implementation of the settings functions in order to customize Meco. Please check the relevant function for detailed description below.
All functions below are invoked by Meco and their arguments are provided automatically.
def mMecoSettings.settingsLib.getProjectsPath | ( | platformName, | |
projectName = MASTER_PROJECT_NAME |
|||
) |
Get absolute path of projects.
Absolute path of where the projects are kept.
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
projectName | [ str | mMecoSettings.settingsLib.MASTER_PROJECT_NAME | in ] - Project name, which the project path will be provided for. |
N/A |
def mMecoSettings.settingsLib.getProjectRootPath | ( | platformName, | |
projectName = MASTER_PROJECT_NAME |
|||
) |
Get absolute path of given project.
Absolute path of where the projects are kept.
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
projectName | [ str | mMecoSettings.settingsLib.MASTER_PROJECT_NAME | in ] - Project name, which the project path will be provided for. |
N/A |
def mMecoSettings.settingsLib.getReservedPackagesPath | ( | developerName, | |
platformName | |||
) |
Get reserved packages path.
Return path is where the reserved packages are kept for given developer.
An example path would be like;
/projectsPath/MASTER_PROJECT_NAME/developers/DEVELOPER_NAME/reserved/main
developerName | [ str | None | in ] - Developer name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getDevelopmentPackagesPath | ( | projectName, | |
developerName, | |||
developmentEnvName, | |||
platformName, | |||
create = False |
|||
) |
Get development packages path.
Return path is where the development packages are kept for given project, developer and development environment.
An example path would be like;
/projectsPath/PROJECT_NAME/developers/DEVELOPER_NAME/development/DEVELOPMENT_ENV_NAME
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
create | [ bool | None | in ] - Create the development packages path if it doesn't exist. |
N/A |
def mMecoSettings.settingsLib.getStagePackagesPath | ( | projectName, | |
developerName, | |||
stageEnvName, | |||
platformName | |||
) |
Get stage packages path.
Return path is where the stage packages are kept for given project, developer and stage environment.
An example path would be like;
/projectsPath/PROJECT_NAME/developers/DEVELOPER_NAME/stage/STAGE_ENV_NAME
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getProjectInternalPackagesPath | ( | projectName, | |
platformName | |||
) |
Get project internal packages path.
Return path is where the internal production packages are kept for given project.
An example path would be like;
/projectsPath/PROJECT_NAME/internal
projectName | [ str | None | in ] - Project name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getProjectExternalPackagesPath | ( | projectName, | |
platformName | |||
) |
Get project external packages path.
Return path is where the external production packages are kept for given project.
An example path would be like;
/projectsPath/PROJECT_NAME/external
projectName | [ str | None | in ] - Project name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getMasterProjectInternalPackagesPath | ( | platformName | ) |
Get master project internal packages path.
Return path is where the internal production packages are kept for master project.
An example path would be like;
/projectsPath/MASTER_PROJECT_NAME/internal
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getMasterProjectExternalPackagesPath | ( | platformName | ) |
Get master project external packages path.
Return path is where the external production packages are kept for master project.
An example path would be like;
/projectsPath/MASTER_PROJECT_NAME/external
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getLogFilePath | ( | projectName, | |
userName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName | |||
) |
Get absolute path of a log file.
Log file would contain useful information for debugging purposes.
The following example path is also the one Meco uses by default.
/projectsPath/PROJECT_NAME/users/USER_NAME/env/log/log.txt
projectName | [ str | None | in ] - Project name. |
userName | [ str | None | in ] - User name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getAppFilePath | ( | projectName, | |
developerName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
app | |||
) |
Get absolute path of an app file.
Function returns the absolute file path of requested app, so information regarding the app can be obtained.
Location of the app file may vary. Example paths;
If development environment is initialized;
/projectsPath/PROJECT_NAME/developers/DEVELOPER_NAME/development/DEVELOPMENT_ENV_NAME/mMecoSettings/resources/apps/ENV_NAME.json
If stage environment is initialized;
/projectsPath/PROJECT_NAME/developers/DEVELOPER_NAME/stage/STAGE_ENV_NAME/mMecoSettings/resources/apps/ENV_NAME.json
If project environment is initialized;
/projectsPath/PROJECT_NAME/packages/mMecoSettings/0.0.0/mMecoSettings/resources/apps/ENV_NAME.json
If no project environment is initialized meaning that only master project is initialized;
/projectsPath/MASTER_PROJECT_NAME/packages/mMecoSettings/1.0.0/mMecoSettings/resources/apps/ENV_NAME.json
App file will be searched for in the paths provided above with the given order.
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
app | [ str | None | in ] - App. |
IOError | - If no app file found for given app . |
def mMecoSettings.settingsLib.getScriptFilePath | ( | projectName, | |
userName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
appFile | |||
) |
Get absolute path of a script file.
Script file will be written out by Meco and will contain the environment, so it can be sourced to set the environment.
The following example path is also the one Meco uses by default.
/projectsPath/PROJECT_NAME/users/USER_NAME/env/script/env_PROJECT_NAME_USER_NAME_DEVELOPMENT_ENV_NAME|STAGE_ENV_NAME.EXTENSION
projectName | [ str | None | in ] - Project name. |
userName | [ str | None | in ] - User name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
appFile | [ str | None | in ] - Absolute path of an app file if provided. |
N/A |
def mMecoSettings.settingsLib.getTerminalHeaderDisplayColors | ( | platformName | ) |
Get terminal header display colors.
You can customize the terminal header display colors by changing the return value of this function.
Index | Description |
---|---|
0. | Color of the dashes in headers |
1. | Color of the text in headers |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |
def mMecoSettings.settingsLib.getTerminalDisplayColors | ( | platformName | ) |
Get terminal display colors.
You can customize the terminal display colors by changing the return value of this function.
Index | Description |
---|---|
0. | Color of the development environment |
1. | Color of the stage environment |
2. | Color of the project environment |
3. | Color of the master project environment |
4. | Color of the before environment |
5. | Color of the after environment |
6. | Color of info |
platformName | [ str | None | in ] - Platform name, one of the following; Linux, Darwin, Windows. |
N/A |