pzserver 0.2.6__tar.gz → 0.2.7__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.
- {pzserver-0.2.6 → pzserver-0.2.7}/.github/workflows/build-documentation.yml +1 -1
- {pzserver-0.2.6 → pzserver-0.2.7}/.pre-commit-config.yaml +20 -20
- {pzserver-0.2.6 → pzserver-0.2.7}/PKG-INFO +1 -1
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/_version.py +2 -2
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/core.py +24 -7
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/process.py +17 -9
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver.egg-info/PKG-INFO +1 -1
- {pzserver-0.2.6 → pzserver-0.2.7}/.copier-answers.yml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.devcontainer/Dockerfile +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.devcontainer/devcontainer.json +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.devcontainer/docker-compose.yml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.github/workflows/linting.yml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.github/workflows/publish-to-pypi.yml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.github/workflows/smoke-test.yml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.github/workflows/testing-and-coverage.yml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.gitignore +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/.readthedocs.yml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/LICENSE +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/README.md +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/__init__.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/Makefile +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/conf.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/index.rst +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/installation.rst +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/make.bat +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/nbs.rst +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/example.csv +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/example.html +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/example.ipynb +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/images/ScreenShotTokenGenerator.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/images/ScreenShotTokenMenu.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/images/ScreenshotProductListButtons.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/images/linea.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/images/linea_darkblue.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/images/rubin.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/pzserver_tutorial.ipynb +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/qa_notebooks/public-specz-compilation.ipynb +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/qa_notebooks/public-training-set-des-dr2.ipynb +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/rst/output_70_1.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/rst/output_71_1.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/rst/output_78_1.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/rst/output_79_1.png +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/rst/pzserver_tutorial.rst +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/pyproject.toml +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/requirements-dev.txt +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/requirements.txt +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/setup.cfg +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/.pylintrc +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/__init__.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/catalog.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/communicate.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/pipeline.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver/upload.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver.egg-info/SOURCES.txt +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver.egg-info/dependency_links.txt +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver.egg-info/requires.txt +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/src/pzserver.egg-info/top_level.txt +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/tests/.pylintrc +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/tests/pzserver/conftest.py +0 -0
- {pzserver-0.2.6 → pzserver-0.2.7}/tests/pzserver/test_catalog.py +0 -0
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
sudo apt-get install pandoc
|
|
31
31
|
- name: Build docs
|
|
32
32
|
run: |
|
|
33
|
-
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html -D exclude_patterns="notebooks
|
|
33
|
+
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html -D exclude_patterns="notebooks/*/*.ipynb"
|
|
34
34
|
- name: Run ghp-import
|
|
35
35
|
run: |
|
|
36
36
|
ghp-import -n -p -f -x docs/ docs/build/html
|
|
@@ -103,25 +103,25 @@ repos:
|
|
|
103
103
|
# notebooks from the docs, so users don't have to wait through the execution
|
|
104
104
|
# of each notebook or each commit. By default, these will be checked in the
|
|
105
105
|
# GitHub workflows.
|
|
106
|
-
|
|
106
|
+
- repo: local
|
|
107
107
|
hooks:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
108
|
+
- id: sphinx-build
|
|
109
|
+
name: Build documentation with Sphinx
|
|
110
|
+
entry: sphinx-build
|
|
111
|
+
language: system
|
|
112
|
+
always_run: true
|
|
113
|
+
exclude_types: [file, symlink]
|
|
114
|
+
args:
|
|
115
|
+
[
|
|
116
|
+
"-M", # Run sphinx in make mode, so we can use -D flag later
|
|
117
|
+
# Note: -M requires next 3 args to be builder, source, output
|
|
118
|
+
"html", # Specify builder
|
|
119
|
+
"./docs", # Source directory of documents
|
|
120
|
+
"./build", # Output directory for rendered documents
|
|
121
|
+
"-T", # Show full trace back on exception
|
|
122
|
+
"-E", # Don't use saved env; always read all files
|
|
123
|
+
"-d", # Flag for cached environment and doctrees
|
|
124
|
+
"./docs/build/doctrees", # Directory
|
|
125
|
+
"-D", # Flag to override settings in conf.py
|
|
126
|
+
"exclude_patterns=notebooks/*/*.ipynb", # Exclude our notebooks from pre-commit
|
|
127
127
|
]
|
|
@@ -135,9 +135,9 @@ class PzServer:
|
|
|
135
135
|
names (optimized for use in Jupyter Notebook).
|
|
136
136
|
"""
|
|
137
137
|
results_dict = self.api.get_all("releases")
|
|
138
|
-
dataframe = pd.DataFrame(results_dict, columns=["display_name", "description"])
|
|
138
|
+
dataframe = pd.DataFrame(results_dict, columns=["name", "display_name", "description"])
|
|
139
139
|
dataframe.rename(
|
|
140
|
-
columns={"display_name": "Release", "description": "Description"},
|
|
140
|
+
columns={"name": "Name", "display_name": "Release", "description": "Description"},
|
|
141
141
|
inplace=True,
|
|
142
142
|
)
|
|
143
143
|
display(dataframe.style.hide(axis="index"))
|
|
@@ -475,7 +475,7 @@ class PzServer:
|
|
|
475
475
|
"""
|
|
476
476
|
return CSCProcess(name, self.api)
|
|
477
477
|
|
|
478
|
-
def
|
|
478
|
+
def training_set_maker(self, name):
|
|
479
479
|
"""
|
|
480
480
|
Make training set
|
|
481
481
|
|
|
@@ -487,7 +487,7 @@ class PzServer:
|
|
|
487
487
|
"""
|
|
488
488
|
return TSMProcess(name, self.api)
|
|
489
489
|
|
|
490
|
-
def
|
|
490
|
+
def run_and_wait(self, process):
|
|
491
491
|
"""
|
|
492
492
|
Wait for processing to finish (30 minute tolerance time)
|
|
493
493
|
|
|
@@ -499,11 +499,28 @@ class PzServer:
|
|
|
499
499
|
dict: process status
|
|
500
500
|
"""
|
|
501
501
|
|
|
502
|
-
retry =
|
|
502
|
+
retry = 60
|
|
503
503
|
process.run()
|
|
504
504
|
|
|
505
|
+
print("Process submitted successfully, waiting for completion...")
|
|
506
|
+
|
|
505
507
|
while process.check_status() in ("Running", "Pending") and retry:
|
|
506
|
-
time.sleep(
|
|
508
|
+
time.sleep(30)
|
|
507
509
|
retry = retry - 1
|
|
508
510
|
|
|
509
|
-
|
|
511
|
+
check_status = process.check_status()
|
|
512
|
+
|
|
513
|
+
if retry == 0:
|
|
514
|
+
msg = "This process is taking longer than 30 minutes, please "
|
|
515
|
+
msg += "continue monitoring it asynchronously with the "
|
|
516
|
+
msg += "check_status() method"
|
|
517
|
+
print(f"{FONTCOLORERR}{msg}{FONTCOLOREND}")
|
|
518
|
+
|
|
519
|
+
elif check_status == "Failed":
|
|
520
|
+
msg = f"Process failed with the following error: {process.output.get('error')}"
|
|
521
|
+
print(f"{FONTCOLORERR}{msg}{FONTCOLOREND}")
|
|
522
|
+
|
|
523
|
+
elif check_status == "Successful":
|
|
524
|
+
msg = f"Done! Results registered as ID={process.output.get('id')} "
|
|
525
|
+
msg += f"(internal_name: {process.output.get('internal_name')})"
|
|
526
|
+
print(msg)
|
|
@@ -110,6 +110,10 @@ class Process:
|
|
|
110
110
|
"""
|
|
111
111
|
self.__inputs.append(input_id)
|
|
112
112
|
|
|
113
|
+
def empty_input(self):
|
|
114
|
+
""" Empty inputs list
|
|
115
|
+
"""
|
|
116
|
+
self.__inputs = []
|
|
113
117
|
|
|
114
118
|
@property
|
|
115
119
|
def config(self):
|
|
@@ -265,12 +269,12 @@ class TSMProcess(Process):
|
|
|
265
269
|
"""
|
|
266
270
|
return self.__release
|
|
267
271
|
|
|
268
|
-
def set_release(self,
|
|
272
|
+
def set_release(self, name=None, release_id=None):
|
|
269
273
|
"""Set release
|
|
270
274
|
|
|
271
275
|
Args:
|
|
272
|
-
release_id (int, optional): release ID. Defaults to None.
|
|
273
276
|
name (str, optional): release name. Defaults to None.
|
|
277
|
+
release_id (int, optional): release ID. Defaults to None.
|
|
274
278
|
|
|
275
279
|
Raises:
|
|
276
280
|
ValueError: when neither release_id nor name is informed, the raise is triggered
|
|
@@ -303,7 +307,9 @@ class TSMProcess(Process):
|
|
|
303
307
|
ValueError: when neither specz_id nor internal_name is informed, the raise is triggered
|
|
304
308
|
"""
|
|
305
309
|
|
|
310
|
+
|
|
306
311
|
self.__specz = self.get_product(product_id=specz_id, internal_name=internal_name)
|
|
312
|
+
self.empty_input()
|
|
307
313
|
self.append_input(self.specz.get("id"))
|
|
308
314
|
|
|
309
315
|
def summary(self, extra_info=None):
|
|
@@ -387,15 +393,17 @@ class CSCProcess(Process):
|
|
|
387
393
|
"""
|
|
388
394
|
|
|
389
395
|
specz = self.get_product(product_id=specz_id, internal_name=internal_name)
|
|
396
|
+
specz_id = specz.get("id")
|
|
390
397
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
398
|
+
if not specz_id in self.inputs:
|
|
399
|
+
dn_specz = {
|
|
400
|
+
"name": specz.get("display_name"),
|
|
401
|
+
"internal_name": specz.get("internal_name"),
|
|
402
|
+
"id": specz_id,
|
|
403
|
+
}
|
|
396
404
|
|
|
397
|
-
|
|
398
|
-
|
|
405
|
+
self.__catalogs.append(dn_specz)
|
|
406
|
+
self.append_input(specz_id)
|
|
399
407
|
|
|
400
408
|
def summary(self, extra_info=None):
|
|
401
409
|
"""Summary of what will be executed"""
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/qa_notebooks/public-specz-compilation.ipynb
RENAMED
|
File without changes
|
{pzserver-0.2.6 → pzserver-0.2.7}/docs/notebooks/qa_notebooks/public-training-set-des-dr2.ipynb
RENAMED
|
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
|