accli 1.1.4__tar.gz → 2.0.0b3__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.
- {accli-1.1.4 → accli-2.0.0b3}/PKG-INFO +22 -7
- {accli-1.1.4 → accli-2.0.0b3}/README.md +20 -6
- {accli-1.1.4 → accli-2.0.0b3}/accli/AcceleratorJobProjectService.py +24 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/_version.py +1 -1
- accli-2.0.0b3/accli/cli.py +1266 -0
- accli-2.0.0b3/accli/mount_downloader.py +156 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli.egg-info/PKG-INFO +22 -7
- {accli-1.1.4 → accli-2.0.0b3}/accli.egg-info/SOURCES.txt +1 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli.egg-info/requires.txt +1 -0
- {accli-1.1.4 → accli-2.0.0b3}/pyproject.toml +1 -0
- accli-1.1.4/accli/cli.py +0 -309
- {accli-1.1.4 → accli-2.0.0b3}/LICENSE +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/AcceleratorTaskDispatcher.py +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/AcceleratorTerminalCliProjectService.py +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/CsvRegionalTimeseriesValidator.py +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/__init__.py +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/__main__.py +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/common.py +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli/token.py +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli.egg-info/dependency_links.txt +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli.egg-info/entry_points.txt +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/accli.egg-info/top_level.txt +0 -0
- {accli-1.1.4 → accli-2.0.0b3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: accli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0b3
|
|
4
4
|
Summary: IIASA Accelerator Client
|
|
5
5
|
Author-email: Wrufesh S <wrufesh@gmail.com>
|
|
6
6
|
License: The MIT License (MIT)
|
|
@@ -39,9 +39,9 @@ Requires-Dist: requests>=2.25.1
|
|
|
39
39
|
Requires-Dist: jsonschema>=4.5.1
|
|
40
40
|
Requires-Dist: pydantic>=2.0
|
|
41
41
|
Requires-Dist: GitPython
|
|
42
|
+
Requires-Dist: hf-xet>=1.4.3
|
|
42
43
|
Dynamic: license-file
|
|
43
44
|
|
|
44
|
-
|
|
45
45
|
# Accelerator Terminal Client and Python API
|
|
46
46
|
|
|
47
47
|
This package provides:
|
|
@@ -49,7 +49,8 @@ This package provides:
|
|
|
49
49
|
- A **command-line client** (`accli`) for interacting with the **Accelerator**.
|
|
50
50
|
- A **Python API** via the `accli` package.
|
|
51
51
|
|
|
52
|
-
Both interfaces communicate with the Accelerator’s REST API, implemented in
|
|
52
|
+
Both interfaces communicate with the Accelerator’s REST API, implemented in
|
|
53
|
+
the [Control Services Backend](https://github.com/iiasa/control_services_backend).
|
|
53
54
|
|
|
54
55
|
---
|
|
55
56
|
|
|
@@ -57,10 +58,11 @@ Both interfaces communicate with the Accelerator’s REST API, implemented in th
|
|
|
57
58
|
|
|
58
59
|
This client uses **device authentication** via Auth0.
|
|
59
60
|
|
|
60
|
-
- **OAuth Flow
|
|
61
|
-
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
61
|
+
- **OAuth Flow
|
|
62
|
+
**: [Device Authorization Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/device-authorization-flow)
|
|
63
|
+
- **Token Validity**: 7 days
|
|
64
|
+
- **Access Control**: Role-Based Access Control (RBAC) with stateless tokens
|
|
65
|
+
- **Grants**: Limited and scoped
|
|
64
66
|
|
|
65
67
|
---
|
|
66
68
|
|
|
@@ -77,11 +79,13 @@ This client uses **device authentication** via Auth0.
|
|
|
77
79
|
No Python install required. Run the appropriate command for your system:
|
|
78
80
|
|
|
79
81
|
**Linux / macOS:**
|
|
82
|
+
|
|
80
83
|
```bash
|
|
81
84
|
curl -fsSL https://raw.githubusercontent.com/iiasa/accli/master/scripts/install.sh | bash
|
|
82
85
|
```
|
|
83
86
|
|
|
84
87
|
**Windows (PowerShell):**
|
|
88
|
+
|
|
85
89
|
```powershell
|
|
86
90
|
irm https://raw.githubusercontent.com/iiasa/accli/master/scripts/install.ps1 | iex
|
|
87
91
|
```
|
|
@@ -132,6 +136,17 @@ Usage: accli [OPTIONS] COMMAND [ARGS]...
|
|
|
132
136
|
|
|
133
137
|
## 👩💻 Developer Guide
|
|
134
138
|
|
|
139
|
+
### Handling self-signed certificates
|
|
140
|
+
|
|
141
|
+
1. Copy and paste certificates from `<control_services_backend>/certs/public.crt` as
|
|
142
|
+
`./certs/dev-backend.crt` and `<accelerator_service>/minio_certs/public.crt` as
|
|
143
|
+
`./certs/dev-minio-ca.crt`.
|
|
144
|
+
2. Run
|
|
145
|
+
```
|
|
146
|
+
cd scripts
|
|
147
|
+
import_certs_certutil.ps1
|
|
148
|
+
```
|
|
149
|
+
|
|
135
150
|
### 🛠 Build & Upload
|
|
136
151
|
|
|
137
152
|
Follow the official Python packaging tutorial:
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# Accelerator Terminal Client and Python API
|
|
3
2
|
|
|
4
3
|
This package provides:
|
|
@@ -6,7 +5,8 @@ This package provides:
|
|
|
6
5
|
- A **command-line client** (`accli`) for interacting with the **Accelerator**.
|
|
7
6
|
- A **Python API** via the `accli` package.
|
|
8
7
|
|
|
9
|
-
Both interfaces communicate with the Accelerator’s REST API, implemented in
|
|
8
|
+
Both interfaces communicate with the Accelerator’s REST API, implemented in
|
|
9
|
+
the [Control Services Backend](https://github.com/iiasa/control_services_backend).
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -14,10 +14,11 @@ Both interfaces communicate with the Accelerator’s REST API, implemented in th
|
|
|
14
14
|
|
|
15
15
|
This client uses **device authentication** via Auth0.
|
|
16
16
|
|
|
17
|
-
- **OAuth Flow
|
|
18
|
-
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
17
|
+
- **OAuth Flow
|
|
18
|
+
**: [Device Authorization Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/device-authorization-flow)
|
|
19
|
+
- **Token Validity**: 7 days
|
|
20
|
+
- **Access Control**: Role-Based Access Control (RBAC) with stateless tokens
|
|
21
|
+
- **Grants**: Limited and scoped
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
@@ -34,11 +35,13 @@ This client uses **device authentication** via Auth0.
|
|
|
34
35
|
No Python install required. Run the appropriate command for your system:
|
|
35
36
|
|
|
36
37
|
**Linux / macOS:**
|
|
38
|
+
|
|
37
39
|
```bash
|
|
38
40
|
curl -fsSL https://raw.githubusercontent.com/iiasa/accli/master/scripts/install.sh | bash
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
**Windows (PowerShell):**
|
|
44
|
+
|
|
42
45
|
```powershell
|
|
43
46
|
irm https://raw.githubusercontent.com/iiasa/accli/master/scripts/install.ps1 | iex
|
|
44
47
|
```
|
|
@@ -89,6 +92,17 @@ Usage: accli [OPTIONS] COMMAND [ARGS]...
|
|
|
89
92
|
|
|
90
93
|
## 👩💻 Developer Guide
|
|
91
94
|
|
|
95
|
+
### Handling self-signed certificates
|
|
96
|
+
|
|
97
|
+
1. Copy and paste certificates from `<control_services_backend>/certs/public.crt` as
|
|
98
|
+
`./certs/dev-backend.crt` and `<accelerator_service>/minio_certs/public.crt` as
|
|
99
|
+
`./certs/dev-minio-ca.crt`.
|
|
100
|
+
2. Run
|
|
101
|
+
```
|
|
102
|
+
cd scripts
|
|
103
|
+
import_certs_certutil.ps1
|
|
104
|
+
```
|
|
105
|
+
|
|
92
106
|
### 🛠 Build & Upload
|
|
93
107
|
|
|
94
108
|
Follow the official Python packaging tutorial:
|
|
@@ -446,6 +446,30 @@ class AcceleratorJobProjectService:
|
|
|
446
446
|
headers=headers
|
|
447
447
|
)
|
|
448
448
|
|
|
449
|
+
def register_validation_with_filename(
|
|
450
|
+
self,
|
|
451
|
+
validated_filename: str,
|
|
452
|
+
dataset_template_id: int,
|
|
453
|
+
validated_metadata: dict,
|
|
454
|
+
validation_supporting_filenames: List[str]
|
|
455
|
+
):
|
|
456
|
+
headers = {"Content-Type": "application/json"}
|
|
457
|
+
|
|
458
|
+
headers.update(self.common_request_headers)
|
|
459
|
+
|
|
460
|
+
res = self.http_client_request(
|
|
461
|
+
"PUT",
|
|
462
|
+
f"{self.cli_base_url}/register-validation-with-filename/",
|
|
463
|
+
json=dict(
|
|
464
|
+
validated_filename=validated_filename,
|
|
465
|
+
dataset_template_id=dataset_template_id,
|
|
466
|
+
validated_metadata=validated_metadata,
|
|
467
|
+
validation_supporting_filenames=validation_supporting_filenames
|
|
468
|
+
),
|
|
469
|
+
headers=headers
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
|
|
449
473
|
def get_dataset_template_details(
|
|
450
474
|
self,
|
|
451
475
|
dataset_template_id
|