haps-invocation 0.2.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.
- haps_invocation-0.2.1/LICENSE +21 -0
- haps_invocation-0.2.1/PKG-INFO +115 -0
- haps_invocation-0.2.1/README.md +101 -0
- haps_invocation-0.2.1/haps_invocation/__init__.py +19 -0
- haps_invocation-0.2.1/haps_invocation/invocation.py +1046 -0
- haps_invocation-0.2.1/haps_invocation.egg-info/PKG-INFO +115 -0
- haps_invocation-0.2.1/haps_invocation.egg-info/SOURCES.txt +10 -0
- haps_invocation-0.2.1/haps_invocation.egg-info/dependency_links.txt +1 -0
- haps_invocation-0.2.1/haps_invocation.egg-info/requires.txt +5 -0
- haps_invocation-0.2.1/haps_invocation.egg-info/top_level.txt +2 -0
- haps_invocation-0.2.1/pyproject.toml +23 -0
- haps_invocation-0.2.1/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sara Sadat Hoseininasab, Université de Rennes, Exa-AToW
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: haps-invocation
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Library for HAPS service invocation and data exchange
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: haps-client<0.6,>=0.5.0
|
|
10
|
+
Requires-Dist: haps-plugin-scheduler-client<0.6,>=0.5.0
|
|
11
|
+
Provides-Extra: dotenv
|
|
12
|
+
Requires-Dist: python-dotenv>=1.0; extra == "dotenv"
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# haps-invocation
|
|
16
|
+
|
|
17
|
+
Runtime support for proxies generated by the xgtd-compiler Compiler.
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
haps-invocation provides the shared execution logic used by generated Galaxy tools, CWL tasks, and MCP servers to invoke HAPS applications.
|
|
22
|
+
|
|
23
|
+
The runtime is separated from the compiler because they are used at different stages:
|
|
24
|
+
|
|
25
|
+
- `xgtd-compiler` generates executable workflow and tool descriptions.
|
|
26
|
+
- `haps-invocation` supports the generated proxies while they are running.
|
|
27
|
+
|
|
28
|
+
This separation allows execution environments, such as Galaxy servers, to install the lightweight runtime without installing all compiler dependencies.
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
The runtime supports:
|
|
33
|
+
|
|
34
|
+
- Submission of HAPS jobs through `HapsClient`
|
|
35
|
+
- Monitoring of submitted jobs
|
|
36
|
+
- Recovery of previously submitted jobs
|
|
37
|
+
- Persistent job-state management
|
|
38
|
+
- Processing of HAPS results
|
|
39
|
+
- Downloading eBout outputs
|
|
40
|
+
- Generation of JSON metadata for downstream workflow tasks
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
The recommended installation method is to install the complete Exa-AToW compiler:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
python -m pip install xgtd-compiler
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
A compatible version of `haps-invocation` is installed automatically.
|
|
51
|
+
|
|
52
|
+
Execution environments that only run generated proxies can install the runtime directly:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
python -m pip install haps-invocation
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Requirements
|
|
59
|
+
|
|
60
|
+
- Python 3.11 or newer
|
|
61
|
+
- Access to a configured HAPS service
|
|
62
|
+
- Credentials and HPC-centre information required by the generated proxy
|
|
63
|
+
|
|
64
|
+
The runtime installs `haps-client` and `haps-plugin-scheduler-client` as dependencies.
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
The runtime is normally not invoked directly from the command line. It is imported by the Python proxies generated by the Exa-AToW compiler.
|
|
69
|
+
|
|
70
|
+
For example, generated proxies import runtime functionality using:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from haps_invocation import run_haps
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Depending on the compilation mode, generated code may also use runtime functions for recovery, metadata generation, output downloading, and job-state management.
|
|
77
|
+
|
|
78
|
+
## Compilation and execution model
|
|
79
|
+
|
|
80
|
+
The compiler and runtime participate in different stages of an Exa-AToW workflow:
|
|
81
|
+
|
|
82
|
+
1. The Exa-AToW compiler reads XGTD HAPS descriptions.
|
|
83
|
+
2. It generates Galaxy tools, CWL tasks, or MCP servers.
|
|
84
|
+
3. The generated proxy is executed by the target workflow environment.
|
|
85
|
+
4. The proxy uses `haps-invocation` to submit and monitor the HAPS job.
|
|
86
|
+
5. The runtime processes the results and produces metadata for subsequent tasks.
|
|
87
|
+
|
|
88
|
+
## Version compatibility
|
|
89
|
+
|
|
90
|
+
The Exa-AToW compiler declares the compatible runtime versions in its package dependencies. Users installing the compiler therefore receive a compatible runtime automatically.
|
|
91
|
+
|
|
92
|
+
For example:
|
|
93
|
+
|
|
94
|
+
```toml
|
|
95
|
+
dependencies = [
|
|
96
|
+
"haps-invocation>=0.1.0,<0.2.0",
|
|
97
|
+
]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Development installation
|
|
101
|
+
|
|
102
|
+
From the `haps-invocation` directory, install the package in editable mode:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
python -m pip install -e .
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
To build the runtime distribution:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
python -m pip install --upgrade build
|
|
112
|
+
python -m build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The resulting wheel and source distribution are created under `dist/`.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# haps-invocation
|
|
2
|
+
|
|
3
|
+
Runtime support for proxies generated by the xgtd-compiler Compiler.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
haps-invocation provides the shared execution logic used by generated Galaxy tools, CWL tasks, and MCP servers to invoke HAPS applications.
|
|
8
|
+
|
|
9
|
+
The runtime is separated from the compiler because they are used at different stages:
|
|
10
|
+
|
|
11
|
+
- `xgtd-compiler` generates executable workflow and tool descriptions.
|
|
12
|
+
- `haps-invocation` supports the generated proxies while they are running.
|
|
13
|
+
|
|
14
|
+
This separation allows execution environments, such as Galaxy servers, to install the lightweight runtime without installing all compiler dependencies.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
The runtime supports:
|
|
19
|
+
|
|
20
|
+
- Submission of HAPS jobs through `HapsClient`
|
|
21
|
+
- Monitoring of submitted jobs
|
|
22
|
+
- Recovery of previously submitted jobs
|
|
23
|
+
- Persistent job-state management
|
|
24
|
+
- Processing of HAPS results
|
|
25
|
+
- Downloading eBout outputs
|
|
26
|
+
- Generation of JSON metadata for downstream workflow tasks
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
The recommended installation method is to install the complete Exa-AToW compiler:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
python -m pip install xgtd-compiler
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
A compatible version of `haps-invocation` is installed automatically.
|
|
37
|
+
|
|
38
|
+
Execution environments that only run generated proxies can install the runtime directly:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python -m pip install haps-invocation
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Requirements
|
|
45
|
+
|
|
46
|
+
- Python 3.11 or newer
|
|
47
|
+
- Access to a configured HAPS service
|
|
48
|
+
- Credentials and HPC-centre information required by the generated proxy
|
|
49
|
+
|
|
50
|
+
The runtime installs `haps-client` and `haps-plugin-scheduler-client` as dependencies.
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
The runtime is normally not invoked directly from the command line. It is imported by the Python proxies generated by the Exa-AToW compiler.
|
|
55
|
+
|
|
56
|
+
For example, generated proxies import runtime functionality using:
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from haps_invocation import run_haps
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Depending on the compilation mode, generated code may also use runtime functions for recovery, metadata generation, output downloading, and job-state management.
|
|
63
|
+
|
|
64
|
+
## Compilation and execution model
|
|
65
|
+
|
|
66
|
+
The compiler and runtime participate in different stages of an Exa-AToW workflow:
|
|
67
|
+
|
|
68
|
+
1. The Exa-AToW compiler reads XGTD HAPS descriptions.
|
|
69
|
+
2. It generates Galaxy tools, CWL tasks, or MCP servers.
|
|
70
|
+
3. The generated proxy is executed by the target workflow environment.
|
|
71
|
+
4. The proxy uses `haps-invocation` to submit and monitor the HAPS job.
|
|
72
|
+
5. The runtime processes the results and produces metadata for subsequent tasks.
|
|
73
|
+
|
|
74
|
+
## Version compatibility
|
|
75
|
+
|
|
76
|
+
The Exa-AToW compiler declares the compatible runtime versions in its package dependencies. Users installing the compiler therefore receive a compatible runtime automatically.
|
|
77
|
+
|
|
78
|
+
For example:
|
|
79
|
+
|
|
80
|
+
```toml
|
|
81
|
+
dependencies = [
|
|
82
|
+
"haps-invocation>=0.1.0,<0.2.0",
|
|
83
|
+
]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Development installation
|
|
87
|
+
|
|
88
|
+
From the `haps-invocation` directory, install the package in editable mode:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
python -m pip install -e .
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
To build the runtime distribution:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
python -m pip install --upgrade build
|
|
98
|
+
python -m build
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The resulting wheel and source distribution are created under `dist/`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from .invocation import (
|
|
2
|
+
build_json_metadata,
|
|
3
|
+
create_api,
|
|
4
|
+
get_microservice,
|
|
5
|
+
create_cwl_task_state_file,
|
|
6
|
+
download_ebouts,
|
|
7
|
+
get_cwl_task_action,
|
|
8
|
+
initialize_cwl_task_state,
|
|
9
|
+
load_cwl_task_state,
|
|
10
|
+
recover_cwl_job,
|
|
11
|
+
recover_cwl_job_by_tag,
|
|
12
|
+
save_cwl_submitted_job_state,
|
|
13
|
+
run_haps,
|
|
14
|
+
wait_for_cwl_job,
|
|
15
|
+
mark_cwl_outputs_ready,
|
|
16
|
+
mark_cwl_task_expired,
|
|
17
|
+
create_scheduler_client,
|
|
18
|
+
wait_for_scheduler_job,
|
|
19
|
+
)
|