Skip to content

python Submodule

Structs

PagesPdoc3Props

Initializer

1
2
3
4
5
6
7
8
from gcix import python

python.PagesPdoc3Props(
  module: str,
  job_name: str = None,
  job_stage: str = None,
  output_path: str = None
)

Properties

Name Type Description
module str The Python module name.
job_name str The name of the job.
job_stage str The stage of the job.
output_path str A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

moduleRequired
module: str
  • Type: str

The Python module name.

This may be an import path resolvable in the current environment, or a file path to a Python module or package.


job_nameOptional
job_name: str
  • Type: str

The name of the job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the job.


output_pathOptional
output_path: str
  • Type: str

A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

Defaults to "/".


PagesSphinxProps

Initializer

1
2
3
4
5
6
7
from gcix import python

python.PagesSphinxProps(
  job_name: str = None,
  job_stage: str = None,
  pip: PipInstallRequirementsProps = None
)

Properties

Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.
pip PipInstallRequirementsProps No description.

job_nameOptional
job_name: str
  • Type: str

The name of the job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the job.


pipOptional
pip: PipInstallRequirementsProps

PipInstallRequirementsProps

Represents the properties for the pipInstallRequirements static method.

Initializer

1
2
3
4
5
6
from gcix import python

python.PipInstallRequirementsProps(
  pipenv_version_specifier: str = None,
  requirements_file: str = None
)

Properties

Name Type Description
pipenv_version_specifier str The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to an empty string, indicating installation of the latest version.
requirements_file str The location and name of the requirements file.

pipenv_version_specifierOptional
pipenv_version_specifier: str
  • Type: str
  • Default: ""

The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to an empty string, indicating installation of the latest version.


requirements_fileOptional
requirements_file: str
  • Type: str
  • Default: "requirements.txt"

The location and name of the requirements file.


PythonBuildBdistWheelProps

Initializer

1
2
3
4
5
6
7
from gcix import python

python.PythonBuildBdistWheelProps(
  job_name: str = None,
  job_stage: str = None,
  pip_requirements: PipInstallRequirementsProps = None
)

Properties

Name Type Description
job_name str No description.
job_stage str No description.
pip_requirements PipInstallRequirementsProps No description.

job_nameOptional
job_name: str
  • Type: str

job_stageOptional
job_stage: str
  • Type: str

pip_requirementsOptional
pip_requirements: PipInstallRequirementsProps

PythonDeployTwineUploadProps

Represents the properties for the TwineUpload class.

Initializer

1
2
3
4
5
6
7
8
9
from gcix import python

python.PythonDeployTwineUploadProps(
  job_name: str = None,
  job_stage: str = None,
  twine_password_env_var: str = None,
  twine_repository_url: str = None,
  twine_username_env_var: str = None
)

Properties

Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.
twine_password_env_var str The name of the environment variable containing the password.
twine_repository_url str The URL to the PyPI repository to which the Python artifacts will be deployed.
twine_username_env_var str The name of the environment variable containing the username value.

job_nameOptional
job_name: str
  • Type: str

The name of the job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the job.


twine_password_env_varOptional
twine_password_env_var: str
  • Type: str

The name of the environment variable containing the password.

DO NOT PROVIDE THE LOGIN VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_PASSWORD'.


twine_repository_urlOptional
twine_repository_url: str
  • Type: str

The URL to the PyPI repository to which the Python artifacts will be deployed.

If undefined the package is published to https://pypi.org.


twine_username_env_varOptional
twine_username_env_var: str
  • Type: str

The name of the environment variable containing the username value.

DO NOT PROVIDE THE USERNAME VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_USERNAME'.


PythonFullStackProps

Initializer

from gcix import python

python.PythonFullStackProps(
  twine_prod_job_props: PythonDeployTwineUploadProps,
  b_dist_wheel_job_props: PythonBuildBdistWheelProps = None,
  evaluate_git_tag_pep440_conformity_job_props: PythonTestEvaluateGitTagPep440ConformityProps = None,
  flake8_job_props: PythonLintFlake8Props = None,
  isort_job_props: PythonLintIsortProps = None,
  mypy_job_props: PythonLintMyPyProps = None,
  pytest_job_props: PythonTestPytestProps = None,
  sphinx_props_job_props: PagesSphinxProps = None,
  twine_dev_job_props: PythonDeployTwineUploadProps = None
)

Properties

Name Type Description
twine_prod_job_props PythonDeployTwineUploadProps No description.
b_dist_wheel_job_props PythonBuildBdistWheelProps No description.
evaluate_git_tag_pep440_conformity_job_props PythonTestEvaluateGitTagPep440ConformityProps No description.
flake8_job_props PythonLintFlake8Props No description.
isort_job_props PythonLintIsortProps No description.
mypy_job_props PythonLintMyPyProps No description.
pytest_job_props PythonTestPytestProps No description.
sphinx_props_job_props PagesSphinxProps No description.
twine_dev_job_props PythonDeployTwineUploadProps No description.

twine_prod_job_propsRequired
twine_prod_job_props: PythonDeployTwineUploadProps

b_dist_wheel_job_propsOptional
b_dist_wheel_job_props: PythonBuildBdistWheelProps

evaluate_git_tag_pep440_conformity_job_propsOptional
evaluate_git_tag_pep440_conformity_job_props: PythonTestEvaluateGitTagPep440ConformityProps

flake8_job_propsOptional
flake8_job_props: PythonLintFlake8Props

