primitive 0.1.38__py3-none-any.whl → 0.1.40__py3-none-any.whl
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.
- primitive/__about__.py +1 -1
- primitive/agent/actions.py +47 -0
- primitive/lint/actions.py +1 -1
- {primitive-0.1.38.dist-info → primitive-0.1.40.dist-info}/METADATA +1 -1
- {primitive-0.1.38.dist-info → primitive-0.1.40.dist-info}/RECORD +8 -8
- {primitive-0.1.38.dist-info → primitive-0.1.40.dist-info}/WHEEL +0 -0
- {primitive-0.1.38.dist-info → primitive-0.1.40.dist-info}/entry_points.txt +0 -0
- {primitive-0.1.38.dist-info → primitive-0.1.40.dist-info}/licenses/LICENSE.txt +0 -0
primitive/__about__.py
CHANGED
primitive/agent/actions.py
CHANGED
@@ -9,6 +9,9 @@ import yaml
|
|
9
9
|
from ..utils.yaml import generate_script_from_yaml
|
10
10
|
from ..utils.cache import get_sources_cache
|
11
11
|
|
12
|
+
import os
|
13
|
+
import subprocess
|
14
|
+
|
12
15
|
try:
|
13
16
|
from yaml import CLoader as Loader
|
14
17
|
except ImportError:
|
@@ -194,6 +197,50 @@ class Agent(BaseAction):
|
|
194
197
|
)
|
195
198
|
|
196
199
|
logger.debug("Sim Job Completed")
|
200
|
+
case "backend":
|
201
|
+
logger.debug(
|
202
|
+
f"Starting backend run for source: {source_dir}"
|
203
|
+
)
|
204
|
+
|
205
|
+
os.chdir(source_dir)
|
206
|
+
logger.debug(
|
207
|
+
f"Changed to {source_dir}, starting backend run"
|
208
|
+
)
|
209
|
+
try:
|
210
|
+
result = subprocess.run(
|
211
|
+
cmd, capture_output=True, text=True, env=os.environ
|
212
|
+
)
|
213
|
+
except FileNotFoundError:
|
214
|
+
message = f"Did not find {cmd}"
|
215
|
+
logger.error(message)
|
216
|
+
return False, message
|
217
|
+
|
218
|
+
logger.debug("Backend run complete.")
|
219
|
+
|
220
|
+
message = ""
|
221
|
+
if result.stderr:
|
222
|
+
logger.error("\n" + result.stderr)
|
223
|
+
if result.stdout:
|
224
|
+
logger.info("\n" + result.stdout)
|
225
|
+
message = "See above logs for sim output."
|
226
|
+
|
227
|
+
if result.returncode != 0:
|
228
|
+
if not self.primitive.DEBUG:
|
229
|
+
message = result.stderr
|
230
|
+
return False, message
|
231
|
+
else:
|
232
|
+
message = "Backend run successful."
|
233
|
+
|
234
|
+
if result:
|
235
|
+
conclusion = "success"
|
236
|
+
else:
|
237
|
+
conclusion = "failure"
|
238
|
+
self.primitive.jobs.job_run_update(
|
239
|
+
job_run["id"],
|
240
|
+
status="request_completed",
|
241
|
+
conclusion=conclusion,
|
242
|
+
stdout=message,
|
243
|
+
)
|
197
244
|
|
198
245
|
# Clean up
|
199
246
|
shutil.rmtree(path=downloaded_git_repository_dir)
|
primitive/lint/actions.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: primitive
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.40
|
4
4
|
Project-URL: Documentation, https://github.com//primitivecorp/primitive-cli#readme
|
5
5
|
Project-URL: Issues, https://github.com//primitivecorp/primitive-cli/issues
|
6
6
|
Project-URL: Source, https://github.com//primitivecorp/primitive-cli
|
@@ -1,8 +1,8 @@
|
|
1
|
-
primitive/__about__.py,sha256=
|
1
|
+
primitive/__about__.py,sha256=rhBKiteT-fftG_0RIuvu8LNrE6oKVyABvCROLb5Oxr8,130
|
2
2
|
primitive/__init__.py,sha256=bwKdgggKNVssJFVPfKSxqFMz4IxSr54WWbmiZqTMPNI,106
|
3
3
|
primitive/cli.py,sha256=VQPSewC6ouGdEG9W1gllawGJTydpOY0Lzg7LURXcqQg,2374
|
4
4
|
primitive/client.py,sha256=SFPG4H2wJao8euGdnYp-l7dk_fDpWeVn2aT2WNJUAqo,2370
|
5
|
-
primitive/agent/actions.py,sha256=
|
5
|
+
primitive/agent/actions.py,sha256=sSyQ4XMuSwyE8sEPx8oTOl24LDAZ7AbW85ESEcsMkuE,10557
|
6
6
|
primitive/agent/commands.py,sha256=-dVDilELfkGfbZB7qfEPs77Dm1oT62qJj4tsIk4KoxI,254
|
7
7
|
primitive/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
primitive/auth/actions.py,sha256=N2bGcwXNsB89pzs66gF9A5_WzUScY5fhfOyWixqo2y8,1054
|
@@ -22,7 +22,7 @@ primitive/hardware/actions.py,sha256=JJXEeW35QzVGcLN4ym5gYZwY71hxLzM1GYPXWaObEts
|
|
22
22
|
primitive/hardware/commands.py,sha256=QE7LLeFdfOqlvz3JwdwJJRZAY3fHI1zB9kYmmDajpq0,1477
|
23
23
|
primitive/jobs/actions.py,sha256=LpUJN-GOiDSehQANfV_F86eRRKPZ2ew9skKdnlalXU4,7734
|
24
24
|
primitive/jobs/commands.py,sha256=MxPCkBEYW_eLNqgCRYeyj7ZcLOFAWfpVZlqDR2Y_S0o,830
|
25
|
-
primitive/lint/actions.py,sha256=
|
25
|
+
primitive/lint/actions.py,sha256=tWsrht1dowGprcZjEUtjCJzozEQmh9sv2_C2__YHIOI,2825
|
26
26
|
primitive/lint/commands.py,sha256=3CZvkOEMpJspJWmaQzA5bpPKx0_VCijQIXA9l-eTnZE,487
|
27
27
|
primitive/organizations/actions.py,sha256=e0V4E1UK1IcBJsWWH6alHYUmArhzPrBqZ8WkHPIcLq0,2268
|
28
28
|
primitive/organizations/commands.py,sha256=_dwgVEJCqMa5VgB_7P1wLPFc0AuT1p9dtyR9JRr4kpw,487
|
@@ -42,8 +42,8 @@ primitive/utils/printer.py,sha256=f1XUpqi5dkTL3GWvYRUGlSwtj2IxU1q745T4Fxo7Tn4,37
|
|
42
42
|
primitive/utils/shell.py,sha256=-7UjQaBqSGHzEEyX8pNjeYFFP0P3lVnDV0OkgPz1qHU,1050
|
43
43
|
primitive/utils/verible.py,sha256=r7c_hfqvL0UicMmIzK3Cy_BfZI1ZpcfBeLqKEWFWqJo,2252
|
44
44
|
primitive/utils/yaml.py,sha256=4UP_9MXHoNb9_SCeUDm9xqYg9sHltqpVhNgsY6GNfb8,527
|
45
|
-
primitive-0.1.
|
46
|
-
primitive-0.1.
|
47
|
-
primitive-0.1.
|
48
|
-
primitive-0.1.
|
49
|
-
primitive-0.1.
|
45
|
+
primitive-0.1.40.dist-info/METADATA,sha256=I-gxl-UCmWoXG6tiikEIHekpqedm-ksRwPmnqtnrObE,3782
|
46
|
+
primitive-0.1.40.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
47
|
+
primitive-0.1.40.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
|
48
|
+
primitive-0.1.40.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
|
49
|
+
primitive-0.1.40.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|