aCT-client 1.0.0__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.
@@ -0,0 +1,67 @@
1
+ name: Publish Python Package
2
+ # On pushing a tag like vX.Y.Z like - git tag v1.1.1; git push origin v1.1.1 - automatically
3
+ # publish current commit to test pypi if Z != 0, or normal pypi otherwise, using specified version.
4
+ on:
5
+ push:
6
+ tags:
7
+ - 'v*' # triggers on tags like v0.1.0, v0.1.1, v1.0.0
8
+
9
+ permissions:
10
+ contents: read # to checkout code
11
+ id-token: write # for Trusted Publishing (OIDC)
12
+
13
+ jobs:
14
+ build-and-publish:
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ # 1️⃣ Checkout code
19
+ - uses: actions/checkout@v6
20
+
21
+ # 2️⃣ Set up Python
22
+ - uses: actions/setup-python@v6
23
+ with:
24
+ python-version: '3.10'
25
+
26
+ # 3️⃣ Install build dependencies
27
+ - name: Install build dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ pip install build setuptools_scm
31
+
32
+ # 4️⃣ Extract version from Git tag
33
+ - name: Extract version from tag
34
+ id: vars
35
+ run: |
36
+ TAG=${GITHUB_REF#refs/tags/}
37
+ echo "TAG=$TAG" >> $GITHUB_ENV
38
+ VERSION=${TAG#v} # strip leading 'v'
39
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
40
+ echo "VERSION=$VERSION"
41
+
42
+ # 5️⃣ Build the package (wheel + sdist)
43
+ - name: Build package
44
+ run: python -m build
45
+
46
+ # 6️⃣ Determine upload target (TestPyPI for patch, PyPI for minor/major)
47
+ - name: Determine upload repository
48
+ id: determine-repo
49
+ shell: bash
50
+ run: |
51
+ MAJOR=$(echo $VERSION | cut -d. -f1)
52
+ MINOR=$(echo $VERSION | cut -d. -f2)
53
+ PATCH=$(echo $VERSION | cut -d. -f3)
54
+
55
+ if [ "$PATCH" -ne 0 ]; then
56
+ echo "repo=https://test.pypi.org/legacy/" >> $GITHUB_OUTPUT
57
+ else
58
+ echo "repo=https://upload.pypi.org/legacy/" >> $GITHUB_OUTPUT
59
+ fi
60
+
61
+ # 7️⃣ Publish using PyPA action with OIDC
62
+ - name: Publish to PyPI/TestPyPI
63
+ uses: pypa/gh-action-pypi-publish@release/v1
64
+ with:
65
+ packages-dir: dist/
66
+ repository-url: ${{ steps.determine-repo.outputs.repo }}
67
+ user: __token__ # literal string for OIDC, not your account
@@ -0,0 +1,5 @@
1
+ MANIFEST
2
+ dist
3
+ lib
4
+ *.egg-info
5
+ build
@@ -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,322 @@
1
+ Metadata-Version: 2.4
2
+ Name: aCT-client
3
+ Version: 1.0.0
4
+ Summary: Client tools to use with ARC Control Tower
5
+ Home-page: http://github.com/ARCControlTower/aCT-Client
6
+ Author: aCT team
7
+ Author-email: act-dev@cern.ch
8
+ License: Apache 2.0
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: cryptography
15
+ Requires-Dist: pyyaml
16
+ Requires-Dist: lark
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: classifier
20
+ Dynamic: description
21
+ Dynamic: description-content-type
22
+ Dynamic: home-page
23
+ Dynamic: license
24
+ Dynamic: license-file
25
+ Dynamic: requires-dist
26
+ Dynamic: requires-python
27
+ Dynamic: summary
28
+
29
+ # Install
30
+
31
+ ## System dependencies
32
+ Nordugrid ARC Client has to be installed to use `arcproxy` for proxy
33
+ certificates.
34
+ See [instructions](http://www.nordugrid.org/arc/arc6/users/client_install.html).
35
+
36
+ ## Notes on install locations
37
+ aCT client is currently meant to be installed using Python's `pip` package manager.
38
+ By default, `pip` tries to install packages to system directory which is not advised
39
+ to do. Users should either install it using `pip install --user` or in a virtual
40
+ environment.
41
+
42
+ ## Installation to virtual environment
43
+ Virtual environmet is a directory structure that includes all programs and libraries
44
+ needed for a standalone Python interpreter that is completely separate from the one
45
+ of the system or other virtual environments.
46
+
47
+ To create a virtual environment, the user needs to choose the location of the
48
+ environment and then run:
49
+ `$ python3 -m venv /path/to/act-venv`
50
+
51
+ Once virtual environment is created, it has to be activated to be used.
52
+ `$ source /path/to/act-venv/bin/activate`
53
+ All commands require shell with an active virtual environment.
54
+
55
+ To install aCT client, run this command:
56
+ `(act-venv) $ pip install aCT-client`
57
+ The command installs aCT client from PyPI. To run aCT client commands the virtual envionmnet
58
+ needs to be activated. Your shell might indicate that the environment is active
59
+ by prepending prefix to its prompt:
60
+ `(act-venv) $ `
61
+
62
+ ## Upgrading to newest version
63
+ `(act-venv) $ pip install aCT-client --upgrade`
64
+
65
+ # Configuration
66
+ Default location for aCT configuration file is `$HOME/.config/act-client/config.yaml`.
67
+ Configuration file can also be passed to commands, e. g.:
68
+ `(act-venv) $ act --conf /path/to/your/conf <subcommand> <args>`
69
+
70
+ Configuration is in YAML format. Parameters with default values and optional parameters
71
+ can be omitted. Possible parameters are:
72
+ - `server`: URL of aCT server (should include port if non standard)
73
+ - `clusters`: a YAML *mapping* of names to lists of clusters. A list of enabled
74
+ clusters for a server can be obtained with `act info`. If no `--clusterlist`
75
+ flag is given, the list called `default` will be used.
76
+ - `token`: location where client should store auth token
77
+ (optional, default: `$HOME/.local/share/act-client/token`)
78
+ - `proxy`: location of proxy that client uses for authentication
79
+ (optional, default: `/tmp/x509up_u$UID` - default location used by ARC client)
80
+ - `webdav`: path to WebDAV folder accessible with your proxy certificate credentials
81
+ (optional, but required for use with empty `--webdav` flag)
82
+
83
+ Example configuration:
84
+ ``` yaml
85
+ server: https://act.vega.izum.si
86
+ webdav: https://dcache.sling.si:2880/gen.vo.sling.si/john/jobdata
87
+ clusters:
88
+ default:
89
+ - https://arc01.vega.izum.si/cpu
90
+ - https://arc02.vega.izum.si/cpu
91
+ - https://hpc.arnes.si/all
92
+ - https://nsc.ijs.si/gridlong
93
+ longcpu:
94
+ - https://arc01.vega.izum.si/longcpu
95
+ - https://hpc.arnes.si/long
96
+ - https://nsc.ijs.si/gridlong
97
+ gpu:
98
+ - https://arc01.vega.izum.si/gpu
99
+ - https://hpc.arnes.si/gpu
100
+ largememory:
101
+ - https://arc01.vega.izum.si/largemem
102
+ - https://hpc.arnes.si/all
103
+ - https://nsc.ijs.si/gridlong
104
+ ```
105
+
106
+ # Example usage
107
+
108
+ First, obtain proxy certificate with VOMS credentials needed to access the
109
+ clusters:
110
+ ``` sh
111
+ $ arcproxy -S gen.vo.sling.si
112
+ Enter pass phrase for private key:
113
+ Your identity: /C=SI/O=SiGNET/O=IJS/OU=F9/CN=John Doe
114
+ Contacting VOMS server (named gen.vo.sling.si): voms.sling.si on port: 15001
115
+ Proxy generation succeeded
116
+ Your proxy is valid until: 2022-03-08 23:44:07
117
+ ```
118
+
119
+ Authenticate on the aCT server with the generated proxy:
120
+ ``` sh
121
+ (act-client) $ act proxy
122
+ Successfully inserted proxy. Access token stored in /home/john/.local/share/act-client/token
123
+ ```
124
+
125
+ Submit jobs:
126
+ ``` sh
127
+ (act-client) $ act sub arctest1.xrsl arctest2.xrsl arctest3.xrsl arctest4.xrsl --webdav
128
+ Inserted job arctest1 with ID 28517
129
+ Inserted job arctest2 with ID 28518
130
+ Inserted job arctest3 with ID 28519
131
+ Inserted job arctest4 with ID 28520
132
+ ```
133
+
134
+ Check status of jobs:
135
+ ``` sh
136
+ id jobname JobID State arcstate
137
+ -------------------------------------------------------------------------------------------------------------------------
138
+ 28517 arctest1 https://pikolit.ijs.si:443/arex/lqYKDmcZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmmk7KDmuhWSun Undefined submitted
139
+ 28518 arctest2 https://pikolit.ijs.si:443/arex/geMODmcZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmnk7KDmD1SOsn Undefined submitted
140
+ 28519 arctest3 https://pikolit.ijs.si:443/arex/wHqLDmdZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmok7KDml5d6kn Undefined submitted
141
+ 28520 arctest4 https://pikolit.ijs.si:443/arex/Mm0KDmeZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmpk7KDmCmAxyn Undefined submitted
142
+ ```
143
+
144
+ Wait for jobs to finish:
145
+ ``` sh
146
+ id jobname JobID State arcstate
147
+ -----------------------------------------------------------------------------------------------------------------------
148
+ 28517 arctest1 https://pikolit.ijs.si:443/arex/lqYKDmcZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmmk7KDmuhWSun Finished done
149
+ 28518 arctest2 https://pikolit.ijs.si:443/arex/geMODmcZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmnk7KDmD1SOsn Finished done
150
+ 28519 arctest3 https://pikolit.ijs.si:443/arex/wHqLDmdZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmok7KDml5d6kn Finished done
151
+ 28520 arctest4 https://pikolit.ijs.si:443/arex/Mm0KDmeZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmpk7KDmCmAxyn Finished done
152
+ ```
153
+
154
+ Download job results:
155
+ ``` sh
156
+ Results for job arctest1 stored in lqYKDmcZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmmk7KDmuhWSun
157
+ Results for job arctest2 stored in geMODmcZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmnk7KDmD1SOsn
158
+ Results for job arctest3 stored in wHqLDmdZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmok7KDml5d6kn
159
+ Results for job arctest4 stored in Mm0KDmeZml0n4J8tmqCBXHLnABFKDmABFKDmFoFKDmpk7KDmCmAxyn
160
+ Cleaning WebDAV directories ...
161
+ ```
162
+
163
+ For more details about job management with aCT client read on.
164
+
165
+ # Overview of aCT client
166
+ aCT client is a program that allows submission and management of jobs similar to
167
+ ARC Client tools with added benefits of aCT job management like job brokering to
168
+ multiple clusters.
169
+
170
+ ## Job states
171
+ Every job once submitted to aCT is in a particular aCT state. Users should have a
172
+ rough understanding of job states to know which operations can or cannot be
173
+ performed on jobs. Job states should be rather intuitive to users that are
174
+ familiar with job workflows. When aCT submits jobs to ARC middleware, it also
175
+ tracks its state in the middleware. aCT client by default provides information
176
+ on both states which should give the user a good indication about what is going
177
+ on with their jobs.
178
+
179
+ **WARNING**: the way jobs transition between different states is not always
180
+ intuitive. This is especially the case when killing jobs. The intuitive state
181
+ flow would for instance be: `running/submitted -> cancelling -> cancelled`.
182
+ But it does not always go this way. Sometimes the jobs will go back to
183
+ `submitted` state after being in `cancelling` for a while and appear as if
184
+ they were resubmitted. In such cases it is best to wait for jobs to reach one
185
+ of the "terminal" states like `cancelled` or `failed` or even `done` if the kill
186
+ operation did not propagate fast enough. Once the jobs are in such state they
187
+ can be managed accordingly.
188
+
189
+ Most common states:
190
+ - `running` - the job is running in ARC middleware
191
+ - `tosubmit`, `submitting`, `submitted` - jobs are in the process of submission
192
+ or have just been submitted. It might take a while after the job is successfully
193
+ submitted to get into the `running` state. Here, information about the state
194
+ of the job in ARC middleware can provide additional clues about what is happening
195
+ to the job.
196
+ - `cancelled` - jobs that are killed after they were submitted to ARC middleware
197
+ eventually end up in this state. Such jobs have to be cleaned.
198
+ - `failed` - jobs that failed because of some error end up in this state. Sometimes,
199
+ jobs end up in this state after being killed. Some failed jobs can be downloaded
200
+ to inspect logs or partial outputs, depending on how the failure happened.
201
+ The only way for user to find out if there is anything to be downloaded is to
202
+ instruct aCT to fetch (`act fetch`) any available results (read on for info on
203
+ that). Failed jobs can also be resubmitted with `act resub` or cleaned from
204
+ the system with `act clean`.
205
+ - `donefailed` - `failed` jobs end up in this state if aCT is instructed to fetch
206
+ them. User can try to download such jobs (`act get`) but there might be nothing
207
+ to download.
208
+ - `finished` - the job finished successfully in ARC middleware but its results
209
+ haven't been fetched by aCT yet. The fetch is automatic, the user just has to
210
+ wait for aCT to do that. Therefore, `finished` is not a "terminal" state and
211
+ such jobs should be waited to transition to `done`.
212
+ - `done` - this is a state of successfully finished jobs that have also been
213
+ fetched by aCT and can now be downloaded with `act get`. Such jobs can
214
+ also be cleaned if the results are not important.
215
+
216
+ There are other possible states. You can always try to kill jobs that end up
217
+ in weird states and then clean them if necessary. Otherwise, you should
218
+ consult admin and developers.
219
+
220
+ ## Authentication
221
+ To perform any operation on aCT, the user needs to be authenticated. This is done
222
+ with a valid proxy certificate with proper VOMS extensions (by using `arcproxy`
223
+ for instance). Then, the proxy needs to be submitted to aCT:
224
+ `(act-venv) $ act proxy`
225
+
226
+ This creates a delegated proxy on server required by aCT for further job and data
227
+ operations and stores a local access token. The lifetime of the token is the same
228
+ as for the proxy. If the token and proxy expire while jobs are still managed by
229
+ aCT, the user should create a new proxy and submit it with `act proxy`. This will
230
+ create a new delegated proxy and access token and allow further operations on
231
+ existing jobs.
232
+
233
+ **WARNING**: If jobs appear to be stuck in some intermediate state for unusual
234
+ amount of time it might be because proxy or VOMS attributes are expired. In such
235
+ case, create a new proxy and submit it to aCT.
236
+
237
+ ## Submission
238
+ Jobs can be submitted using the following command:
239
+ `(act-venv) $ act sub job1.xrsl job2.xrsl ...`
240
+ The command instructs aCT to submit jobs to a given list of clusters. Those can
241
+ be provided in several ways. First option is to provide a list of cluster URLs:
242
+ `--clusterlist=https://arc01.vega.izum.si/cpu,https://arc02.vega.izum.si/cpu`
243
+ Other two options require configuration to be set up properly. If no `--clusterlist`
244
+ flag is given, the program will take a list of clusters from `default` group from
245
+ configuration. Instead of a list of URLs, the user can also give a name of a cluster
246
+ group from configuration that the program will then look up, e. g.
247
+ `--clusterlist=vega`. Refer to *Configuration* section example for more info.
248
+ The list of enabled clusters on aCT server can be obtained by running `act info`.
249
+
250
+ Another flag that can be given for submission command is `--webdav`. If this flag
251
+ is not given, the local job input files will be uploaded to internal data management
252
+ system of aCT. If this flag is provided without a value, the value will be taken
253
+ from configuration file. The client will treat the value as a URL to WebDAV
254
+ directory and upload input files there. If this flag is given a value, it will
255
+ be used as a URL.
256
+
257
+ **WARNING**: Currently, if you use explicit URL for a particular group of jobs
258
+ that is different from the one in configuration or if configuration does not
259
+ have WebDAV URL specified, you have to use the `--webdav` flag with the same URL
260
+ for any subsequent `act clean`, `act get` or `act kill` command on those jobs for
261
+ the client to properly clean up all data files from given location. Otherwise,
262
+ the files would start to pile up and have to be deleted manually.
263
+
264
+ **WARNING**: If you check status of submitted jobs immediately after submission,
265
+ the submitted jobs will have empty state. aCT periodically checks for freshly
266
+ submitted jobs and assigns a proper state to them (period is determined by
267
+ server configuration). However, if jobs remain in an empty state for a longer
268
+ period of time, there is probably something wrong and the user has to kill such
269
+ jobs to remove them from the system.
270
+
271
+ **WARNING**: Currently, there is no indicator on how job submission is
272
+ progressing. If you submit many jobs with big files it can take a while for
273
+ submission of all to be finished and results to be printed.
274
+
275
+ **WARNING**: There is a brief period of time in the beginning of job submission
276
+ process where signals are ignored. It may thus appear as if submission cannot be
277
+ cancelled. In such case, you can continue trying to cancel it using ctrl+c.
278
+
279
+ ## Job status
280
+ To check the status of all jobs, run the following command:
281
+ `(act-venv) $ act stat -a`
282
+ It prints a table of values that provide information on jobs managed by aCT.
283
+ The default values provide for instance the ID of a job, its name, ID in ARC
284
+ middleware and states in ARC middleware as well as in aCT.
285
+ The `stat` command has several parameters for filtering jobs based in ID, name
286
+ and state. It also takes two flags, `--arc` and `--client` that allow the user
287
+ to specify exactly which job attributes they want to be printed.
288
+ `act stat --get-cols` should be consulted for info on which attributes can be queried.
289
+
290
+ ## Fetching and resubmitting failed jobs
291
+ Jobs in `failed` state can be fetched using `act fetch`. aCT will download any
292
+ outputs and mark jobs `donefailed`. Jobs that are `failed` can also be
293
+ resubmitted using `act resub`.
294
+
295
+ ## Downloading job results
296
+ The results of jobs in `done` or `donefailed` state can be downloaded using the
297
+ command `act get`. `donefailed` jobs sometimes don't have results available.
298
+ The results will be downloaded to the current directory. For every job a directory
299
+ with a hash name of its ARC ID will be created and output files will be stored in
300
+ that directory (as is with `arcget` from ARC Client tools). Successfully downloaded
301
+ jobs are automatically cleaned from the system.
302
+
303
+ ## Killing and cleaning jobs
304
+ Command `act kill` is used to kill jobs that are in one of the submission or running
305
+ states or if their state is empty (freshly submitted jobs that are waiting to be
306
+ passed on to ARC middleware). Jobs with empty state are also cleaned from the
307
+ system automatically. Any jobs that aCT started to process eventually have to be
308
+ cleaned from the system. This happens automatically with successful `act get`
309
+ operation or by excplicitly using `act clean` on certain terminal states like
310
+ `failed`, `done`, `donefailed`, `cancelled`.
311
+
312
+ ## Ctrl+C
313
+ aCT client programs have to perform proper cleanup of jobs and data files in case
314
+ of certain errors or specific conditions, like ctrl+c. That means that program
315
+ execution cannot always be stopped immediately. Programs that have to perform
316
+ proper cleanup and can take a while before they stop if they are cancelled with
317
+ ctrl+c are `act get` and `act sub`. Programs `act kill` and `act clean` can also
318
+ perform longer cleanup but they cannot be cancelled as cleanup is their only
319
+ operation.
320
+
321
+ ## License
322
+ This project is licensed under the [Apache License 2.0](LICENSE).