qgispluginci.parameters module#

Parameters management.

class qgispluginci.parameters.Parameters(definition: Dict[str, Any])#

Bases: object

Attributes#

plugin_path: str

The directory of the source code in the repository. Defaults to: slugify(plugin_name)

github_organization_slug: str

The organization slug on SCM host (e.g. Github) and translation platform (e.g. Transifex). Not required when running on Travis since deduced from `$TRAVIS_REPO_SLUG`environment variable.

project_slug: str

The project slug on SCM host (e.g. Github) and translation platform (e.g. Transifex). Not required when running on Travis since deduced from `$TRAVIS_REPO_SLUG`environment variable.

transifex_coordinator: str

The username of the coordinator in Transifex. Required to create new languages.

transifex_organization: str

The organization name in Transifex Defaults to: the GitHub organization slug

transifex_project: str

The project on Transifex, which can be different from the one on GitHub. Defaults to: the project_slug

transifex_resource: str

The resource name in transifex Defaults to: the project_slug

translation_source_language:

The source language for translations. Defaults to: ‘en’

translation_languages:

List of languages.

changelog_include:

If the changelog must be added when releasing a version AND if there is a CHANGELOG.md file Defaults to True

changelog_path:

Path to the CHANGELOG.md relative to the configuration file. Defaults to CHANGELOG.md

changelog_number_of_entries:

Number of changelog entries to add in the metdata.txt Defaults to 3

create_date: datetime.date

The date of creation of the plugin. The would be used in the custom repository XML. Format: YYYY-MM-DD

lrelease_path: str

The path of lrelease executable

pylupdate5_path: str

The path of pylupdate executable

use_project_slug_as_plugin_directory: bool

If True, the project_slug is used for the plugin directory name in the installation. Defaults to False

static archive_name(plugin_name, release_version: str) str#

Returns the archive file name

collect_metadata() Callable[[str, Any | None], Any]#

Returns a closure capturing a Dict of metadata, allowing to retrieve one value after the other while also iterating over the file once.

static get_release_version_patterns() Dict[str, Pattern]#
classmethod make_from(*, args: Any | None = None, path_to_config_file: Path | None = None, optional_configuration: bool = False) Parameters#

Instantiate from a config file or by exploring the filesystem Accepts an argparse Namespace for backward compatibility.

static validate_args(args: Namespace)#

Raise an exception just in case: - the user didn’t opt-out of validation using the –no-validation flag; and - the value of release_version matches no supported pattern.