isort_job_propsOptional
isort_job_props: PythonLintIsortProps

mypy_job_propsOptional
mypy_job_props: PythonLintMyPyProps

pytest_job_propsOptional
pytest_job_props: PythonTestPytestProps

sphinx_props_job_propsOptional
sphinx_props_job_props: PagesSphinxProps

twine_dev_job_propsOptional
twine_dev_job_props: PythonDeployTwineUploadProps

PythonLintFlake8Props

Initializer

1
2
3
4
5
6
from gcix import python

python.PythonLintFlake8Props(
  job_name: str = None,
  job_stage: str = None
)

Properties

Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.

job_nameOptional
job_name: str
  • Type: str

The name of the job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the job.


PythonLintIsortProps

Initializer

1
2
3
4
5
6
from gcix import python

python.PythonLintIsortProps(
  job_name: str = None,
  job_stage: str = None
)

Properties

Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.

job_nameOptional
job_name: str
  • Type: str

The name of the job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the job.


PythonLintMyPyProps

Initializer

1
2
3
4
5
6
7
8
9
from gcix import python

python.PythonLintMyPyProps(
  package_dir: str,
  job_name: str = None,
  job_stage: str = None,
  my_py_options: str = None,
  my_py_version: str = None
)

Properties

Name Type Description
package_dir str Package directory to type check.
job_name str The name of the job.
job_stage str The stage of the job.
my_py_options str Adds arguments to mypy execution.
my_py_version str If mypy is not already installed, this version will be installed.

package_dirRequired
package_dir: str
  • Type: str

Package directory to type check.


job_nameOptional
job_name: str
  • Type: str

The name of the job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the job.


my_py_optionsOptional
my_py_options: str
  • Type: str

Adds arguments to mypy execution.


my_py_versionOptional
my_py_version: str
  • Type: str

If mypy is not already installed, this version will be installed.

Installs latest version if undefined.


PythonTestEvaluateGitTagPep440ConformityProps

Initializer

1
2
3
4
5
6
from gcix import python

python.PythonTestEvaluateGitTagPep440ConformityProps(
  job_name: str = None,
  job_stage: str = None
)

Properties

Name Type Description
job_name str The name of the Bootstrap job.
job_stage str The stage of the Bootstrap job.

job_nameOptional
job_name: str
  • Type: str

The name of the Bootstrap job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the Bootstrap job.


PythonTestPytestProps

Initializer

1
2
3
4
5
6
7
8
from gcix import python

python.PythonTestPytestProps(
  job_name: str = None,
  job_stage: str = None,
  pipenv_version_specifier: str = None,
  pytest_command: str = None
)

Properties

Name Type Description
job_name str The name of the Bootstrap job.
job_stage str The stage of the Bootstrap job.
pipenv_version_specifier str The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.
pytest_command str This argument is only required if you have a custom command to call pytest.

job_nameOptional
job_name: str
  • Type: str

The name of the Bootstrap job.


job_stageOptional
job_stage: str
  • Type: str

The stage of the Bootstrap job.


pipenv_version_specifierOptional
pipenv_version_specifier: str
  • Type: str

The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.


pytest_commandOptional
pytest_command: str
  • Type: str

This argument is only required if you have a custom command to call pytest.


Classes

PagesPdoc3

Generate a HTML API documentation of you python code as Gitlab Pages.

Runs pdoc3 --html -f --skip-errors --output-dir public{path} {module} and stores the output as artifact under the public directory.

This subclass of Job will configure following defaults for the superclass:

  • name: pdoc3-pages
  • stage: build
  • artifacts: Path 'public'

Initializers

1
2
3
4
5
6
7
8
from gcix import python

python.PagesPdoc3(
  module: str,
  job_name: str = None,
  job_stage: str = None,
  output_path: str = None
)
Name Type Description
module str The Python module name.
job_name str The name of the job.
job_stage str The stage of the job.
output_path str A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

moduleRequired
  • Type: str

The Python module name.

This may be an import path resolvable in the current environment, or a file path to a Python module or package.


job_nameOptional
  • Type: str

The name of the job.


job_stageOptional
  • Type: str

The stage of the job.


output_pathOptional
  • Type: str

A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

Defaults to "/".


Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.
module str The Python module name.
output_path str A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

moduleRequired
module: str
  • Type: str

The Python module name.

This may be an import path resolvable in the current environment, or a file path to a Python module or package.


output_pathRequired
output_path: str
  • Type: str

A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

Defaults to "/".


PagesSphinx

