Skip to content

Spec

ProjectParams

Bases: SpecParams

Parameters model for project.

Source code in digitalhub_core/entities/projects/spec.py
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class ProjectParams(SpecParams):
    """
    Parameters model for project.
    """

    context: str = None
    """The project's context."""

    functions: list = None
    """List of project's functions."""

    artifacts: list = None
    """List of project's artifacts."""

    workflows: list = None
    """List of project's workflows."""

artifacts: list = None class-attribute instance-attribute

List of project's artifacts.

context: str = None class-attribute instance-attribute

The project's context.

functions: list = None class-attribute instance-attribute

List of project's functions.

workflows: list = None class-attribute instance-attribute

List of project's workflows.

ProjectSpec

Bases: Spec

Project specification.

Source code in digitalhub_core/entities/projects/spec.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class ProjectSpec(Spec):
    """
    Project specification.
    """

    def __init__(
        self,
        context: str | None = None,
        functions: list | None = None,
        artifacts: list | None = None,
        workflows: list | None = None,
        **kwargs,
    ) -> None:
        """
        Initializes a new instance of the ProjectSpec class.

        Parameters
        ----------
        context : str
            The project's context folder.
        functions : list
            List of project's functions.
        artifacts : list
            List of project's artifacts.
        workflows : list
            List of project's workflows.
        """
        self.context = context if context is not None else "./"
        self.functions = functions if functions is not None else []
        self.artifacts = artifacts if artifacts is not None else []
        self.workflows = workflows if workflows is not None else []

__init__(context=None, functions=None, artifacts=None, workflows=None, **kwargs)

Initializes a new instance of the ProjectSpec class.

Parameters:

Name Type Description Default
context str

The project's context folder.

None
functions list

List of project's functions.

None
artifacts list

List of project's artifacts.

None
workflows list

List of project's workflows.

None
Source code in digitalhub_core/entities/projects/spec.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def __init__(
    self,
    context: str | None = None,
    functions: list | None = None,
    artifacts: list | None = None,
    workflows: list | None = None,
    **kwargs,
) -> None:
    """
    Initializes a new instance of the ProjectSpec class.

    Parameters
    ----------
    context : str
        The project's context folder.
    functions : list
        List of project's functions.
    artifacts : list
        List of project's artifacts.
    workflows : list
        List of project's workflows.
    """
    self.context = context if context is not None else "./"
    self.functions = functions if functions is not None else []
    self.artifacts = artifacts if artifacts is not None else []
    self.workflows = workflows if workflows is not None else []