fluidattacks_batch_client 0.2.0__tar.gz → 0.2.2__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.
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/PKG-INFO +3 -2
- fluidattacks_batch_client-0.2.2/build/default.nix +27 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/__init__.py +1 -1
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/_cli.py +17 -8
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/pyproject.toml +2 -2
- fluidattacks_batch_client-0.2.0/build/default.nix +0 -13
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/.envrc +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/CLAUDE.md +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/build/filter.nix +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/flake.lock +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/flake.nix +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/_logger.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/_utils.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/api/__init__.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/api/_client_1/__init__.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/api/_client_1/_get_command.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/api/_client_1/_list_jobs.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/api/_client_1/_send_job.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/api/_core.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/core.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/decode.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/py.typed +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/sender/__init__.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/sender/_core.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/fluidattacks_batch_client/sender/_send.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/mypy.ini +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/tests/__init__.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/tests/arch/__init__.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/tests/arch/arch.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/tests/arch/test_arch.py +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/tests/py.typed +0 -0
- {fluidattacks_batch_client-0.2.0 → fluidattacks_batch_client-0.2.2}/uv.lock +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fluidattacks_batch_client
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: AWS batch python client
|
|
5
5
|
Author-email: Engineering Team <development@fluidattacks.com>
|
|
6
6
|
Requires-Python: >=3.11
|
|
7
7
|
Requires-Dist: click >=8.1.8, <9.0.0
|
|
8
8
|
Requires-Dist: boto3 >=1.42.32, <2.0.0
|
|
9
|
-
Requires-Dist:
|
|
9
|
+
Requires-Dist: fa-purity >=2.5.0, <3.0.0
|
|
10
|
+
Requires-Dist: mypy-boto3-batch >=1.39.0, <2.0.0
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
nixpkgs,
|
|
3
|
+
builders,
|
|
4
|
+
scripts,
|
|
5
|
+
src,
|
|
6
|
+
}:
|
|
7
|
+
let
|
|
8
|
+
build_bin =
|
|
9
|
+
bundle:
|
|
10
|
+
nixpkgs.writeShellApplication {
|
|
11
|
+
name = "batch-client";
|
|
12
|
+
runtimeInputs = [
|
|
13
|
+
bundle.env.runtime
|
|
14
|
+
nixpkgs.sops
|
|
15
|
+
];
|
|
16
|
+
text = ''
|
|
17
|
+
batch-client "''${@}"
|
|
18
|
+
'';
|
|
19
|
+
};
|
|
20
|
+
in
|
|
21
|
+
{
|
|
22
|
+
inherit src;
|
|
23
|
+
root_path = "observes/common/batch-client";
|
|
24
|
+
module_name = "fluidattacks_batch_client";
|
|
25
|
+
pypi_token_var = "BATCH_CLIENT_TOKEN";
|
|
26
|
+
override = bundle: bundle // { bin = build_bin bundle; };
|
|
27
|
+
}
|
|
@@ -38,25 +38,26 @@ from typing import (
|
|
|
38
38
|
)
|
|
39
39
|
import logging
|
|
40
40
|
from . import _utils
|
|
41
|
+
from pathlib import Path
|
|
41
42
|
|
|
42
43
|
LOG = logging.getLogger(__name__)
|
|
43
44
|
|
|
44
45
|
_T = TypeVar("_T")
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
def _read_file(file_path:
|
|
48
|
+
def _read_file(file_path: Path, transform: Callable[[IO[str]], _T]) -> Cmd[_T]:
|
|
48
49
|
def _action() -> _T:
|
|
49
|
-
with open(
|
|
50
|
+
with file_path.open("r", encoding="utf-8") as file:
|
|
50
51
|
return transform(file)
|
|
51
52
|
|
|
52
53
|
return Cmd.wrap_impure(_action)
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
def _decode_json(file_path:
|
|
56
|
+
def _decode_json(file_path: Path) -> Cmd[ResultE[JsonObj]]:
|
|
56
57
|
return _read_file(file_path, UnfoldedFactory.load)
|
|
57
58
|
|
|
58
59
|
|
|
59
|
-
def _decode_json_list(file_path:
|
|
60
|
+
def _decode_json_list(file_path: Path) -> Cmd[ResultE[FrozenList[JsonObj]]]:
|
|
60
61
|
return _read_file(
|
|
61
62
|
file_path,
|
|
62
63
|
lambda file: JsonValueFactory.load(file).bind(
|
|
@@ -66,13 +67,18 @@ def _decode_json_list(file_path: str) -> Cmd[ResultE[FrozenList[JsonObj]]]:
|
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
@click.command()
|
|
69
|
-
@click.option(
|
|
70
|
+
@click.option(
|
|
71
|
+
"--job",
|
|
72
|
+
required=True,
|
|
73
|
+
type=click.Path(exists=True, dir_okay=False, path_type=Path),
|
|
74
|
+
help="json encoded file defining a JobRequest",
|
|
75
|
+
)
|
|
70
76
|
@click.option("--allow-duplicates", is_flag=True)
|
|
71
77
|
@click.option("--args-in-name", is_flag=True)
|
|
72
78
|
@click.option("--dry-run", is_flag=True)
|
|
73
79
|
@click.argument("args", nargs=-1) # additional args to append into the job command
|
|
74
80
|
def submit_job(
|
|
75
|
-
job:
|
|
81
|
+
job: Path,
|
|
76
82
|
allow_duplicates: bool,
|
|
77
83
|
args_in_name: bool,
|
|
78
84
|
dry_run: bool,
|
|
@@ -113,11 +119,14 @@ def submit_job(
|
|
|
113
119
|
|
|
114
120
|
@click.command()
|
|
115
121
|
@click.option(
|
|
116
|
-
"--pipeline",
|
|
122
|
+
"--pipeline",
|
|
123
|
+
required=True,
|
|
124
|
+
type=click.Path(exists=True, dir_okay=False, path_type=Path),
|
|
125
|
+
help="file encoding a list of JobRequest i.e. list of jsons",
|
|
117
126
|
)
|
|
118
127
|
@click.option("--dry-run", is_flag=True)
|
|
119
128
|
def submit_pipeline(
|
|
120
|
-
pipeline:
|
|
129
|
+
pipeline: Path,
|
|
121
130
|
dry_run: bool,
|
|
122
131
|
) -> NoReturn:
|
|
123
132
|
def _execute(job_pipeline: JobPipeline) -> Cmd[UnitType]:
|
|
@@ -5,7 +5,8 @@ requires-python = ">=3.11"
|
|
|
5
5
|
dependencies = [
|
|
6
6
|
"click >=8.1.8, <9.0.0",
|
|
7
7
|
"boto3 >=1.42.32, <2.0.0",
|
|
8
|
-
"
|
|
8
|
+
"fa-purity >=2.5.0, <3.0.0",
|
|
9
|
+
"mypy-boto3-batch >=1.39.0, <2.0.0",
|
|
9
10
|
]
|
|
10
11
|
description = "AWS batch python client"
|
|
11
12
|
dynamic = ["version"]
|
|
@@ -20,7 +21,6 @@ build-backend = "flit_core.buildapi"
|
|
|
20
21
|
[dependency-groups]
|
|
21
22
|
dev = [
|
|
22
23
|
"boto3-stubs >=1.39.3, <2.0.0",
|
|
23
|
-
"mypy-boto3-batch >=1.39.0, <2.0.0",
|
|
24
24
|
"types-Deprecated >=1.3.1.20251101, <2.0.0",
|
|
25
25
|
"arch-lint >=5.0.0, <6.0.0",
|
|
26
26
|
"mypy >=1.18.2, <2.0.0",
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -215,6 +215,7 @@ dependencies = [
|
|
|
215
215
|
{ name = "boto3" },
|
|
216
216
|
{ name = "click" },
|
|
217
217
|
{ name = "fa-purity" },
|
|
218
|
+
{ name = "mypy-boto3-batch" },
|
|
218
219
|
]
|
|
219
220
|
|
|
220
221
|
[package.dev-dependencies]
|
|
@@ -222,7 +223,6 @@ dev = [
|
|
|
222
223
|
{ name = "arch-lint" },
|
|
223
224
|
{ name = "boto3-stubs" },
|
|
224
225
|
{ name = "mypy" },
|
|
225
|
-
{ name = "mypy-boto3-batch" },
|
|
226
226
|
{ name = "pytest" },
|
|
227
227
|
{ name = "pytest-cov" },
|
|
228
228
|
{ name = "ruff" },
|
|
@@ -234,6 +234,7 @@ requires-dist = [
|
|
|
234
234
|
{ name = "boto3", specifier = ">=1.42.32,<2.0.0" },
|
|
235
235
|
{ name = "click", specifier = ">=8.1.8,<9.0.0" },
|
|
236
236
|
{ name = "fa-purity", specifier = ">=2.5.0,<3.0.0" },
|
|
237
|
+
{ name = "mypy-boto3-batch", specifier = ">=1.39.0,<2.0.0" },
|
|
237
238
|
]
|
|
238
239
|
|
|
239
240
|
[package.metadata.requires-dev]
|
|
@@ -241,7 +242,6 @@ dev = [
|
|
|
241
242
|
{ name = "arch-lint", specifier = ">=5.0.0,<6.0.0" },
|
|
242
243
|
{ name = "boto3-stubs", specifier = ">=1.39.3,<2.0.0" },
|
|
243
244
|
{ name = "mypy", specifier = ">=1.18.2,<2.0.0" },
|
|
244
|
-
{ name = "mypy-boto3-batch", specifier = ">=1.39.0,<2.0.0" },
|
|
245
245
|
{ name = "pytest", specifier = ">=8.4.2,<9.0.0" },
|
|
246
246
|
{ name = "pytest-cov", specifier = ">=7.0.0,<8.0.0" },
|
|
247
247
|
{ name = "ruff", specifier = ">=0.14.1,<1.0.0" },
|