cognite-toolkit 0.7.11__py3-none-any.whl → 0.7.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cognite_toolkit/_cdf.py CHANGED
@@ -36,6 +36,7 @@ from cognite_toolkit._cdf_tk.apps import (
36
36
  )
37
37
  from cognite_toolkit._cdf_tk.cdf_toml import CDFToml
38
38
  from cognite_toolkit._cdf_tk.commands import (
39
+ AboutCommand,
39
40
  CollectCommand,
40
41
  )
41
42
  from cognite_toolkit._cdf_tk.constants import HINT_LEAD_TEXT, URL, USE_SENTRY
@@ -115,6 +116,13 @@ _app.add_typer(ModulesApp(**default_typer_kws), name="modules")
115
116
  _app.command("init")(landing_app.main_init)
116
117
 
117
118
 
119
+ @_app.command("about")
120
+ def about() -> None:
121
+ """Display information about the Toolkit installation and configuration."""
122
+ cmd = AboutCommand()
123
+ cmd.run(lambda: cmd.execute(Path.cwd()))
124
+
125
+
118
126
  def app() -> NoReturn:
119
127
  # --- Main entry point ---
120
128
  # Users run 'app()' directly, but that doesn't allow us to control excepton handling:
@@ -6,13 +6,13 @@ from ._migrate import (
6
6
  from ._profile import ProfileAssetCentricCommand, ProfileAssetCommand, ProfileRawCommand, ProfileTransformationCommand
7
7
  from ._purge import PurgeCommand
8
8
  from ._upload import UploadCommand
9
+ from .about import AboutCommand
9
10
  from .auth import AuthCommand
10
11
  from .build_cmd import BuildCommand
11
12
  from .clean import CleanCommand
12
13
  from .collect import CollectCommand
13
14
  from .deploy import DeployCommand
14
15
  from .dump_resource import DumpResourceCommand
15
- from .featureflag import FeatureFlagCommand
16
16
  from .init import InitCommand
17
17
  from .modules import ModulesCommand
18
18
  from .pull import PullCommand
@@ -21,6 +21,7 @@ from .resources import ResourcesCommand
21
21
  from .run import RunFunctionCommand, RunTransformationCommand, RunWorkflowCommand
22
22
 
23
23
  __all__ = [
24
+ "AboutCommand",
24
25
  "AuthCommand",
25
26
  "BuildCommand",
26
27
  "CleanCommand",
@@ -28,7 +29,6 @@ __all__ = [
28
29
  "DeployCommand",
29
30
  "DownloadCommand",
30
31
  "DumpResourceCommand",
31
- "FeatureFlagCommand",
32
32
  "InitCommand",
33
33
  "MigrationCanvasCommand",
34
34
  "MigrationPrepareCommand",
@@ -0,0 +1,221 @@
1
+ import platform
2
+ import sys
3
+ from pathlib import Path
4
+
5
+ from rich import print
6
+ from rich.table import Table
7
+
8
+ from cognite_toolkit._cdf_tk.cdf_toml import CDFToml, _read_toml
9
+ from cognite_toolkit._cdf_tk.commands._base import ToolkitCommand
10
+ from cognite_toolkit._cdf_tk.constants import clean_name
11
+ from cognite_toolkit._cdf_tk.feature_flags import Flags
12
+ from cognite_toolkit._cdf_tk.plugins import Plugins
13
+ from cognite_toolkit._cdf_tk.tk_warnings import LowSeverityWarning, MediumSeverityWarning
14
+ from cognite_toolkit._version import __version__
15
+
16
+
17
+ class AboutCommand(ToolkitCommand):
18
+ def execute(self, cwd: Path) -> None:
19
+ # Version information
20
+ print(f"\n[bold cyan]Cognite Toolkit[/bold cyan] version: [yellow]{__version__}[/yellow]")
21
+ print(f"Python version: {sys.version.split()[0]}")
22
+ print(f"Platform: {platform.system()} {platform.release()}")
23
+
24
+ # Check for cdf.toml in the current directory
25
+ cdf_toml_path = cwd / CDFToml.file_name
26
+
27
+ if cdf_toml_path.exists():
28
+ print(f"\n[bold green]Configuration file found:[/bold green] {cdf_toml_path}")
29
+
30
+ cdf_toml = CDFToml.load(cwd)
31
+
32
+ # We need to read the raw TOML to get original key names for plugins and alpha flags
33
+ raw_toml = _read_toml(cdf_toml_path)
34
+
35
+ self._check_unrecognized_sections(raw_toml)
36
+ self._display_plugins(cdf_toml, raw_toml)
37
+ self._display_alpha_flags(cdf_toml, raw_toml)
38
+ self._display_additional_config(cdf_toml)
39
+
40
+ else:
41
+ # Search for cdf.toml in subdirectories
42
+ found_files = self._search_cdf_toml(cwd)
43
+
44
+ if found_files:
45
+ print(f"\n[bold yellow]No cdf.toml found in current directory:[/bold yellow] {cwd}")
46
+ print("\n[bold]Found cdf.toml files in subdirectories:[/bold]")
47
+ for file in found_files:
48
+ rel_path = file.relative_to(cwd)
49
+ print(f" • {rel_path}")
50
+ print(f"\n[bold cyan]Hint:[/bold cyan] Move one of these files to {cwd} or navigate to its directory.")
51
+ else:
52
+ print("\n[bold yellow]No cdf.toml found[/bold yellow] in current directory or subdirectories.")
53
+ print(f"Current directory: {cwd}")
54
+ print("\n[bold cyan]Hint:[/bold cyan] Run [yellow]cdf init[/yellow] to create a new project.")
55
+
56
+ def _check_unrecognized_sections(self, raw_toml: dict) -> None:
57
+ """Check for unrecognized tables in cdf.toml and warn about them."""
58
+ # Valid top-level tables in cdf.toml
59
+ valid_tables = {"cdf", "modules", "alpha_flags", "feature_flags", "plugins", "library"}
60
+
61
+ # Filter out empty keys, whitespace-only keys, and check for unrecognized tables
62
+ unrecognized_tables = [key for key in raw_toml.keys() if key and key.strip() and key not in valid_tables]
63
+
64
+ if unrecognized_tables:
65
+ print()
66
+
67
+ for table in unrecognized_tables:
68
+ # Try to find a matching valid table by stripping non-alphabetical characters
69
+ suggestion = self._find_similar_table(table, valid_tables)
70
+
71
+ message = f"Table '{table}' in cdf.toml is not recognized and will have no effect."
72
+ if suggestion:
73
+ message += f" Did you mean '{suggestion}'?"
74
+
75
+ self.warn(MediumSeverityWarning(message))
76
+
77
+ @staticmethod
78
+ def _find_similar_table(unrecognized: str, valid_tables: set[str]) -> str | None:
79
+ """Find a similar valid table by comparing alphabetical characters only.
80
+
81
+ Returns None if the unrecognized table is already valid or if no similar match is found.
82
+ """
83
+ # If it's already a valid table, return None (no suggestion needed)
84
+ if unrecognized in valid_tables:
85
+ return None
86
+
87
+ # Keep only alphabetical characters and lowercase
88
+ normalized_unrecognized = "".join(c for c in unrecognized if c.isalpha()).lower()
89
+
90
+ # First, try exact match (after normalization)
91
+ for valid in valid_tables:
92
+ normalized_valid = "".join(c for c in valid if c.isalpha()).lower()
93
+ if normalized_unrecognized == normalized_valid:
94
+ return valid
95
+
96
+ # If no match, check for singular/plural variations (missing 's')
97
+ for valid in valid_tables:
98
+ normalized_valid = "".join(c for c in valid if c.isalpha()).lower()
99
+
100
+ # Check if adding 's' to unrecognized matches valid (e.g., "plugin" -> "plugins")
101
+ if normalized_unrecognized + "s" == normalized_valid:
102
+ return valid
103
+
104
+ return None
105
+
106
+ def _display_plugins(self, cdf_toml: CDFToml, raw_toml: dict) -> None:
107
+ """Display all available plugins and their status."""
108
+ table = Table(title="Plugins", show_header=True)
109
+ table.add_column("Plugin", justify="left", style="cyan")
110
+ table.add_column("Status", justify="center")
111
+ table.add_column("Description", justify="left")
112
+
113
+ # Track which plugins we've seen
114
+ seen_plugins = set()
115
+
116
+ # Show all plugins from the enum
117
+ for plugin in Plugins:
118
+ plugin_name = plugin.value.name
119
+ cleaned_key = clean_name(plugin_name)
120
+ seen_plugins.add(cleaned_key)
121
+
122
+ is_enabled = cdf_toml.plugins.get(cleaned_key, False)
123
+ if is_enabled:
124
+ status = "[green]✓ enabled[/green]"
125
+ else:
126
+ status = "[dim]○ disabled[/dim]"
127
+
128
+ table.add_row(plugin_name, status, plugin.value.description)
129
+
130
+ print()
131
+ print(table)
132
+
133
+ # Show any unrecognized plugins from cdf.toml using original key names
134
+ raw_plugins = raw_toml.get("plugins", {})
135
+ unrecognized = []
136
+ for original_key, value in raw_plugins.items():
137
+ cleaned_key = clean_name(original_key)
138
+ if cleaned_key not in seen_plugins:
139
+ unrecognized.append((original_key, value))
140
+
141
+ for original_key, is_enabled in unrecognized:
142
+ status = "enabled" if is_enabled else "disabled"
143
+ self.warn(
144
+ LowSeverityWarning(f"Plugin '{original_key}' in cdf.toml is not recognized and will have no effect.")
145
+ )
146
+
147
+ def _display_alpha_flags(self, cdf_toml: CDFToml, raw_toml: dict) -> None:
148
+ """Display available alpha flags and their status."""
149
+ table = Table(title="Alpha Flags", show_header=True)
150
+ table.add_column("Flag", justify="left", style="yellow")
151
+ table.add_column("Status", justify="center")
152
+ table.add_column("Description", justify="left")
153
+
154
+ # Track which flags we've seen
155
+ seen_flags = set()
156
+
157
+ # Show flags from the enum that are either enabled or visible
158
+ for flag in Flags:
159
+ cleaned_key = clean_name(flag.name)
160
+ seen_flags.add(cleaned_key)
161
+
162
+ is_enabled = cdf_toml.alpha_flags.get(cleaned_key, False)
163
+
164
+ # Only show if enabled or visible
165
+ if is_enabled or flag.value.visible:
166
+ # Convert enum name to kebab-case for display
167
+ display_name = flag.name.lower().replace("_", "-")
168
+
169
+ if is_enabled:
170
+ status = "[green]✓ enabled[/green]"
171
+ else:
172
+ status = "[dim]○ disabled[/dim]"
173
+
174
+ table.add_row(display_name, status, flag.value.description)
175
+
176
+ print()
177
+ print(table)
178
+
179
+ # Show any unrecognized flags from cdf.toml using original key names
180
+ raw_flags = raw_toml.get("alpha_flags", {})
181
+ unrecognized = []
182
+ for original_key, value in raw_flags.items():
183
+ cleaned_key = clean_name(original_key)
184
+ if cleaned_key not in seen_flags:
185
+ unrecognized.append((original_key, value))
186
+
187
+ for original_key, is_enabled in unrecognized:
188
+ status = "enabled" if is_enabled else "disabled"
189
+ self.warn(
190
+ LowSeverityWarning(
191
+ f"Alpha flag '{original_key}' in cdf.toml is not recognized and will have no effect."
192
+ )
193
+ )
194
+
195
+ def _display_additional_config(self, cdf_toml: CDFToml) -> None:
196
+ """Display additional configuration information."""
197
+ print("\n[bold]Additional Configuration:[/bold]")
198
+
199
+ print(f" Default environment: [cyan]{cdf_toml.cdf.default_env}[/cyan]")
200
+
201
+ if cdf_toml.cdf.has_user_set_default_org:
202
+ print(f" Default organization dir: [cyan]{cdf_toml.cdf.default_organization_dir}[/cyan]")
203
+
204
+ if cdf_toml.cdf.file_encoding:
205
+ print(f" File encoding: [cyan]{cdf_toml.cdf.file_encoding}[/cyan]")
206
+
207
+ print(f" Modules version: [cyan]{cdf_toml.modules.version}[/cyan]")
208
+
209
+ if cdf_toml.libraries:
210
+ print(f" Configured libraries: [cyan]{len(cdf_toml.libraries)}[/cyan]")
211
+ for lib_name, lib_config in cdf_toml.libraries.items():
212
+ print(f" • {lib_name}: [dim]{lib_config.url}[/dim]")
213
+
214
+ def _search_cdf_toml(self, cwd: Path) -> list[Path]:
215
+ """Search for cdf.toml files in immediate subdirectories (one level down)."""
216
+ try:
217
+ return sorted(
218
+ [potential_file for potential_file in cwd.glob(f"*/{CDFToml.file_name}") if potential_file.is_file()]
219
+ )
220
+ except PermissionError:
221
+ return []
@@ -26,6 +26,7 @@ import questionary
26
26
  from cognite.client.data_classes.capabilities import (
27
27
  AssetsAcl,
28
28
  Capability,
29
+ ExtractionConfigsAcl,
29
30
  FunctionsAcl,
30
31
  GroupsAcl,
31
32
  ProjectsAcl,
@@ -46,6 +47,7 @@ from cognite_toolkit._cdf_tk.constants import (
46
47
  TOOLKIT_DEMO_GROUP_NAME,
47
48
  TOOLKIT_SERVICE_PRINCIPAL_GROUP_NAME,
48
49
  )
50
+ from cognite_toolkit._cdf_tk.cruds import ExtractionPipelineConfigCRUD
49
51
  from cognite_toolkit._cdf_tk.exceptions import (
50
52
  AuthenticationError,
51
53
  AuthorizationError,
@@ -434,8 +436,23 @@ class AuthCommand(ToolkitCommand):
434
436
  crud = crud_cls.create_loader(client)
435
437
  if crud.prerequisite_warning() is not None:
436
438
  continue
437
- capability = crud_cls.get_required_capability(None, read_only=False)
438
- capabilities = capability if isinstance(capability, list) else [capability]
439
+ if isinstance(crud, ExtractionPipelineConfigCRUD):
440
+ # The Extraction Pipeline Config CRUD requires special handling.
441
+ # The .get_required_capability is used in the DeployCommand as well. Since, there is no way to no
442
+ # the extraction pipeline ID or dataSetId from an ExtractionPipelineConfigWrite object, we do not
443
+ # check those there. If we returned the full capability, it would always have to be all scoped.
444
+ # That is too restrictive in the deploy command, so we return an empty list, essentially not checking
445
+ # anything there. Here, we want to add the all scoped capability, so that the Toolkit group gets the
446
+ # correct capability.
447
+ capabilities: list[Capability] = [
448
+ ExtractionConfigsAcl(
449
+ [ExtractionConfigsAcl.Action.Read, ExtractionConfigsAcl.Action.Write],
450
+ ExtractionConfigsAcl.Scope.All(),
451
+ )
452
+ ]
453
+ else:
454
+ capability = crud_cls.get_required_capability(None, read_only=False)
455
+ capabilities = capability if isinstance(capability, list) else [capability]
439
456
  for cap in capabilities:
440
457
  if project_type == "DATA_MODELING_ONLY" and isinstance(cap, AssetsAcl | RelationshipsAcl):
441
458
  continue
@@ -22,7 +22,7 @@ class Flags(Enum):
22
22
  description="Enables the import sub application",
23
23
  )
24
24
  GRAPHQL = FlagMetadata(
25
- visible=True,
25
+ visible=False,
26
26
  description="Enables the support for deploying data models as GraphQL schemas",
27
27
  )
28
28
  MODULE_REPEAT = FlagMetadata(
@@ -12,7 +12,7 @@ jobs:
12
12
  environment: dev
13
13
  name: Deploy
14
14
  container:
15
- image: cognite/toolkit:0.7.11
15
+ image: cognite/toolkit:0.7.13
16
16
  env:
17
17
  CDF_CLUSTER: ${{ vars.CDF_CLUSTER }}
18
18
  CDF_PROJECT: ${{ vars.CDF_PROJECT }}
@@ -10,7 +10,7 @@ jobs:
10
10
  environment: dev
11
11
  name: Deploy Dry Run
12
12
  container:
13
- image: cognite/toolkit:0.7.11
13
+ image: cognite/toolkit:0.7.13
14
14
  env:
15
15
  CDF_CLUSTER: ${{ vars.CDF_CLUSTER }}
16
16
  CDF_PROJECT: ${{ vars.CDF_PROJECT }}
@@ -4,7 +4,7 @@ default_env = "<DEFAULT_ENV_PLACEHOLDER>"
4
4
  [modules]
5
5
  # This is the version of the modules. It should not be changed manually.
6
6
  # It will be updated by the 'cdf modules upgrade' command.
7
- version = "0.7.11"
7
+ version = "0.7.13"
8
8
 
9
9
 
10
10
  [plugins]
@@ -1 +1 @@
1
- __version__ = "0.7.11"
1
+ __version__ = "0.7.13"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognite_toolkit
3
- Version: 0.7.11
3
+ Version: 0.7.13
4
4
  Summary: Official Cognite Data Fusion tool for project templates and configuration deployment
5
5
  Project-URL: Homepage, https://docs.cognite.com/cdf/deploy/cdf_toolkit/
6
6
  Project-URL: Changelog, https://github.com/cognitedata/toolkit/releases
@@ -1,11 +1,11 @@
1
1
  cognite_toolkit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- cognite_toolkit/_cdf.py,sha256=PzDig6dgbDX5VL88AeijQuTeYb2SS_yvenw9gr4fnxY,5794
3
- cognite_toolkit/_version.py,sha256=wcKNUm4uZK839U_xaeQFOEaUVqbjHp-EU_6MMaml4qk,23
2
+ cognite_toolkit/_cdf.py,sha256=YoiPOMgf1Mufy7wNYWWSF3bNBTGqKr26Ey5kj38fCXU,6008
3
+ cognite_toolkit/_version.py,sha256=Fe-AlRRBmJTrW5h9qmKZwxlbQxCFmsF1IZ1f-Wcdq64,23
4
4
  cognite_toolkit/_cdf_tk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  cognite_toolkit/_cdf_tk/cdf_toml.py,sha256=VSWV9h44HusWIaKpWgjrOMrc3hDoPTTXBXlp6-NOrIM,9079
6
6
  cognite_toolkit/_cdf_tk/constants.py,sha256=TplKm2J9pGRHq7nAnLI0caTMHetS04OIz3hfq-jvGzo,7236
7
7
  cognite_toolkit/_cdf_tk/exceptions.py,sha256=xG0jMwi5A20nvPvyo6sCyz_cyKycynPyIzpYiGR4gcU,6064
8
- cognite_toolkit/_cdf_tk/feature_flags.py,sha256=h9Vhw-u1OQIjckAe0Ec2qug3Z-FRn_aJGglWu2u2BEc,1906
8
+ cognite_toolkit/_cdf_tk/feature_flags.py,sha256=5JnJc5aRHAZ4-D6ueRNlemNKDW644akRwev0h-6hNXw,1907
9
9
  cognite_toolkit/_cdf_tk/hints.py,sha256=UI1ymi2T5wCcYOpEbKbVaDnlyFReFy8TDtMVt-5E1h8,6493
10
10
  cognite_toolkit/_cdf_tk/plugins.py,sha256=0V14rceAWLZQF8iWdyL5QmK7xB796YaDEtb9RIj5AOc,836
11
11
  cognite_toolkit/_cdf_tk/protocols.py,sha256=Lc8XnBfmDZN6dwmSopmK7cFE9a9jZ2zdUryEeCXn27I,3052
@@ -102,7 +102,7 @@ cognite_toolkit/_cdf_tk/client/data_classes/three_d.py,sha256=X5BCOZC1B_WOcaC2Rb
102
102
  cognite_toolkit/_cdf_tk/client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
103
  cognite_toolkit/_cdf_tk/client/utils/_concurrency.py,sha256=3GtQbKDaosyKHEt-KzxKK9Yie4TvZPdoou2vUk6dUa8,2298
104
104
  cognite_toolkit/_cdf_tk/client/utils/_http_client.py,sha256=oXNKrIaizG4WiSAhL_kSCHAuL4aaaEhCU4pOJGxh6Xs,483
105
- cognite_toolkit/_cdf_tk/commands/__init__.py,sha256=xLaEOLVZ93MVkWzbTGwYhe-negSdBjnPnCBp0jil2d8,1420
105
+ cognite_toolkit/_cdf_tk/commands/__init__.py,sha256=HQIHw18EU09fdo7bxbDXi8-0Lc5t2KE6BpuhNZehpqo,1402
106
106
  cognite_toolkit/_cdf_tk/commands/_base.py,sha256=1gl8Y-yqfedRMfdbwM3iPTIUIZriX1UvC1deLsJSJwM,2667
107
107
  cognite_toolkit/_cdf_tk/commands/_changes.py,sha256=sU0KaTtPVSJgAZcaZ1Tkcajj36pmhd13kh7V8QbIED8,22987
108
108
  cognite_toolkit/_cdf_tk/commands/_cli_commands.py,sha256=TK6U_rm6VZT_V941kTyHMoulWgJzbDC8YIIQDPJ5x3w,1011
@@ -113,13 +113,13 @@ cognite_toolkit/_cdf_tk/commands/_questionary_style.py,sha256=h-w7fZKkGls3TrzIGB
113
113
  cognite_toolkit/_cdf_tk/commands/_upload.py,sha256=jFt4NG2zEcUu8WUCgRQEoYDIs5C70VTVvTKkZ0F5j1A,13534
114
114
  cognite_toolkit/_cdf_tk/commands/_utils.py,sha256=UxMJW5QYKts4om5n6x2Tq2ihvfO9gWjhQKeqZNFTlKg,402
115
115
  cognite_toolkit/_cdf_tk/commands/_virtual_env.py,sha256=GFAid4hplixmj9_HkcXqU5yCLj-fTXm4cloGD6U2swY,2180
116
- cognite_toolkit/_cdf_tk/commands/auth.py,sha256=TD6X3CKFNhDHoIv2b2uI2nKBHgQljLntp9vZffdA-jc,31384
116
+ cognite_toolkit/_cdf_tk/commands/about.py,sha256=pEXNdCeJYONOalH8x-7QRsKLgj-9gdIqN16pPxA3bhg,9395
117
+ cognite_toolkit/_cdf_tk/commands/auth.py,sha256=TX_8YuVCjMVIQjEdfBE66bSDrojJhCnxf_jcT3-9wM8,32550
117
118
  cognite_toolkit/_cdf_tk/commands/build_cmd.py,sha256=6m-lK0vccje1gaQ_fd68UvA4CbhuBszDapnHwu4VU_U,30897
118
119
  cognite_toolkit/_cdf_tk/commands/clean.py,sha256=JNPIjNSiOJaP-cUhFzT8H3s30luA9lI39yH18QxHaYM,16603
119
120
  cognite_toolkit/_cdf_tk/commands/collect.py,sha256=zBMKhhvjOpuASMnwP0eeHRI02tANcvFEZgv0CQO1ECc,627
120
121
  cognite_toolkit/_cdf_tk/commands/deploy.py,sha256=DpA6q0f17qCpsrYUywavvaRjJ-qaIm78ukw8kIfCNbg,23262
121
122
  cognite_toolkit/_cdf_tk/commands/dump_resource.py,sha256=C9lqBT3MKgFyrcjS-4_6xXEOVBk8uJf65I4S30faXyE,39786
122
- cognite_toolkit/_cdf_tk/commands/featureflag.py,sha256=lgLMwuNIwFjvvKn1sNMunkq4VTwdNqXtrZfdGFTrNcI,968
123
123
  cognite_toolkit/_cdf_tk/commands/init.py,sha256=pcxFhZheXm3FPU1pkeh10M0WXPg7EcLFUgJlrE817tE,9257
124
124
  cognite_toolkit/_cdf_tk/commands/modules.py,sha256=91Fov16fEIVk-3ZmBd3MlibbbzRuYLjUY9CUnudV4w0,40976
125
125
  cognite_toolkit/_cdf_tk/commands/pull.py,sha256=3dU-jQj40laL1eURukMwvr1clJz5MZ1ppz0aatGBgso,38944
@@ -303,13 +303,13 @@ cognite_toolkit/_repo_files/.gitignore,sha256=ip9kf9tcC5OguF4YF4JFEApnKYw0nG0vPi
303
303
  cognite_toolkit/_repo_files/AzureDevOps/.devops/README.md,sha256=OLA0D7yCX2tACpzvkA0IfkgQ4_swSd-OlJ1tYcTBpsA,240
304
304
  cognite_toolkit/_repo_files/AzureDevOps/.devops/deploy-pipeline.yml,sha256=brULcs8joAeBC_w_aoWjDDUHs3JheLMIR9ajPUK96nc,693
305
305
  cognite_toolkit/_repo_files/AzureDevOps/.devops/dry-run-pipeline.yml,sha256=OBFDhFWK1mlT4Dc6mDUE2Es834l8sAlYG50-5RxRtHk,723
306
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=mpx6YFBvI4pcHFunI3NNW6aOA-jmJMSQyxptev0R-jw,667
307
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=CZvp6XBuvkqVs2Q87XD5xuRdVc8BlColbo8mP-fiuD4,2430
308
- cognite_toolkit/_resources/cdf.toml,sha256=i9P-3gDGeUA8gSpwz_ZxtB_Lj1uJUmZKbyOWNb8P2_4,475
306
+ cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml,sha256=oy7jCmKfX07v-uif4AfeJ9Xct6_6WUfKuQiv7QEUh7Q,667
307
+ cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml,sha256=HWFe0EhESAuTGZ-dJUcufHPyL7iO2WIm45574MAny8M,2430
308
+ cognite_toolkit/_resources/cdf.toml,sha256=-3NgSkbtxigp-meTTWZnpYJeYqE6B8pce3H1pMw6oUA,475
309
309
  cognite_toolkit/demo/__init__.py,sha256=-m1JoUiwRhNCL18eJ6t7fZOL7RPfowhCuqhYFtLgrss,72
310
310
  cognite_toolkit/demo/_base.py,sha256=6xKBUQpXZXGQ3fJ5f7nj7oT0s2n7OTAGIa17ZlKHZ5U,8052
311
- cognite_toolkit-0.7.11.dist-info/METADATA,sha256=ZYoAB36exzGiBlVpxKPMXIdtCaAp4gjrR2amqxpFYuw,4501
312
- cognite_toolkit-0.7.11.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
313
- cognite_toolkit-0.7.11.dist-info/entry_points.txt,sha256=JlR7MH1_UMogC3QOyN4-1l36VbrCX9xUdQoHGkuJ6-4,83
314
- cognite_toolkit-0.7.11.dist-info/licenses/LICENSE,sha256=CW0DRcx5tL-pCxLEN7ts2S9g2sLRAsWgHVEX4SN9_Mc,752
315
- cognite_toolkit-0.7.11.dist-info/RECORD,,
311
+ cognite_toolkit-0.7.13.dist-info/METADATA,sha256=7zXrYmZNZ5RIDiCYqKEwZIscVF151ZrnjDg_1EojJs0,4501
312
+ cognite_toolkit-0.7.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
313
+ cognite_toolkit-0.7.13.dist-info/entry_points.txt,sha256=JlR7MH1_UMogC3QOyN4-1l36VbrCX9xUdQoHGkuJ6-4,83
314
+ cognite_toolkit-0.7.13.dist-info/licenses/LICENSE,sha256=CW0DRcx5tL-pCxLEN7ts2S9g2sLRAsWgHVEX4SN9_Mc,752
315
+ cognite_toolkit-0.7.13.dist-info/RECORD,,
@@ -1,27 +0,0 @@
1
- from rich import print
2
- from rich.table import Table
3
-
4
- from cognite_toolkit._cdf_tk.cdf_toml import CDFToml
5
- from cognite_toolkit._cdf_tk.commands._base import ToolkitCommand
6
- from cognite_toolkit._cdf_tk.feature_flags import Flags
7
-
8
-
9
- class FeatureFlagCommand(ToolkitCommand):
10
- @staticmethod
11
- def list() -> None:
12
- user_settings = CDFToml.load().alpha_flags
13
- table = Table(title="feature flags")
14
- table.add_column("Name", justify="left")
15
- table.add_column("Description", justify="left")
16
- table.add_column("Status", justify="left")
17
-
18
- for flag in Flags:
19
- is_enabled = user_settings.get(flag.name, False)
20
- if is_enabled or flag.value.visible:
21
- table.add_row(
22
- flag.name,
23
- flag.value.description,
24
- "enabled" if is_enabled else "disabled",
25
- style="yellow" if is_enabled else "",
26
- )
27
- print(table)