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_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_datetime: datetime.datetime

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

repository_plugin_id: str

The plugin identifier in the repository where it is published or is intended to be published. Defaults to None.

lrelease_path: str

The path of lrelease executable

pylupdate5_path: str

The path of pylupdate executable

timezone: str

The timezone for the plugin creation date. Defaults to: UTC.

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

repository_url_raw: str

Raw URL to plugin repository. Used to determine absolute URL to resources like plugin’s icon in the custom repository plugins.xml. Defaults to None.

static archive_name(plugin_name: str, 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) None

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.