Configuration Extension
As for all nmk projects config items, nmk-python ones are all overridable by other plug-ins and project files. But the ones described on this page are specifically designed to be extended.
Files
Python generated files list may be extended by plugins enabling such python code generation.
Following config items may be extended for that purpose:
${pythonGeneratedSrcFiles}: List of python generated files.
Example:
pythonGeneratedSrcFiles: - ${sourceDir}/some_generated_file.py
Code format/analysis
Python code format/analysis behavior may be configured by python projects.
Following config items may be extended for that purpose:
${pythonLineLength}: python source code length
Example:
pythonLineLength: 150
${pythonIgnoredRules}: list of ignored rules
Example:
pythonIgnoredRules: - E123
${pythonAutoFixRules}: list of rules categories to auto-fix
Example:
pythonAutoFixRules: - F401 # Auto-fix unused imports
Build
Python wheel build behavior may be configured by python projects.
Following config items may be extended for that purpose:
${pythonPackageRequirements} and ${pythonPackageOptionalRequirements}: package mandatory/optional dependencies
Example:
pythonPackageRequirements: - some-package-dep pythonPackageOptionalRequirements: option-name: - some-optional-dep
${pythonProjectFileItems}: additional project configuration:
extra details on the project
Example:
pythonProjectFileItems: project: description: Some descriptive text for my python package
${pythonPackagePlatform}: package platform tag
Example:
pythonPackagePlatform: win_amd64 # Windows 64bits specific package
${pythonExtraResources}: extra resources to be bundled in the built wheel
Example:
pythonExtraResources: out/somethingbuilt.lib: ${sourceDir}/my_package
Tests
Python test behavior may be configured by python projects.
Following config items may be extended for that purpose:
${pytestExtraArgs}: pytest extra options
Example:
pytestExtraArgs: cov-fail-under: 80
${pythonProjectFileItems}: extra project config items to exclude folders from coverage
Example:
pythonProjectFileItems: tool: coverage: run: omit: - src/some_package/templates/*