hypershell 2.6.4__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.
- hypershell-2.6.4/LICENSE +201 -0
- hypershell-2.6.4/PKG-INFO +117 -0
- hypershell-2.6.4/README.rst +82 -0
- hypershell-2.6.4/pyproject.toml +80 -0
- hypershell-2.6.4/src/hypershell/__init__.py +115 -0
- hypershell-2.6.4/src/hypershell/client.py +1255 -0
- hypershell-2.6.4/src/hypershell/cluster/__init__.py +378 -0
- hypershell-2.6.4/src/hypershell/cluster/local.py +210 -0
- hypershell-2.6.4/src/hypershell/cluster/remote.py +721 -0
- hypershell-2.6.4/src/hypershell/cluster/ssh.py +352 -0
- hypershell-2.6.4/src/hypershell/config.py +440 -0
- hypershell-2.6.4/src/hypershell/core/__init__.py +4 -0
- hypershell-2.6.4/src/hypershell/core/config.py +359 -0
- hypershell-2.6.4/src/hypershell/core/exceptions.py +120 -0
- hypershell-2.6.4/src/hypershell/core/fsm.py +82 -0
- hypershell-2.6.4/src/hypershell/core/heartbeat.py +70 -0
- hypershell-2.6.4/src/hypershell/core/logging.py +201 -0
- hypershell-2.6.4/src/hypershell/core/platform.py +121 -0
- hypershell-2.6.4/src/hypershell/core/queue.py +155 -0
- hypershell-2.6.4/src/hypershell/core/remote.py +192 -0
- hypershell-2.6.4/src/hypershell/core/signal.py +79 -0
- hypershell-2.6.4/src/hypershell/core/sys.py +39 -0
- hypershell-2.6.4/src/hypershell/core/tag.py +47 -0
- hypershell-2.6.4/src/hypershell/core/template.py +201 -0
- hypershell-2.6.4/src/hypershell/core/thread.py +56 -0
- hypershell-2.6.4/src/hypershell/core/types.py +32 -0
- hypershell-2.6.4/src/hypershell/data/__init__.py +137 -0
- hypershell-2.6.4/src/hypershell/data/core.py +232 -0
- hypershell-2.6.4/src/hypershell/data/model.py +674 -0
- hypershell-2.6.4/src/hypershell/server.py +1207 -0
- hypershell-2.6.4/src/hypershell/submit.py +815 -0
- hypershell-2.6.4/src/hypershell/task.py +1141 -0
hypershell-2.6.4/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: hypershell
|
|
3
|
+
Version: 2.6.4
|
|
4
|
+
Summary: A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Keywords: distributed-computing,command-line-tool,shell-scripting,high-performance-computing,high-throughput-computing
|
|
7
|
+
Author: Geoffrey Lentner
|
|
8
|
+
Author-email: glentner@purdue.edu
|
|
9
|
+
Requires-Python: >=3.9,<4.0
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Provides-Extra: postgres
|
|
23
|
+
Requires-Dist: cmdkit[toml] (>=2.7.7,<3.0.0)
|
|
24
|
+
Requires-Dist: paramiko (>=3.4.0,<4.0.0)
|
|
25
|
+
Requires-Dist: psycopg2 (>=2.9.9,<3.0.0) ; extra == "postgres"
|
|
26
|
+
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
27
|
+
Requires-Dist: rich (>=13.7.1,<14.0.0)
|
|
28
|
+
Requires-Dist: sqlalchemy (>=2.0.29,<3.0.0)
|
|
29
|
+
Requires-Dist: tomlkit (>=0.13.2,<0.14.0)
|
|
30
|
+
Project-URL: Documentation, https://hypershell.readthedocs.io
|
|
31
|
+
Project-URL: Homepage, https://hypershell.org
|
|
32
|
+
Project-URL: Repository, https://github.com/hypershell/hypershell
|
|
33
|
+
Description-Content-Type: text/x-rst
|
|
34
|
+
|
|
35
|
+
HyperShell v2: Distributed Task Execution for HPC
|
|
36
|
+
=================================================
|
|
37
|
+
|
|
38
|
+
.. image:: https://img.shields.io/badge/license-Apache-blue.svg?style=flat
|
|
39
|
+
:target: https://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
:alt: License
|
|
41
|
+
|
|
42
|
+
.. image:: https://img.shields.io/github/v/release/hypershell/hypershell?sort=semver
|
|
43
|
+
:target: https://github.com/hypershell/hypershell/releases
|
|
44
|
+
:alt: Github Release
|
|
45
|
+
|
|
46
|
+
.. image:: https://img.shields.io/badge/Python-3.9+-blue.svg
|
|
47
|
+
:target: https://www.python.org/downloads
|
|
48
|
+
:alt: Python Versions
|
|
49
|
+
|
|
50
|
+
.. image:: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg
|
|
51
|
+
:target: https://www.contributor-covenant.org/version/2/1/code_of_conduct/
|
|
52
|
+
:alt: Code of Conduct
|
|
53
|
+
|
|
54
|
+
.. image:: https://readthedocs.org/projects/hypershell/badge/?version=latest
|
|
55
|
+
:target: https://hypershell.readthedocs.io/en/latest/?badge=latest
|
|
56
|
+
:alt: Documentation Status
|
|
57
|
+
|
|
58
|
+
|
|
|
59
|
+
|
|
60
|
+
*HyperShell* is an elegant, cross-platform, high-throughput computing utility for
|
|
61
|
+
processing shell commands over a distributed, asynchronous queue. It is a highly
|
|
62
|
+
scalable workflow automation tool for *many-task* scenarios.
|
|
63
|
+
|
|
64
|
+
Built on Python and tested on Linux, macOS, and Windows.
|
|
65
|
+
|
|
66
|
+
Several tools offer similar functionality but not all together in a single tool with
|
|
67
|
+
the user ergonomics we provide. Novel design elements include but are not limited to
|
|
68
|
+
|
|
69
|
+
* **Cross-platform:** run on any platform where Python runs. In fact, the server and
|
|
70
|
+
client can run on different platforms in the same cluster.
|
|
71
|
+
* **Client-server:** workloads do not need to be monolithic. Run the server as a
|
|
72
|
+
stand-alone service with SQLite or Postgres as a persistent database and dynamically
|
|
73
|
+
scale clients as needed.
|
|
74
|
+
* **Staggered launch:** At the largest scales (1000s of nodes, 100k+ of workers),
|
|
75
|
+
the launch process can be challenging. Come up gradually to balance the workload.
|
|
76
|
+
* **Database in-the-loop:** run in-memory for quick, ad-hoc workloads. Otherwise,
|
|
77
|
+
include a database for persistence, recovery when restarting, and search.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
Documentation
|
|
81
|
+
-------------
|
|
82
|
+
|
|
83
|
+
Documentation is available at `hypershell.readthedocs.io <https://hypershell.readthedocs.io>`_.
|
|
84
|
+
For basic usage information on the command line use: ``hs --help``. For a more
|
|
85
|
+
comprehensive usage guide on the command line you can view the manual page with
|
|
86
|
+
``man hs``.
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
Contributions
|
|
90
|
+
-------------
|
|
91
|
+
|
|
92
|
+
Contributions are welcome. If you find bugs or have questions, open an *Issue* here.
|
|
93
|
+
We've added a Code of Conduct recently, adapted from the
|
|
94
|
+
`Contributor Covenant <https://www.contributor-covenant.org/>`_, version 2.0.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Citation
|
|
98
|
+
--------
|
|
99
|
+
|
|
100
|
+
If *HyperShell* has helped in your research please consider citing us.
|
|
101
|
+
|
|
102
|
+
.. code-block:: bibtex
|
|
103
|
+
|
|
104
|
+
@inproceedings{lentner_2022,
|
|
105
|
+
author = {Lentner, Geoffrey and Gorenstein, Lev},
|
|
106
|
+
title = {HyperShell v2: Distributed Task Execution for HPC},
|
|
107
|
+
year = {2022},
|
|
108
|
+
isbn = {9781450391610},
|
|
109
|
+
publisher = {Association for Computing Machinery},
|
|
110
|
+
url = {https://doi.org/10.1145/3491418.3535138},
|
|
111
|
+
doi = {10.1145/3491418.3535138},
|
|
112
|
+
booktitle = {Practice and Experience in Advanced Research Computing},
|
|
113
|
+
articleno = {80},
|
|
114
|
+
numpages = {3},
|
|
115
|
+
series = {PEARC '22}
|
|
116
|
+
}
|
|
117
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
HyperShell v2: Distributed Task Execution for HPC
|
|
2
|
+
=================================================
|
|
3
|
+
|
|
4
|
+
.. image:: https://img.shields.io/badge/license-Apache-blue.svg?style=flat
|
|
5
|
+
:target: https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
:alt: License
|
|
7
|
+
|
|
8
|
+
.. image:: https://img.shields.io/github/v/release/hypershell/hypershell?sort=semver
|
|
9
|
+
:target: https://github.com/hypershell/hypershell/releases
|
|
10
|
+
:alt: Github Release
|
|
11
|
+
|
|
12
|
+
.. image:: https://img.shields.io/badge/Python-3.9+-blue.svg
|
|
13
|
+
:target: https://www.python.org/downloads
|
|
14
|
+
:alt: Python Versions
|
|
15
|
+
|
|
16
|
+
.. image:: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg
|
|
17
|
+
:target: https://www.contributor-covenant.org/version/2/1/code_of_conduct/
|
|
18
|
+
:alt: Code of Conduct
|
|
19
|
+
|
|
20
|
+
.. image:: https://readthedocs.org/projects/hypershell/badge/?version=latest
|
|
21
|
+
:target: https://hypershell.readthedocs.io/en/latest/?badge=latest
|
|
22
|
+
:alt: Documentation Status
|
|
23
|
+
|
|
24
|
+
|
|
|
25
|
+
|
|
26
|
+
*HyperShell* is an elegant, cross-platform, high-throughput computing utility for
|
|
27
|
+
processing shell commands over a distributed, asynchronous queue. It is a highly
|
|
28
|
+
scalable workflow automation tool for *many-task* scenarios.
|
|
29
|
+
|
|
30
|
+
Built on Python and tested on Linux, macOS, and Windows.
|
|
31
|
+
|
|
32
|
+
Several tools offer similar functionality but not all together in a single tool with
|
|
33
|
+
the user ergonomics we provide. Novel design elements include but are not limited to
|
|
34
|
+
|
|
35
|
+
* **Cross-platform:** run on any platform where Python runs. In fact, the server and
|
|
36
|
+
client can run on different platforms in the same cluster.
|
|
37
|
+
* **Client-server:** workloads do not need to be monolithic. Run the server as a
|
|
38
|
+
stand-alone service with SQLite or Postgres as a persistent database and dynamically
|
|
39
|
+
scale clients as needed.
|
|
40
|
+
* **Staggered launch:** At the largest scales (1000s of nodes, 100k+ of workers),
|
|
41
|
+
the launch process can be challenging. Come up gradually to balance the workload.
|
|
42
|
+
* **Database in-the-loop:** run in-memory for quick, ad-hoc workloads. Otherwise,
|
|
43
|
+
include a database for persistence, recovery when restarting, and search.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Documentation
|
|
47
|
+
-------------
|
|
48
|
+
|
|
49
|
+
Documentation is available at `hypershell.readthedocs.io <https://hypershell.readthedocs.io>`_.
|
|
50
|
+
For basic usage information on the command line use: ``hs --help``. For a more
|
|
51
|
+
comprehensive usage guide on the command line you can view the manual page with
|
|
52
|
+
``man hs``.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Contributions
|
|
56
|
+
-------------
|
|
57
|
+
|
|
58
|
+
Contributions are welcome. If you find bugs or have questions, open an *Issue* here.
|
|
59
|
+
We've added a Code of Conduct recently, adapted from the
|
|
60
|
+
`Contributor Covenant <https://www.contributor-covenant.org/>`_, version 2.0.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
Citation
|
|
64
|
+
--------
|
|
65
|
+
|
|
66
|
+
If *HyperShell* has helped in your research please consider citing us.
|
|
67
|
+
|
|
68
|
+
.. code-block:: bibtex
|
|
69
|
+
|
|
70
|
+
@inproceedings{lentner_2022,
|
|
71
|
+
author = {Lentner, Geoffrey and Gorenstein, Lev},
|
|
72
|
+
title = {HyperShell v2: Distributed Task Execution for HPC},
|
|
73
|
+
year = {2022},
|
|
74
|
+
isbn = {9781450391610},
|
|
75
|
+
publisher = {Association for Computing Machinery},
|
|
76
|
+
url = {https://doi.org/10.1145/3491418.3535138},
|
|
77
|
+
doi = {10.1145/3491418.3535138},
|
|
78
|
+
booktitle = {Practice and Experience in Advanced Research Computing},
|
|
79
|
+
articleno = {80},
|
|
80
|
+
numpages = {3},
|
|
81
|
+
series = {PEARC '22}
|
|
82
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "hypershell"
|
|
3
|
+
version = "2.6.4"
|
|
4
|
+
description = "A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue."
|
|
5
|
+
readme = "README.rst"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
homepage = "https://hypershell.org"
|
|
8
|
+
documentation = "https://hypershell.readthedocs.io"
|
|
9
|
+
repository = "https://github.com/hypershell/hypershell"
|
|
10
|
+
authors = [
|
|
11
|
+
"Geoffrey Lentner <glentner@purdue.edu>"
|
|
12
|
+
]
|
|
13
|
+
keywords = [
|
|
14
|
+
"distributed-computing",
|
|
15
|
+
"command-line-tool",
|
|
16
|
+
"shell-scripting",
|
|
17
|
+
"high-performance-computing",
|
|
18
|
+
"high-throughput-computing",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 5 - Production/Stable",
|
|
22
|
+
"Topic :: Utilities",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Operating System :: POSIX :: Linux",
|
|
29
|
+
"Operating System :: MacOS",
|
|
30
|
+
"Operating System :: Microsoft :: Windows",
|
|
31
|
+
"License :: OSI Approved :: Apache Software License",
|
|
32
|
+
]
|
|
33
|
+
packages = [{include = "hypershell", from = "src"}]
|
|
34
|
+
|
|
35
|
+
[tool.poetry.scripts]
|
|
36
|
+
hyper-shell = "hypershell:main" # NOTE: do not remove this
|
|
37
|
+
hs = "hypershell:main"
|
|
38
|
+
|
|
39
|
+
[tool.poetry.dependencies]
|
|
40
|
+
python = ">=3.9,<4.0"
|
|
41
|
+
cmdkit = {version = "^2.7.7", extras = ["toml"]}
|
|
42
|
+
pyyaml = "^6.0.1" # Allow 6.0.1 for EPEL9 compatibility (2025-01-02)
|
|
43
|
+
tomlkit = "^0.13.2"
|
|
44
|
+
sqlalchemy = "^2.0.29"
|
|
45
|
+
rich = "^13.7.1"
|
|
46
|
+
paramiko = "^3.4.0"
|
|
47
|
+
psycopg2 = {version = "^2.9.9", optional = true}
|
|
48
|
+
|
|
49
|
+
[tool.poetry.extras]
|
|
50
|
+
postgres = ["psycopg2"]
|
|
51
|
+
|
|
52
|
+
[tool.poetry.group.docs.dependencies]
|
|
53
|
+
sphinx = "^7.2.6"
|
|
54
|
+
sphinx-sitemap = "^2.5.1"
|
|
55
|
+
sphinx-autobuild = "^2024.2.4"
|
|
56
|
+
sphinx-copybutton = "^0.5.2"
|
|
57
|
+
sphinxext-opengraph = "^0.9.1"
|
|
58
|
+
sphinxcontrib-details-directive = "^0.1.0"
|
|
59
|
+
sphinx-toolbox = "^3.5.0"
|
|
60
|
+
sphinx-inline-tabs = "^2023.4.21"
|
|
61
|
+
enum-tools = {extras = ["sphinx"], version = "^0.12.0"}
|
|
62
|
+
furo = "^2024.1.29"
|
|
63
|
+
|
|
64
|
+
[tool.poetry.group.dev.dependencies]
|
|
65
|
+
psycopg2 = "^2.9.9"
|
|
66
|
+
pytest = "^8.1.1"
|
|
67
|
+
hypothesis = "^6.100.0"
|
|
68
|
+
sphinx-autobuild = "^2024.2.4"
|
|
69
|
+
|
|
70
|
+
[build-system]
|
|
71
|
+
requires = ["poetry-core>=1.0.0"]
|
|
72
|
+
build-backend = "poetry.core.masonry.api"
|
|
73
|
+
|
|
74
|
+
[tool.pytest.ini_options]
|
|
75
|
+
addopts = ["--strict-markers", ]
|
|
76
|
+
markers = [
|
|
77
|
+
"unit: Unit tests are short, interface driven tests on discrete components.",
|
|
78
|
+
"integration: Integration tests are often longer and deal with the interaction between systems.",
|
|
79
|
+
"parameterize: Place holder for parameterized tests (not a real type).",
|
|
80
|
+
]
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2025 Geoffrey Lentner
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
"""Initialization and entry-point for console application."""
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# standard libs
|
|
8
|
+
import sys
|
|
9
|
+
from importlib.metadata import version as get_version
|
|
10
|
+
from platform import python_version
|
|
11
|
+
|
|
12
|
+
# external libs
|
|
13
|
+
from cmdkit.app import Application, ApplicationGroup
|
|
14
|
+
from cmdkit.cli import Interface
|
|
15
|
+
|
|
16
|
+
# internal libs
|
|
17
|
+
from hypershell.core.logging import Logger, initialize_logging
|
|
18
|
+
from hypershell.core.signal import register_handlers
|
|
19
|
+
from hypershell.submit import SubmitApp
|
|
20
|
+
from hypershell.server import ServerApp
|
|
21
|
+
from hypershell.client import ClientApp
|
|
22
|
+
from hypershell.cluster import ClusterApp
|
|
23
|
+
from hypershell.task import TaskGroupApp
|
|
24
|
+
from hypershell.config import ConfigApp
|
|
25
|
+
from hypershell.data import InitDBApp
|
|
26
|
+
|
|
27
|
+
# public interface
|
|
28
|
+
__all__ = ['HyperShellApp', 'main', '__version__']
|
|
29
|
+
|
|
30
|
+
# project metadata
|
|
31
|
+
__version__ = get_version('hypershell')
|
|
32
|
+
__website__ = 'https://github.com/glentner/hypershell'
|
|
33
|
+
__description__ = 'Process shell commands over a distributed, asynchronous queue.'
|
|
34
|
+
__citation__ = """\
|
|
35
|
+
@inproceedings{lentner_2022,
|
|
36
|
+
author = {Lentner, Geoffrey and Gorenstein, Lev},
|
|
37
|
+
title = {HyperShell v2: Distributed Task Execution for HPC},
|
|
38
|
+
year = {2022},
|
|
39
|
+
isbn = {9781450391610},
|
|
40
|
+
publisher = {Association for Computing Machinery},
|
|
41
|
+
url = {https://doi.org/10.1145/3491418.3535138},
|
|
42
|
+
doi = {10.1145/3491418.3535138},
|
|
43
|
+
booktitle = {Practice and Experience in Advanced Research Computing},
|
|
44
|
+
articleno = {80},
|
|
45
|
+
numpages = {3},
|
|
46
|
+
series = {PEARC '22}
|
|
47
|
+
}\
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
# initialize logger
|
|
51
|
+
log = Logger.with_name('hypershell')
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# inject logger setup into command-line framework
|
|
55
|
+
Application.log_critical = log.critical
|
|
56
|
+
Application.log_exception = log.exception
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
APP_NAME = 'hs'
|
|
60
|
+
APP_USAGE = f"""\
|
|
61
|
+
Usage:
|
|
62
|
+
{APP_NAME} [-h] [-v] <command> [<args>...]
|
|
63
|
+
{__description__}\
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
APP_HELP = f"""\
|
|
67
|
+
{APP_USAGE}
|
|
68
|
+
|
|
69
|
+
Commands:
|
|
70
|
+
config {ConfigApp.__doc__}
|
|
71
|
+
submit {SubmitApp.__doc__}
|
|
72
|
+
server {ServerApp.__doc__}
|
|
73
|
+
client {ClientApp.__doc__}
|
|
74
|
+
cluster {ClusterApp.__doc__} (recommended)
|
|
75
|
+
task {TaskGroupApp.__doc__}
|
|
76
|
+
initdb {InitDBApp.__doc__}
|
|
77
|
+
|
|
78
|
+
Options:
|
|
79
|
+
-h, --help Show this message and exit.
|
|
80
|
+
-v, --version Show the version and exit.
|
|
81
|
+
--citation Show citation info and exit.
|
|
82
|
+
|
|
83
|
+
Issue tracking at:
|
|
84
|
+
{__website__}
|
|
85
|
+
|
|
86
|
+
If this software has helped in your research please consider
|
|
87
|
+
citing us (see --citation).\
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class HyperShellApp(ApplicationGroup):
|
|
92
|
+
"""Top-level application class for console application."""
|
|
93
|
+
|
|
94
|
+
interface = Interface(APP_NAME, APP_USAGE, APP_HELP)
|
|
95
|
+
interface.add_argument('-v', '--version', action='version',
|
|
96
|
+
version=f'HyperShell v{__version__} (Python {python_version()})')
|
|
97
|
+
interface.add_argument('--citation', action='version', version=__citation__)
|
|
98
|
+
interface.add_argument('command')
|
|
99
|
+
|
|
100
|
+
commands = {
|
|
101
|
+
'submit': SubmitApp,
|
|
102
|
+
'server': ServerApp,
|
|
103
|
+
'client': ClientApp,
|
|
104
|
+
'cluster': ClusterApp,
|
|
105
|
+
'task': TaskGroupApp,
|
|
106
|
+
'config': ConfigApp,
|
|
107
|
+
'initdb': InitDBApp,
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def main() -> int:
|
|
112
|
+
"""Entry-point for console application."""
|
|
113
|
+
initialize_logging()
|
|
114
|
+
register_handlers()
|
|
115
|
+
return HyperShellApp.main(sys.argv[1:])
|