Runs sphinx-build -b html -E -a docs public/${CI_COMMIT_REF_NAME} and installs project requirements. Uses: (PythonScripts.PipInstallRequirements()).

  • Requires a docs/requirements.txt in your project foldercontaining at leastsphinx`
  • Creates artifacts for Gitlab Pages under pages

This subclass of Job will configure following defaults for the superclass:

  • name: sphinx-pages
  • stage: build
  • artifacts: Path 'public'

Initializers

1
2
3
4
5
6
7
from gcix import python

python.PagesSphinx(
  job_name: str = None,
  job_stage: str = None,
  pip: PipInstallRequirementsProps = None
)
Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.
pip PipInstallRequirementsProps No description.

job_nameOptional
  • Type: str

The name of the job.


job_stageOptional
  • Type: str

The stage of the job.


pipOptional

Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.
pip PipInstallRequirementsProps No description.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

pipOptional
pip: PipInstallRequirementsProps

PythonBuildBdistWheel

Runs python3 setup.py bdist_wheel and installs project requirements Requirements are installed by LinuxScripts.pipInstallRequirements().

This subclass of Job configures the following defaults for the superclass:

  • name: bdist_wheel
  • stage: build
  • artifacts: Path 'dist/'

Requires a Pipfile.lock or requirements.txt in your project folder containing at least setuptools. Creates artifacts under the path 'dist/'.

Initializers

1
2
3
4
5
6
7
from gcix import python

python.PythonBuildBdistWheel(
  job_name: str = None,
  job_stage: str = None,
  pip_requirements: PipInstallRequirementsProps = None
)
Name Type Description
job_name str No description.
job_stage str No description.
pip_requirements PipInstallRequirementsProps No description.

job_nameOptional
  • Type: str

job_stageOptional
  • Type: str

pip_requirementsOptional

Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.
pipenv_version_specifier str No description.
requirements_file str No description.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

pipenv_version_specifierOptional
pipenv_version_specifier: str
  • Type: str

requirements_fileOptional
requirements_file: str
  • Type: str

PythonDeployTwineUpload

Runs:.

pip3 install --upgrade twine
python3 -m twine upload --non-interactive --disable-progress-bar dist/*

Requires artifacts from a build job under dist/ (e.g. from BdistWheel())

This subclass of Job configures the following defaults for the superclass:

  • name: twine
  • stage: deploy

Initializers

1
2
3
4
5
6
7
8
9
from gcix import python

python.PythonDeployTwineUpload(
  job_name: str = None,
  job_stage: str = None,
  twine_password_env_var: str = None,
  twine_repository_url: str = None,
  twine_username_env_var: str = None
)
Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.
twine_password_env_var str The name of the environment variable containing the password.
twine_repository_url str The URL to the PyPI repository to which the Python artifacts will be deployed.
twine_username_env_var str The name of the environment variable containing the username value.

job_nameOptional
  • Type: str

The name of the job.


job_stageOptional
  • Type: str

The stage of the job.


twine_password_env_varOptional
  • Type: str

The name of the environment variable containing the password.

DO NOT PROVIDE THE LOGIN VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_PASSWORD'.


twine_repository_urlOptional
  • Type: str

The URL to the PyPI repository to which the Python artifacts will be deployed.

If undefined the package is published to https://pypi.org.


twine_username_env_varOptional
  • Type: str

The name of the environment variable containing the username value.

DO NOT PROVIDE THE USERNAME VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_USERNAME'.


Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.
twine_password_env_var str The name of the environment variable containing the password.
twine_username_env_var str The name of the environment variable containing the username value.
twine_repository_url str The URL to the PyPI repository to which the Python artifacts will be deployed.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

twine_password_env_varRequired
twine_password_env_var: str
  • Type: str

The name of the environment variable containing the password.

DO NOT PROVIDE THE LOGIN VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_PASSWORD'.


twine_username_env_varRequired
twine_username_env_var: str
  • Type: str

The name of the environment variable containing the username value.

DO NOT PROVIDE THE USERNAME VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_USERNAME'.


twine_repository_urlOptional
twine_repository_url: str
  • Type: str

The URL to the PyPI repository to which the Python artifacts will be deployed.

If undefined the package is published to https://pypi.org.


PythonFullStack

Returns a sequence containing following jobs: - isort - flake8 - pytest - evaluating CI_COMMIT_TAG as valid PyPI version string (if exists) - bdist_wheel - Gitlab Pages sphinx - twine upload Optional jobs: - mypy The varname_dev_password and varname_stable_password arguments are only used to specify the variable name and not the actuall password.

The variable name has to be set outside of the pipeline itself, if you set it within the pipline, that would be a security risk.

Initializers

from gcix import python

python.PythonFullStack(
  twine_prod_job_props: PythonDeployTwineUploadProps,
  b_dist_wheel_job_props: PythonBuildBdistWheelProps = None,
  evaluate_git_tag_pep440_conformity_job_props: PythonTestEvaluateGitTagPep440ConformityProps = None,
  flake8_job_props: PythonLintFlake8Props = None,
  isort_job_props: PythonLintIsortProps = None,
  mypy_job_props: PythonLintMyPyProps = None,
  pytest_job_props: PythonTestPytestProps = None,
  sphinx_props_job_props: PagesSphinxProps = None,
  twine_dev_job_props: PythonDeployTwineUploadProps = None
)
Name Type Description
twine_prod_job_props PythonDeployTwineUploadProps No description.
b_dist_wheel_job_props PythonBuildBdistWheelProps No description.
evaluate_git_tag_pep440_conformity_job_props PythonTestEvaluateGitTagPep440ConformityProps No description.
flake8_job_props PythonLintFlake8Props No description.
isort_job_props PythonLintIsortProps No description.
mypy_job_props PythonLintMyPyProps No description.
pytest_job_props PythonTestPytestProps No description.
sphinx_props_job_props PagesSphinxProps No description.
twine_dev_job_props PythonDeployTwineUploadProps No description.

twine_prod_job_propsRequired

b_dist_wheel_job_propsOptional

evaluate_git_tag_pep440_conformity_job_propsOptional

flake8_job_propsOptional

isort_job_propsOptional

mypy_job_propsOptional

pytest_job_propsOptional

sphinx_props_job_propsOptional

twine_dev_job_propsOptional

Methods

Name Description
add_children Add gcix.Jobs or other gcix.JobCollections to this JobCollection.
add_dependencies No description.
add_needs No description.
add_parent No description.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_artifacts No description.
assign_cache No description.
get_all_instance_names Return all instance names from the given child.
initialize_allow_failure Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection that haven't been set the allowFailure before.
initialize_artifacts Sets gcix.Job.artifacts to all jobs within this JobCollection that haven't been set the artifacs before.
initialize_cache Calling gcix.Job.assigneCache() to all jobs within this JobCollection that haven't been set the cache before.
initialize_dependencies Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection that haven't been added dependencies before.
initialize_image Calling gcix.Job.assignImage() to all jobs within this JobCollection.
initialize_needs Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection that haven't been added needs before.
initialize_rules Calling gcix.Job.append_rules() to all jobs within this JobCollection that haven't been added rules before.
initialize_tags Calling gcix.Job.addTags([...]) to all jobs within this JobCollection that haven't been added tags before.
initialize_variables Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection that haven't been added variables before.
is_equal isEqual checks if this object is equal to given object.
override_allow_failure Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection overriding any previous set value.
override_dependencies Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs.
override_image Calling gcix.Job.assignImage() to all jobs within this JobCollection overriding any previous set value.
override_needs Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs.
override_rules Calling gcix.Job.overrideRules() to all jobs within this JobCollection and overriding any previously added rules to that jobs.
override_tags Calling gcix.Job.addTags([...]) to all jobs within this JobCollection and overriding any previously added tags to that jobs.
override_variables Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection and overriding any previously added variables to that jobs.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_children
1
2
3
4
5
def add_children(
  jobs_or_job_collections: typing.List[typing.Union[Job, JobCollection]],
  name: str = None,
  stage: str = None
) -> JobCollection

Add gcix.Jobs or other gcix.JobCollections to this JobCollection.

Adding a child creates a copy of that child. You should provide a name or stage when adding children, to make them different from other places where they will be used.

jobs_or_job_collectionsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

nameOptional
  • Type: str

stageOptional
  • Type: str

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> JobCollection
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> JobCollection
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: JobCollection
) -> None
parentRequired
  • Type: gcix.JobCollection

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> JobCollection
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> JobCollection
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> JobCollection
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> JobCollection
scriptsRequired
  • Type: typing.List[str]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> JobCollection
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> JobCollection
cacheRequired
  • Type: gcix.Cache

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this JobCollection and all parent JobCollection's.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

initialize_allow_failure
1
2
3
def initialize_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> JobCollection

Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection that haven't been set the allowFailure before.

allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

initialize_artifacts
1
2
3
def initialize_artifacts(
  artifacts: Artifacts
) -> JobCollection

Sets gcix.Job.artifacts to all jobs within this JobCollection that haven't been set the artifacs before.

artifactsRequired
  • Type: gcix.Artifacts

initialize_cache
1
2
3
def initialize_cache(
  cache: Cache
) -> JobCollection

Calling gcix.Job.assigneCache() to all jobs within this JobCollection that haven't been set the cache before.

cacheRequired
  • Type: gcix.Cache

initialize_dependencies
1
2
3
def initialize_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> JobCollection

Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection that haven't been added dependencies before.

An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts by default.

dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

initialize_image
1
2
3
def initialize_image(
  image: typing.Union[str, Image]
) -> JobCollection

Calling gcix.Job.assignImage() to all jobs within this JobCollection.

imageRequired
  • Type: typing.Union[str, gcix.Image]

initialize_needs
1
2
3
def initialize_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> JobCollection

Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection that haven't been added needs before.

An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs by default.

needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

initialize_rules
1
2
3
def initialize_rules(
  rules: typing.List[Rule]
) -> JobCollection

Calling gcix.Job.append_rules() to all jobs within this JobCollection that haven't been added rules before.

rulesRequired
  • Type: typing.List[gcix.Rule]

initialize_tags
1
2
3
def initialize_tags(
  tags: typing.List[str]
) -> JobCollection

Calling gcix.Job.addTags([...]) to all jobs within this JobCollection that haven't been added tags before.

tagsRequired
  • Type: typing.List[str]

initialize_variables
1
2
3
def initialize_variables(
  variables: typing.Mapping[str]
) -> JobCollection

Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection that haven't been added variables before.

variablesRequired
  • Type: typing.Mapping[str]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

override_allow_failure
1
2
3
def override_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> JobCollection

Calling gcix.Job.assignAllowFailure() to all jobs within this JobCollection overriding any previous set value.

allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

override_dependencies
1
2
3
def override_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> JobCollection

Calling gcix.Job.assignDependencies() to all jobs within the first stage of this JobCollection and overriding any previously added dependencies to that jobs.

An empty parameter list means that jobs will get an empty dependency list and thus does not download artifacts.

dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

override_image
1
2
3
def override_image(
  image: typing.Union[str, Image]
) -> JobCollection

Calling gcix.Job.assignImage() to all jobs within this JobCollection overriding any previous set value.

imageRequired
  • Type: typing.Union[str, gcix.Image]

override_needs
1
2
3
def override_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> JobCollection

Calling gcix.Job.assignNeeds() to all jobs within the first stage of this JobCollection and overriding any previously added needs to that jobs.

An empty parameter list means that jobs will get an empty dependency list and thus does not depend on other jobs.

needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

override_rules
1
2
3
def override_rules(
  rules: typing.List[Rule]
) -> JobCollection

Calling gcix.Job.overrideRules() to all jobs within this JobCollection and overriding any previously added rules to that jobs.

rulesRequired
  • Type: typing.List[gcix.Rule]

override_tags
1
2
3
def override_tags(
  tags: typing.List[str]
) -> JobCollection

Calling gcix.Job.addTags([...]) to all jobs within this JobCollection and overriding any previously added tags to that jobs.

tagsRequired
  • Type: typing.List[str]

override_variables
1
2
3
def override_variables(
  variables: typing.Mapping[str]
) -> JobCollection

Calling gcix.Job.addVariables({...}) to all jobs within this JobCollection and overriding any previously added variables to that jobs.

variablesRequired
  • Type: typing.Mapping[str]

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> JobCollection
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> JobCollection
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
last_jobs_executed typing.List[gcix.Job] This property returns all Jobs from the last stage of this JobCollection.
nested_jobs typing.List[gcix.Job] No description.
populated_jobs typing.List[gcix.Job] Returns a list with populated copies of all nested jobs of this JobCollection.
children typing.List[gcix.ChildDict] No description.
ordered_tags gcix.OrderedStringSet No description.
ordered_tags_for_initialization gcix.OrderedStringSet No description.
ordered_tags_for_replacement gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
allow_failure_for_initialization typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
allow_failure_for_replacement typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
artifacts gcix.Artifacts No description.
artifacts_for_initialization gcix.Artifacts No description.
artifacts_for_replacement gcix.Artifacts No description.
cache gcix.Cache No description.
cache_for_initialization gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
dependencies_for_initialization typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
dependencies_for_replacement typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image_for_initialization typing.Union[str, gcix.Image] No description.
image_for_replacement typing.Union[str, gcix.Image] No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
needs_for_initialization typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
needs_for_replacement typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
rules_for_initialization typing.List[gcix.Rule] No description.
rules_for_replacement typing.List[gcix.Rule] No description.
rules_to_append typing.List[gcix.Rule] No description.
rules_to_prepend typing.List[gcix.Rule] No description.
scripts_to_append typing.List[str] No description.
scripts_to_prepend typing.List[str] No description.
variables typing.Mapping[str] No description.
variables_for_initialization typing.Mapping[str] No description.
variables_for_replacement typing.Mapping[str] No description.
b_dist_wheel_job PythonBuildBdistWheel No description.
evaluate_git_tag_pep440_conformity_job PythonTestEvaluateGitTagPep440Conformity No description.
flake8_job PythonLintFlake8 No description.
isort_job PythonLintIsort No description.
pytest_job PythonTestPytest No description.
twine_prod_job PythonDeployTwineUpload No description.
mypy_job PythonLintMyPy No description.
sphinx_job PagesSphinx No description.
twine_dev_job PythonDeployTwineUpload No description.

last_jobs_executedRequired
last_jobs_executed: typing.List[Job]
  • Type: typing.List[gcix.Job]

This property returns all Jobs from the last stage of this JobCollection.

This is typically be requested from a job which has setup this JobCollection as need, to determine all actual jobs of this JobCollection as need.


nested_jobsRequired
nested_jobs: typing.List[Job]
  • Type: typing.List[gcix.Job]

populated_jobsRequired
populated_jobs: typing.List[Job]
  • Type: typing.List[gcix.Job]

Returns a list with populated copies of all nested jobs of this JobCollection.

Populated means, that all attributes of a Job which depends on its context are resolved to their final values. The context is primarily the JobCollection within the jobs resides but also dependencies to other jobs and JobCollection's. Thus this JobCollection will apply its own configuration, like variables to add, tags to set, etc., to all its jobs and JobCollection's.

Copies means what it says, that the returned job are not the same job objects, originally added to this JobCollection, but copies of them.

Nested means, that also jobs from JobCollection's within this JobCollection, are returned, as well as jobs from JobCollection's within JobCollection's within this JobCollection and so on.


childrenRequired
children: typing.List[ChildDict]
  • Type: typing.List[gcix.ChildDict]

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

ordered_tags_for_initializationRequired
ordered_tags_for_initialization: OrderedStringSet
  • Type: gcix.OrderedStringSet

ordered_tags_for_replacementRequired
ordered_tags_for_replacement: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

allow_failure_for_initializationOptional
allow_failure_for_initialization: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

allow_failure_for_replacementOptional
allow_failure_for_replacement: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

artifacts_for_initializationOptional
artifacts_for_initialization: Artifacts
  • Type: gcix.Artifacts

artifacts_for_replacementOptional
artifacts_for_replacement: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

cache_for_initializationOptional
cache_for_initialization: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

dependencies_for_initializationOptional
dependencies_for_initialization: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

dependencies_for_replacementOptional
dependencies_for_replacement: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

image_for_initializationOptional
image_for_initialization: typing.Union[str, Image]
  • Type: typing.Union[str, gcix.Image]

image_for_replacementOptional
image_for_replacement: typing.Union[str, Image]
  • Type: typing.Union[str, gcix.Image]

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

needs_for_initializationOptional
needs_for_initialization: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

needs_for_replacementOptional
needs_for_replacement: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

rules_for_initializationOptional
rules_for_initialization: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

rules_for_replacementOptional
rules_for_replacement: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

rules_to_appendOptional
rules_to_append: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

rules_to_prependOptional
rules_to_prepend: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

scripts_to_appendOptional
scripts_to_append: typing.List[str]
  • Type: typing.List[str]

scripts_to_prependOptional
scripts_to_prepend: typing.List[str]
  • Type: typing.List[str]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

variables_for_initializationOptional
variables_for_initialization: typing.Mapping[str]
  • Type: typing.Mapping[str]

variables_for_replacementOptional
variables_for_replacement: typing.Mapping[str]
  • Type: typing.Mapping[str]

b_dist_wheel_jobRequired
b_dist_wheel_job: PythonBuildBdistWheel

evaluate_git_tag_pep440_conformity_jobRequired
evaluate_git_tag_pep440_conformity_job: PythonTestEvaluateGitTagPep440Conformity

flake8_jobRequired
flake8_job: PythonLintFlake8

isort_jobRequired
isort_job: PythonLintIsort

pytest_jobRequired
pytest_job: PythonTestPytest

twine_prod_jobRequired
twine_prod_job: PythonDeployTwineUpload

mypy_jobOptional
mypy_job: PythonLintMyPy

sphinx_jobOptional
sphinx_job: PagesSphinx

twine_dev_jobOptional
twine_dev_job: PythonDeployTwineUpload

PythonLintFlake8

Runs:.

pip3 install --upgrade flake8
flake8

This subclass of Job configures the following defaults for the superclass:

  • name: flake8
  • stage: lint

Initializers

1
2
3
4
5
6
from gcix import python

python.PythonLintFlake8(
  job_name: str = None,
  job_stage: str = None
)
Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.

job_nameOptional
  • Type: str

The name of the job.


job_stageOptional
  • Type: str

The stage of the job.


Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

PythonLintIsort

Runs:.

pip3 install --upgrade isort
isort --check .

This subclass of Job will configure following defaults for the superclass:

  • name: isort
  • stage: lint

Initializers

1
2
3
4
5
6
from gcix import python

python.PythonLintIsort(
  job_name: str = None,
  job_stage: str = None
)
Name Type Description
job_name str The name of the job.
job_stage str The stage of the job.

job_nameOptional
  • Type: str

The name of the job.


job_stageOptional
  • Type: str

The stage of the job.


Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

PythonLintMyPy

Install mypy if not already installed. Execute mypy for packageDir.

This subclass of Job configures the following defaults for the superclass:

  • name: mypy
  • stage: lint

Initializers

1
2
3
4
5
6
7
8
9
from gcix import python

python.PythonLintMyPy(
  package_dir: str,
  job_name: str = None,
  job_stage: str = None,
  my_py_options: str = None,
  my_py_version: str = None
)
Name Type Description
package_dir str Package directory to type check.
job_name str The name of the job.
job_stage str The stage of the job.
my_py_options str Adds arguments to mypy execution.
my_py_version str If mypy is not already installed, this version will be installed.

package_dirRequired
  • Type: str

Package directory to type check.


job_nameOptional
  • Type: str

The name of the job.


job_stageOptional
  • Type: str

The stage of the job.


my_py_optionsOptional
  • Type: str

Adds arguments to mypy execution.


my_py_versionOptional
  • Type: str

If mypy is not already installed, this version will be installed.

Installs latest version if undefined.


Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.
package_dir str Package directory to type check.
my_py_options str Adds arguments to mypy execution.
my_py_version str If mypy is not already installed, this version will be installed.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

package_dirRequired
package_dir: str
  • Type: str

Package directory to type check.


my_py_optionsOptional
my_py_options: str
  • Type: str

Adds arguments to mypy execution.


my_py_versionOptional
my_py_version: str
  • Type: str

If mypy is not already installed, this version will be installed.

Installs latest version if undefined.


PythonScripts

Represents a collection of utility functions for scripting tasks.

Static Functions

Name Description
pip_install_requirements Generates a shell command to install project requirements using pipenv and pip based on the presence of a Pipfile.lock or requirements.txt.

pip_install_requirements
1
2
3
4
5
6
from gcix import python

python.PythonScripts.pip_install_requirements(
  pipenv_version_specifier: str = None,
  requirements_file: str = None
)

Generates a shell command to install project requirements using pipenv and pip based on the presence of a Pipfile.lock or requirements.txt.

pipenv_version_specifierOptional
  • Type: str
  • Default: ""

The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to an empty string, indicating installation of the latest version.


requirements_fileOptional
  • Type: str
  • Default: "requirements.txt"

The location and name of the requirements file.


PythonTestEvaluateGitTagPep440Conformity

Checks if the current pipelines $CI_COMMIT_TAG validates to a valid Python package version according to https://www.python.org/dev/peps/pep-0440.

This job already contains a rule to only run when a $CI_COMMIT_TAG is present (rules.only_tags()).

Runs pytest and installs project requirements before PythonScripts.pipInstallRequirements

  • Requires a requirements.txt in your project folder containing at least pytest

This subclass of Job will configure following defaults for the superclass:

  • name: tag-pep440-conformity
  • stage: test
  • image: PredefinedImages.GCIP
  • rules: on_tagsg

Initializers

1
2
3
4
5
6
from gcix import python

python.PythonTestEvaluateGitTagPep440Conformity(
  job_name: str = None,
  job_stage: str = None
)
Name Type Description
job_name str The name of the Bootstrap job.
job_stage str The stage of the Bootstrap job.

job_nameOptional
  • Type: str

The name of the Bootstrap job.


job_stageOptional
  • Type: str

The stage of the Bootstrap job.


Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

PythonTestPytest

Runs pytest and installs project requirements before PythonScripts.pipInstallRequirements.

  • Requires a Pipfile.lock or requirements.txt in your project folder containing at least pytest

This subclass of Job will configure following defaults for the superclass:

  • name: pytest
  • stage: test

Initializers

1
2
3
4
5
6
7
8
from gcix import python

python.PythonTestPytest(
  job_name: str = None,
  job_stage: str = None,
  pipenv_version_specifier: str = None,
  pytest_command: str = None
)
Name Type Description
job_name str The name of the Bootstrap job.
job_stage str The stage of the Bootstrap job.
pipenv_version_specifier str The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.
pytest_command str This argument is only required if you have a custom command to call pytest.

job_nameOptional
  • Type: str

The name of the Bootstrap job.


job_stageOptional
  • Type: str

The stage of the Bootstrap job.


pipenv_version_specifierOptional
  • Type: str

The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.


pytest_commandOptional
  • Type: str

This argument is only required if you have a custom command to call pytest.


Methods

Name Description
add_dependencies No description.
add_needs No description.
add_parent This method is called by gcix.JobCollections when the job is added to that JobCollection.
add_tags No description.
add_variables No description.
append_rules No description.
append_scripts No description.
assign_allow_failure No description.
assign_artifacts No description.
assign_cache No description.
assign_dependencies No description.
assign_image Sets the image of this job.
assign_needs No description.
assign_tags No description.
copy Returns an independent, deep copy object of this job.
extend_name This method is used by gcix.JobCollections to populate the jobs name.
extend_stage This method is used by gcix.JobCollections to populate the jobs name and stage.
extend_stage_value This method is used by gcix.JobCollections to populate the jobs stage.
get_all_instance_names Return all instance names from the given child.
is_equal isEqual checks if this object is equal to given object.
prepend_rules No description.
prepend_scripts No description.
render Returns a representation of any object which implements IBase.

add_dependencies
1
2
3
def add_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_needs
1
2
3
def add_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

add_parent
1
2
3
def add_parent(
  parent: typing.Union[Job, JobCollection]
) -> None

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

add_tags
1
2
3
def add_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

add_variables
1
2
3
def add_variables(
  variables: typing.Mapping[str]
) -> Job
variablesRequired
  • Type: typing.Mapping[str]

append_rules
1
2
3
def append_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

append_scripts
1
2
3
def append_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

assign_allow_failure
1
2
3
def assign_allow_failure(
  allow_failure: typing.Union[bool, typing.List[typing.Union[int, float]]]
) -> Job
allow_failureRequired
  • Type: typing.Union[bool, typing.List[typing.Union[int, float]]]

assign_artifacts
1
2
3
def assign_artifacts(
  artifacts: Artifacts
) -> Job
artifactsRequired
  • Type: gcix.Artifacts

assign_cache
1
2
3
def assign_cache(
  cache: Cache
) -> Job
cacheRequired
  • Type: gcix.Cache

assign_dependencies
1
2
3
def assign_dependencies(
  dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
dependenciesRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_image
1
2
3
def assign_image(
  image: typing.Union[str, Image]
) -> Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: typing.Union[str, gcix.Image]

assign_needs
1
2
3
def assign_needs(
  needs: typing.List[typing.Union[Job, JobCollection, Need]]
) -> Job
needsRequired
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

assign_tags
1
2
3
def assign_tags(
  tags: typing.List[str]
) -> Job
tagsRequired
  • Type: typing.List[str]

copy
def copy() -> Job

Returns an independent, deep copy object of this job.

extend_name
1
2
3
def extend_name(
  name: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: str

extend_stage
1
2
3
def extend_stage(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: str

extend_stage_value
1
2
3
def extend_stage_value(
  stage: str
) -> None

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: str

get_all_instance_names
1
2
3
def get_all_instance_names(
  child: typing.Union[Job, JobCollection] = None
) -> OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: typing.Union[gcix.Job, gcix.JobCollection]

is_equal
1
2
3
def is_equal(
  comparable: IBase
) -> bool

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: gcix.IBase

prepend_rules
1
2
3
def prepend_rules(
  rules: typing.List[Rule]
) -> Job
rulesRequired
  • Type: typing.List[gcix.Rule]

prepend_scripts
1
2
3
def prepend_scripts(
  scripts: typing.List[str]
) -> Job
scriptsRequired
  • Type: typing.List[str]

render
def render() -> typing.Any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags typing.List[str] Getter method to receive added tags.
allow_failure typing.Union[str, bool, typing.List[typing.Union[int, float]]] No description.
name str No description.
ordered_tags gcix.OrderedStringSet No description.
parents typing.List[typing.Union[gcix.Job, gcix.JobCollection]] No description.
scripts typing.List[str] No description.
stage str No description.
artifacts gcix.Artifacts No description.
cache gcix.Cache No description.
dependencies typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
image gcix.Image No description.
needs typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]] No description.
original gcix.Job No description.
rules typing.List[gcix.Rule] No description.
variables typing.Mapping[str] No description.
pipenv_version_specifier str The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.
pytest_command str This argument is only required if you have a custom command to call pytest.

tagsRequired
tags: typing.List[str]
  • Type: typing.List[str]

Getter method to receive added tags.


allow_failureRequired
allow_failure: typing.Union[str, bool, typing.List[typing.Union[int, float]]]
  • Type: typing.Union[str, bool, typing.List[typing.Union[int, float]]]

nameRequired
name: str
  • Type: str

ordered_tagsRequired
ordered_tags: OrderedStringSet
  • Type: gcix.OrderedStringSet

parentsRequired
parents: typing.List[typing.Union[Job, JobCollection]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection]]

scriptsRequired
scripts: typing.List[str]
  • Type: typing.List[str]

stageRequired
stage: str
  • Type: str

artifactsOptional
artifacts: Artifacts
  • Type: gcix.Artifacts

cacheOptional
cache: Cache
  • Type: gcix.Cache

dependenciesOptional
dependencies: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

imageOptional
image: Image
  • Type: gcix.Image

needsOptional
needs: typing.List[typing.Union[Job, JobCollection, Need]]
  • Type: typing.List[typing.Union[gcix.Job, gcix.JobCollection, gcix.Need]]

originalOptional
original: Job
  • Type: gcix.Job

rulesOptional
rules: typing.List[Rule]
  • Type: typing.List[gcix.Rule]

variablesOptional
variables: typing.Mapping[str]
  • Type: typing.Mapping[str]

pipenv_version_specifierRequired
pipenv_version_specifier: str
  • Type: str

The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.


pytest_commandRequired
pytest_command: str
  • Type: str

This argument is only required if you have a custom command to call pytest.


Protocols

IPagesPdoc3

Properties

Name Type Description
module str The Python module name.
output_path str A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

moduleRequired
module: str
  • Type: str

The Python module name.

This may be an import path resolvable in the current environment, or a file path to a Python module or package.


output_pathRequired
output_path: str
  • Type: str

A sub path of the Gitlab Pages public directory to output generated HTML/markdown files to.

Defaults to "/".


IPagesSphinx

Properties

Name Type Description
pip PipInstallRequirementsProps No description.

pipOptional
pip: PipInstallRequirementsProps

IPythonBuildBdistWheel

Properties

Name Type Description
pipenv_version_specifier str No description.
requirements_file str No description.

pipenv_version_specifierOptional
pipenv_version_specifier: str
  • Type: str

requirements_fileOptional
requirements_file: str
  • Type: str

IPythonDeployTwineUpload

Properties

Name Type Description
twine_password_env_var str The name of the environment variable containing the password.
twine_username_env_var str The name of the environment variable containing the username value.
twine_repository_url str The URL to the PyPI repository to which the Python artifacts will be deployed.

twine_password_env_varRequired
twine_password_env_var: str
  • Type: str

The name of the environment variable containing the password.

DO NOT PROVIDE THE LOGIN VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_PASSWORD'.


twine_username_env_varRequired
twine_username_env_var: str
  • Type: str

The name of the environment variable containing the username value.

DO NOT PROVIDE THE USERNAME VALUE ITSELF! This would be a security issue! Defaults to 'TWINE_USERNAME'.


twine_repository_urlOptional
twine_repository_url: str
  • Type: str

The URL to the PyPI repository to which the Python artifacts will be deployed.

If undefined the package is published to https://pypi.org.


IPythonFullStack

Properties

Name Type Description
b_dist_wheel_job PythonBuildBdistWheel No description.
evaluate_git_tag_pep440_conformity_job PythonTestEvaluateGitTagPep440Conformity No description.
flake8_job PythonLintFlake8 No description.
isort_job PythonLintIsort No description.
pytest_job PythonTestPytest No description.
twine_prod_job PythonDeployTwineUpload No description.
mypy_job PythonLintMyPy No description.
sphinx_job PagesSphinx No description.
twine_dev_job PythonDeployTwineUpload No description.

b_dist_wheel_jobRequired
b_dist_wheel_job: PythonBuildBdistWheel

evaluate_git_tag_pep440_conformity_jobRequired
evaluate_git_tag_pep440_conformity_job: PythonTestEvaluateGitTagPep440Conformity

flake8_jobRequired
flake8_job: PythonLintFlake8

isort_jobRequired
isort_job: PythonLintIsort

pytest_jobRequired
pytest_job: PythonTestPytest

twine_prod_jobRequired
twine_prod_job: PythonDeployTwineUpload

mypy_jobOptional
mypy_job: PythonLintMyPy

sphinx_jobOptional
sphinx_job: PagesSphinx

twine_dev_jobOptional
twine_dev_job: PythonDeployTwineUpload

IPythonLintFlake8

IPythonLintIsort

IPythonLintMyPy

Properties

Name Type Description
package_dir str Package directory to type check.
my_py_options str Adds arguments to mypy execution.
my_py_version str If mypy is not already installed, this version will be installed.

package_dirRequired
package_dir: str
  • Type: str

Package directory to type check.


my_py_optionsOptional
my_py_options: str
  • Type: str

Adds arguments to mypy execution.


my_py_versionOptional
my_py_version: str
  • Type: str

If mypy is not already installed, this version will be installed.

Installs latest version if undefined.


IPythonTestEvaluateGitTagPep440Conformity

IPythonTestPytest

Properties

Name Type Description
pipenv_version_specifier str The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.
pytest_command str This argument is only required if you have a custom command to call pytest.

pipenv_version_specifierRequired
pipenv_version_specifier: str
  • Type: str

The version hint of pipenv to install if Pipfile.lock is found. For example '==2022.08.15'. Defaults to latest package version.


pytest_commandRequired
pytest_command: str
  • Type: str

This argument is only required if you have a custom command to call pytest.