Skip to content

Phases

Phase

Represent a Vectice phase.

Phases reflect the real-life phases of the project lifecycle (i.e., Business Understanding, Data Preparation, Modeling, Deployment, etc.).

Phases let you document the goals, assets, and outcomes along with the status to organize the project, enforce best practices, allow consistency, and capture knowledge.

To get a project's phase:

phase = project.phase("Business Understanding")

Iterations can then be created for this phase.

my_origin_dataset = ...
iteration = phase.create_iteration()
iteration.log(my_origin_dataset)

Phases are created in the Vectice App, iterations are created from the Vectice python API.

See the documentation of Iterations for more information about iterations.

connection property

connection

The connection to which this phase belongs.

Returns:

Type Description
Connection

The connection to which this phase belongs.

id property writable

id

The phase's id.

Returns:

Type Description
str

The phase's id.

index property

index

The phase's index.

Returns:

Type Description
int

The phase's index.

name property

name

The phase's name.

Returns:

Type Description
str

The phase's name.

project property

project

The project to which this phase belongs.

Returns:

Type Description
Project

The project to which this phase belongs.

properties property

properties

The phase's name, id, and index.

Returns:

Type Description
dict[str, str | int]

A dictionary containing the name, id, and index items.

status property

status

The phase's status.

Returns:

Type Description
PhaseStatus

The phase's status.

workspace property

workspace

The workspace to which this phase belongs.

Returns:

Type Description
Workspace

The workspace to which this phase belongs.

create_iteration

create_iteration(name=None, description=None)

Create a new iteration.

Create and return an iteration.

Parameters:

Name Type Description Default
name str | None

The iteration's name, default being its index.

None
description str | None

The iteration's description.

None

Returns:

Type Description
Iteration

An iteration.

create_or_get_current_iteration

create_or_get_current_iteration()

Get or create an iteration.

If your last updated iteration is writable (Not Started or In Progress), Vectice will return it. Otherwise, Vectice will create a new one and return it. If multiple writable iterations are found, Vectice will print a list of the iterations to complete or cancel.

Returns:

Type Description
Iteration | None

An iteration or None if Vectice could not determine which iteration to retrieve.

iteration

iteration(index)

Get an iteration.

Fetch and return an iteration by index or id.

Parameters:

Name Type Description Default
index int | str

The index or id of an existing iteration.

required

Returns:

Type Description
Iteration

An iteration.

Raises:

Type Description
InvalidIdError

When index is a string and not matching 'ITR-[int]'

IterationIdError

Iteration with specified id does not exist.

IterationIndexError

Iteration with specified index does not exist.

list_iterations

list_iterations(
    only_mine=False,
    statuses=None,
    number_of_items=DEFAULT_NUMBER_OF_ITEMS,
    display_print=True,
)

Retrieves a list of iterations belonging to the phase. It will also print the first 10 iterations as a tabular form. A link is provided to view the remaining iterations

Parameters:

Name Type Description Default
only_mine bool

Display only the iterations where the user is the owner.

False
statuses list[IterationStatus] | None

Filter iterations on specified statuses.

None
number_of_items int

The number of iterations to retrieve. Defaults to 30.

DEFAULT_NUMBER_OF_ITEMS
display_print bool

If set to True, it will print the first 10 iterations in a tabular form.

True

Returns:

Type Description
list[Iteration]

A list of Iteration instances corresponding to the current phase.

list_requirements

list_requirements(display_print=True)

List the requirements of the phase as a dictionnary.

Parameters:

Name Type Description Default
display_print bool

If set to True, it will print the first 10 iterations in a tabular form.

True

Returns:

Type Description
list[Dict[str, str]]

A list of Dictionnaries following the format {"requirement_name": "requirement_description"} with all the phase's requirements.

list_reviews

list_reviews(number_of_items=DEFAULT_NUMBER_OF_ITEMS)

List the reviews of the phase.

Parameters:

Name Type Description Default
number_of_items int

The number of reviews to retrieve. Defaults to 30.

DEFAULT_NUMBER_OF_ITEMS

Returns:

Type Description
list[ReviewRepresentation]

A list of ReviewRepresentation.