splight-cli 4.10.0__tar.gz → 4.11.1__tar.gz
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.
- {splight_cli-4.10.0 → splight_cli-4.11.1}/PKG-INFO +13 -9
- {splight_cli-4.10.0 → splight_cli-4.11.1}/README.md +11 -8
- {splight_cli-4.10.0 → splight_cli-4.11.1}/pyproject.toml +2 -2
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/hub/component/hub_manager.py +2 -1
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/hub/component/tests/test_hub_manager.py +5 -1
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/cli.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/component.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/exceptions.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/loaders.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/templates/.splightignore +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/templates/Initialization +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/templates/README.md +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/templates/auto_readme.md +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/templates/main.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/templates/spec.json +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/templates/tests.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/tests/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/tests/test_component_manager.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/utils.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/config/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/constants.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/context/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/context/context.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/context/workspace.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/alert/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/asset/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/attribute/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/component/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/datalake/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/file/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/manager/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/manager/exceptions.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/manager/manager.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/manager/tests/test_datalake_manager.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/manager/tests/test_resource_manager.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/secret/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/hub/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/hub/component/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/hub/component/exceptions.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/settings.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/dict.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/parser.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/diff.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/logger.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/manager.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/alert.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/asset.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/attribute.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/base.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/component.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/component_object.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/file.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/function.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/metadata.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/routine.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/secret.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/state.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/tests/test_component/Initialization +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/tests/test_component/README.md +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/tests/test_component/main.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/tests/test_component/spec.json +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/tests/test_component/tests.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/utils/__init__.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/utils/input.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/utils/json.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/utils/loader.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/utils/pprint.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/utils/template.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/utils/yaml.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/version.py +0 -0
- {splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/workspace/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: splight-cli
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.11.1
|
|
4
4
|
Summary: Splight Command Line Interface
|
|
5
5
|
Author: Splight Dev
|
|
6
6
|
Author-email: dev@splight-ae.com
|
|
@@ -21,16 +21,13 @@ Requires-Dist: py7zr (==0.20.8)
|
|
|
21
21
|
Requires-Dist: requests (==2.31.0)
|
|
22
22
|
Requires-Dist: rich (==13.0.1)
|
|
23
23
|
Requires-Dist: setuptools (==60.9.3)
|
|
24
|
-
Requires-Dist: splight-lib (>=5.
|
|
24
|
+
Requires-Dist: splight-lib (>=5.4.1,<6.0.0)
|
|
25
25
|
Requires-Dist: toposort (>=1.10,<2.0)
|
|
26
26
|
Requires-Dist: typer (==0.9.0)
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
|
|
29
29
|
# Splight CLI
|
|
30
30
|
|
|
31
|
-

|
|
32
|
-

|
|
33
|
-
|
|
34
31
|
---
|
|
35
32
|
|
|
36
33
|
## Table of Content
|
|
@@ -75,6 +72,7 @@ pip install splight-cli
|
|
|
75
72
|
```
|
|
76
73
|
|
|
77
74
|
Once you have installed `splight-cli` you can check the installation with
|
|
75
|
+
|
|
78
76
|
```bash
|
|
79
77
|
splight --version
|
|
80
78
|
```
|
|
@@ -250,12 +248,15 @@ You can also retrieve one of the parameters using the `get` command:
|
|
|
250
248
|
```bash
|
|
251
249
|
splight configure get <parameter>
|
|
252
250
|
```
|
|
251
|
+
|
|
253
252
|
for example for reading the `SPLIGHT_PLATFORM_API_HOST`:
|
|
253
|
+
|
|
254
254
|
```bash
|
|
255
255
|
splight configure get splight_platform_api_host
|
|
256
256
|
```
|
|
257
257
|
|
|
258
258
|
In the same way you can modify one parameter using the `set` command
|
|
259
|
+
|
|
259
260
|
```bash
|
|
260
261
|
splight configure set <parameter> <value>
|
|
261
262
|
```
|
|
@@ -310,6 +311,7 @@ The `engine` command is used for interacting with the Splight Engine. So far, th
|
|
|
310
311
|
subcommands provide an interface for creating, reaading and deleting resources in the engine.
|
|
311
312
|
|
|
312
313
|
The command is
|
|
314
|
+
|
|
313
315
|
```bash
|
|
314
316
|
splight engine <subcommand> <action> [extra args]
|
|
315
317
|
```
|
|
@@ -318,6 +320,7 @@ depending on the which sub-command you use you can get different actions
|
|
|
318
320
|
to perform
|
|
319
321
|
|
|
320
322
|
The valid sub-commands so far are:
|
|
323
|
+
|
|
321
324
|
- `asset`
|
|
322
325
|
- `attribute`
|
|
323
326
|
- `component`
|
|
@@ -343,7 +346,7 @@ The available subcommands are
|
|
|
343
346
|
|
|
344
347
|
- `create <name>` to create a new workspace. After the creation of a new worskpace you need to configure _Splight CLI_ with `splight configure`.
|
|
345
348
|
- `delete <name>` to delete an existing workspace.
|
|
346
|
-
- `list` to list all workspaces. Current workspace displays a '
|
|
349
|
+
- `list` to list all workspaces. Current workspace displays a '\*' to the left.
|
|
347
350
|
- `select <name>` to switch between different configured workspaces.
|
|
348
351
|
- `show <name>` to display the contents of an existing workspace.
|
|
349
352
|
|
|
@@ -579,10 +582,10 @@ splight component run <component directory> --local
|
|
|
579
582
|
```
|
|
580
583
|
|
|
581
584
|
This way, the component will run using local clients for database and datalake. This is extremely
|
|
582
|
-
useful for development since you can create instances of the different database objects in the
|
|
583
|
-
local database for running different scenearios or differents tests. The same can be applied for
|
|
585
|
+
useful for development since you can create instances of the different database objects in the
|
|
586
|
+
local database for running different scenearios or differents tests. The same can be applied for
|
|
584
587
|
datalake data, the local client stores the data in files. In both cases, for database and datalake,
|
|
585
|
-
the files are created in the same directory as the `__init__.py` file of the component, so you
|
|
588
|
+
the files are created in the same directory as the `__init__.py` file of the component, so you
|
|
586
589
|
can modified it based on your needs.
|
|
587
590
|
|
|
588
591
|
You can interact with the local databases using the library, for example
|
|
@@ -604,3 +607,4 @@ db_client.save(attribute)
|
|
|
604
607
|
|
|
605
608
|
df = client.get_dataframe(Number, asset=all_assets[0].id, attribute=attribute.id)
|
|
606
609
|
```
|
|
610
|
+
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# Splight CLI
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-
|
|
6
3
|
---
|
|
7
4
|
|
|
8
5
|
## Table of Content
|
|
@@ -47,6 +44,7 @@ pip install splight-cli
|
|
|
47
44
|
```
|
|
48
45
|
|
|
49
46
|
Once you have installed `splight-cli` you can check the installation with
|
|
47
|
+
|
|
50
48
|
```bash
|
|
51
49
|
splight --version
|
|
52
50
|
```
|
|
@@ -222,12 +220,15 @@ You can also retrieve one of the parameters using the `get` command:
|
|
|
222
220
|
```bash
|
|
223
221
|
splight configure get <parameter>
|
|
224
222
|
```
|
|
223
|
+
|
|
225
224
|
for example for reading the `SPLIGHT_PLATFORM_API_HOST`:
|
|
225
|
+
|
|
226
226
|
```bash
|
|
227
227
|
splight configure get splight_platform_api_host
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
In the same way you can modify one parameter using the `set` command
|
|
231
|
+
|
|
231
232
|
```bash
|
|
232
233
|
splight configure set <parameter> <value>
|
|
233
234
|
```
|
|
@@ -282,6 +283,7 @@ The `engine` command is used for interacting with the Splight Engine. So far, th
|
|
|
282
283
|
subcommands provide an interface for creating, reaading and deleting resources in the engine.
|
|
283
284
|
|
|
284
285
|
The command is
|
|
286
|
+
|
|
285
287
|
```bash
|
|
286
288
|
splight engine <subcommand> <action> [extra args]
|
|
287
289
|
```
|
|
@@ -290,6 +292,7 @@ depending on the which sub-command you use you can get different actions
|
|
|
290
292
|
to perform
|
|
291
293
|
|
|
292
294
|
The valid sub-commands so far are:
|
|
295
|
+
|
|
293
296
|
- `asset`
|
|
294
297
|
- `attribute`
|
|
295
298
|
- `component`
|
|
@@ -315,7 +318,7 @@ The available subcommands are
|
|
|
315
318
|
|
|
316
319
|
- `create <name>` to create a new workspace. After the creation of a new worskpace you need to configure _Splight CLI_ with `splight configure`.
|
|
317
320
|
- `delete <name>` to delete an existing workspace.
|
|
318
|
-
- `list` to list all workspaces. Current workspace displays a '
|
|
321
|
+
- `list` to list all workspaces. Current workspace displays a '\*' to the left.
|
|
319
322
|
- `select <name>` to switch between different configured workspaces.
|
|
320
323
|
- `show <name>` to display the contents of an existing workspace.
|
|
321
324
|
|
|
@@ -551,10 +554,10 @@ splight component run <component directory> --local
|
|
|
551
554
|
```
|
|
552
555
|
|
|
553
556
|
This way, the component will run using local clients for database and datalake. This is extremely
|
|
554
|
-
useful for development since you can create instances of the different database objects in the
|
|
555
|
-
local database for running different scenearios or differents tests. The same can be applied for
|
|
557
|
+
useful for development since you can create instances of the different database objects in the
|
|
558
|
+
local database for running different scenearios or differents tests. The same can be applied for
|
|
556
559
|
datalake data, the local client stores the data in files. In both cases, for database and datalake,
|
|
557
|
-
the files are created in the same directory as the `__init__.py` file of the component, so you
|
|
560
|
+
the files are created in the same directory as the `__init__.py` file of the component, so you
|
|
558
561
|
can modified it based on your needs.
|
|
559
562
|
|
|
560
563
|
You can interact with the local databases using the library, for example
|
|
@@ -575,4 +578,4 @@ attribute = Attribute(name="SomeAttribute")
|
|
|
575
578
|
db_client.save(attribute)
|
|
576
579
|
|
|
577
580
|
df = client.get_dataframe(Number, asset=all_assets[0].id, attribute=attribute.id)
|
|
578
|
-
```
|
|
581
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "splight-cli"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.11.1"
|
|
4
4
|
description = "Splight Command Line Interface"
|
|
5
5
|
authors = ["Splight Dev <dev@splight-ae.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -11,7 +11,7 @@ case-converter = "1.1.0"
|
|
|
11
11
|
click = "8.0.4"
|
|
12
12
|
click-default-group = "1.2.2"
|
|
13
13
|
setuptools = "60.9.3"
|
|
14
|
-
splight-lib = "^5.
|
|
14
|
+
splight-lib = "^5.4.1"
|
|
15
15
|
py7zr = "0.20.8"
|
|
16
16
|
typer = "0.9.0"
|
|
17
17
|
colorama = "0.4.4"
|
|
@@ -76,7 +76,8 @@ class HubComponentManager:
|
|
|
76
76
|
if not components:
|
|
77
77
|
raise HubComponentNotFound(name, version)
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
component_file_wrapper = components[0].download()
|
|
80
|
+
component_data = component_file_wrapper.read()
|
|
80
81
|
|
|
81
82
|
# TODO: search for a better approach
|
|
82
83
|
version_modified = version.replace(".", "_")
|
{splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/hub/component/tests/test_hub_manager.py
RENAMED
|
@@ -109,7 +109,11 @@ def test_push_already_exists_with_force(mock_exists, mock_component_manager):
|
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
@patch.object(HubComponent, "list_mine", return_value=[HUB_COMPONENT])
|
|
112
|
-
@patch.object(
|
|
112
|
+
@patch.object(
|
|
113
|
+
HubComponent,
|
|
114
|
+
"download",
|
|
115
|
+
return_value=open(os.path.join(TEST_COMPONENT_PATH, "spec.json"), "r"),
|
|
116
|
+
)
|
|
113
117
|
@patch("builtins.open", new_callable=mock_open())
|
|
114
118
|
@patch("py7zr.SevenZipFile")
|
|
115
119
|
@patch("shutil.move", return_value=None)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/component/tests/test_component_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/manager/tests/test_datalake_manager.py
RENAMED
|
File without changes
|
{splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/engine/manager/tests/test_resource_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{splight_cli-4.10.0 → splight_cli-4.11.1}/splight_cli/solution/resource/models/component_object.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|