• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vantage6 / vantage6 / 26948030571

04 Jun 2026 11:08AM UTC coverage: 62.816% (-3.5%) from 66.301%
26948030571

push

github

web-flow
Merge pull request #2571 from vantage6/release/5.0

Release/5.0

1216 of 2107 new or added lines in 45 files covered. (57.71%)

15 existing lines in 5 files now uncovered.

1642 of 2614 relevant lines covered (62.82%)

0.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/vantage6/vantage6/cli/context/algorithm_store.py
1
from __future__ import annotations
1✔
2

3
from vantage6.common.globals import InstanceType
1✔
4

5
from vantage6.cli import __version__
1✔
6
from vantage6.cli.configuration_manager import AlgorithmStoreConfigurationManager
1✔
7
from vantage6.cli.context.base_backend import BaseBackendContext
1✔
8
from vantage6.cli.globals import (
1✔
9
    DEFAULT_API_SERVICE_SYSTEM_FOLDERS as S_FOL,
10
    BackendType,
11
)
12

13

14
class AlgorithmStoreContext(BaseBackendContext):
1✔
15
    """
16
    A context class for the algorithm store.
17

18
    Parameters
19
    ----------
20
    instance_name : str
21
        Name of the configuration instance, corresponds to the filename
22
        of the configuration file.
23
    system_folders : bool, optional
24
        System wide or user configuration, by default S_FOL
25
    """
26

27
    INST_CONFIG_MANAGER = AlgorithmStoreConfigurationManager
1✔
28

29
    def __init__(
1✔
30
        self, instance_name: str, system_folders: bool = S_FOL, is_sandbox: bool = False
31
    ):
UNCOV
32
        super().__init__(
×
33
            InstanceType.ALGORITHM_STORE,
34
            instance_name,
35
            system_folders=system_folders,
36
            is_sandbox=is_sandbox,
37
        )
38
        self.log.info("vantage6 version '%s'", __version__)
×
39

40
    def get_database_uri(self) -> str:
1✔
41
        """
42
        Obtain the database uri from the environment or the configuration.
43

44
        Returns
45
        -------
46
        str
47
            string representation of the database uri
48
        """
NEW
49
        return super().get_database_uri()
×
50

51
    @classmethod
1✔
52
    def from_external_config_file(
1✔
53
        cls, path: str, system_folders: bool = S_FOL, in_container: bool = False
54
    ) -> AlgorithmStoreContext:
55
        """
56
        Create a store context from an external configuration file. External
57
        means that the configuration file is not located in the default folders
58
        but its location is specified by the user.
59

60
        Parameters
61
        ----------
62
        path : str
63
            Path of the configuration file
64
        system_folders : bool, optional
65
            System wide or user configuration, by default S_FOL
66
        in_container : bool, optional
67
            Whether the application is running inside a container, by default False
68

69
        Returns
70
        -------
71
        AlgorithmStoreContext
72
            Store context object
73
        """
74
        return super().from_external_config_file(
×
75
            path,
76
            BackendType.ALGORITHM_STORE,
77
            system_folders,
78
            in_container,
79
        )
80

81
    @classmethod
1✔
82
    def config_exists(
1✔
83
        cls, instance_name: str, system_folders: bool = S_FOL, is_sandbox: bool = False
84
    ) -> bool:
85
        """
86
        Check if a configuration file exists.
87

88
        Parameters
89
        ----------
90
        instance_name : str
91
            Name of the configuration instance, corresponds to the filename
92
            of the configuration file.
93
        system_folders : bool, optional
94
            System wide or user configuration, by default S_FOL
95
        is_sandbox : bool, optional
96
            Whether the configuration is a sandbox configuration, by default False
97
        Returns
98
        -------
99
        bool
100
            Whether the configuration file exists or not
101
        """
NEW
102
        return super().base_config_exists(
×
103
            InstanceType.ALGORITHM_STORE, instance_name, system_folders, is_sandbox
104
        )
105

106
    @classmethod
1✔
107
    def available_configurations(
1✔
108
        cls, system_folders: bool = S_FOL, is_sandbox: bool = False
109
    ) -> tuple[list, list]:
110
        """
111
        Find all available store configurations in the default folders.
112

113
        Parameters
114
        ----------
115
        system_folders : bool, optional
116
            System wide or user configuration, by default S_FOL
117

118
        Returns
119
        -------
120
        tuple[list, list]
121
            The first list contains validated configuration files, the second
122
            list contains invalid configuration files.
123
        """
124
        return super().available_configurations(
×
125
            InstanceType.ALGORITHM_STORE, system_folders, is_sandbox
126
        )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc