Configuration Reference

The nmk-base plugin handles the configuration items listed in this page.

All of them are initiliazed with convenient default values, so that you don’t need to setup them for a default working behavior. You can anyway override them in your projet if you need to fine tune the plugin behavior. Some items are specifically designed to be extended by nmk projects and plugins.

Paths and files

sourceDir – source base directory

Type

Default value

str

${PROJECTDIR}/src

Main source directory for the project (containing source files; used by other plugins).

outputDir – output base directory

Type

Default value

str

${PROJECTDIR}/out

Output folder used to generate build artifacts, temporary files, tools reports, etc…

Helper contributions

projectName – project name

Type

Default value

str

MyProject

Name of the project

projectAuthor – project author

Type

Default value

str

“Project Author”

Author of the project

nmkPluginsVersions – referenced plugins versions

Type

Default value

Dict[str,str]

{“nmk-base”: ${nmkBasePluginVersion}}

Plugins versions, indexed by names, to be displayed by version task

nmkPluginsDocs – referenced plugins help pages

Type

Default value

Dict[str,str]

{“nmk-base”: “https://github.com/dynod/nmk/wiki/nmk-base-plugin”}

Plugins help pages URLs indexed by names, to be displayed by help task.

Load scripts

The nmk-base plugin handles the generation of bootstrap scripts, that can be configured with following items.

loadMeTargets – load scripts targets

Type

Default value

List[str]

[ ${PROJECTDIR}/loadme.sh ]

Load scripts to be generated by loadme task.

loadMeTemplates – load scripts templates

Type

Default value

List[str]

[ ${BASEDIR}/templates/loadme.sh ]

Templates used by loadme task to generate load scripts.

loadMeVenvPython – load scripts python commands

Type

Default value

List[str]

[ python3 ]

Python commands to be called by load scripts when creating venv.

loadMeSysDeps – load scripts system dependencies

Type

Default value

Dict[str,Dict[str,str]]

{“python3”: {“apt”: [“python3”, “python3-venv”]},
”python”: {“url”: “https://www.python.org/downloads/”},
”git”: {“apt”: “git”, “url”: “https://git-scm.com/downloads”}}

Dict of required system dependencies (commands) to be handled by load scripts.

Git

The nmk-base plugin handles some git related configuration items, listed in this chapter.

gitVersion – git version

Type

Default value

str

Generated by nmk_base.git.GitVersionResolver

Version read from git for the current project, using git describe --tags --dirty command.

gitVersionStamp – git version resolution stamp file

Type

Default value

str

${outputDir}/.gitversion

Get version stamp file, updated by git.version task each time ${gitVersion} value changes. Can be used as input by tasks expecting to be triggered when git version changes.

gitIgnore – generated .gitignore file

Type

Default value

str

“${PROJECTDIR}/.gitignore”

Target generated .gitignore file.

gitIgnoreTemplate – .gitignore template file

Type

Default value

str

“${BASEDIR}/templates/gitignore”

Template used by git.ignore task to generate .gitignore fragment.

gitIgnoreStamp – .gitignore generated stamp file

Type

Default value

str

${outputDir}/.gitignore

Stamp file for generated .gitignore fragment.

gitIgnoredFiles – git ignored files list

Type

Default value

List[str]

[ “${PROJECTDIR_NMK}/”, “${outputDir}”, “${venvName}” ]

List of files/folders to be added when generating .gitignore file.

gitAttributes – generated .gitattributes file

Type

Default value

str

“${PROJECTDIR}/.gitattributes”

Target generated .gitattributes file.

gitAttributesTemplate – .gitattributes template file

Type

Default value

str

“${BASEDIR}/templates/gitattributes”

Template used by git.attributes task to generate .gitattributes fragment.

gitAttributesStamp – .gitattributes generated stamp file

Type

Default value

str

${outputDir}/.gitattributes

Stamp file for generated .gitattributes fragment.

linuxLineEndings – files with Linux line endings

Type

Default value

List[str]

[ “.sh” ]

List of files extensions (“.xxx” format) with Linux line endings; will be declared with “text eol=lf” attribute in generated .gitattributes fragment.

windowsLineEndings – files with Windows line endings

Type

Default value

List[str]

[ “.bat”, “.cmd” ]

List of files extensions (“.xxx” format) with Windows line endings; will be declared with “text eol=crlf” attribute in generated .gitattributes fragment.

gitEnableDirtyCheck – enable git dirty folder check

Type

Default value

bool

false

Enablement flag for git.dirty task (disabled by default).

Python venv

venvPkgDeps – venv packages dependencies list

Type

Default value

List[str]

[ “nmk” ]

List of python packages references to be installed in python venv (using pip requirement specifiers syntax).

venvArchiveDeps – venv archives dependencies list

Type

Default value

List[str]

[]

List of local python module archive paths to be installed in python venv.

venvFileDeps – venv requirement files list

Type

Default value

List[str]

[]

List of pip requirement files to be installed in python venv.

venvName – venv name

Type

Default value

str

“venv”

Name of the python venv folder.

venvRequirements – generated requirements file name

Type

Default value

str

“requirements.txt”

Name of the generated merged requirements file for python venv (relative to ${PROJECTDIR}).

venvState – output requirements file name

Type

Default value

str

${outputDir}/requirements.txt”

Name of the generated requirements file, containing a dump off all installed package versions in python venv.

venvPipArgs – pip install command extra arguments

Type

Default value

str

“”

Extra arguments for pip install commands (typically used to point to extra/internal repositories).

venvRequirementsTemplate – generated requirements file template

Type

Default value

str

“${BASEDIR}/templates/requirements.txt”

Template used to generate ${venvRequirements} merged requirements file.