From 60829eebd2ac65d21e93c55d53394308ccb99690 Mon Sep 17 00:00:00 2001 From: "Jose M. de la Rosa" Date: Mon, 26 Feb 2024 16:06:12 -0600 Subject: [PATCH 1/3] Minor update of inputCount in SetMonitor --- emtools/pwx/monitors.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emtools/pwx/monitors.py b/emtools/pwx/monitors.py index 79e3d8d..28f1b43 100644 --- a/emtools/pwx/monitors.py +++ b/emtools/pwx/monitors.py @@ -123,6 +123,7 @@ def __init__(self, SetClass, filename, *args, **kwargs): self._filename = filename self.lastUpdate = None self.streamClosed = None + self.inputCount = 0 # Count all input elements # Black list some items to not be monitored again # We are not interested in the items but just skip them from @@ -141,6 +142,7 @@ def update(self): setInstance = self._SetClass(filename=self._filename) setInstance.loadAllProperties() for item in setInstance.iterItems(): + self.inputCount += 1 iid = item.getObjId() if iid not in self: itemClone = item.clone() @@ -170,10 +172,10 @@ def iterProtocolInput(self, prot, label, waitSecs=60): else: prot.info(f"No output {label}.") - for newMovie in self.newItems(sleep=waitSecs): - yield newMovie + for newItem in self.newItems(sleep=waitSecs): + yield newItem - prot.info(f"No more movies, stream closed. Total: {len(self)}") + prot.info(f"No more {label}, stream closed. Total: {len(self)}") class BatchManager: From 57d22f02237a40b0bf2da5279fb23ef97fb29032 Mon Sep 17 00:00:00 2001 From: "Jose M. de la Rosa" Date: Sun, 3 Mar 2024 11:02:39 -0600 Subject: [PATCH 2/3] Minor update in Scipion OTF script --- emtools/scripts/emt-scipion-otf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emtools/scripts/emt-scipion-otf.py b/emtools/scripts/emt-scipion-otf.py index 6acbfff..6155cdf 100755 --- a/emtools/scripts/emt-scipion-otf.py +++ b/emtools/scripts/emt-scipion-otf.py @@ -431,7 +431,7 @@ def continue_project(workingDir): print(f"Run {run.getObjId()}: {clsName}") if clsName == 'ProtRelionExtractParticles': protExtract = run - elif clsName == 'SphireProtCRYOLOPicking': + elif clsName.startswith('SphireProtCRYOLOPicking'): protCryolo = run if not protExtract.isActive(): @@ -629,7 +629,11 @@ def _get_keys(tokens): protPicking = prot if protCtf: - ctfs = protCtf.outputCTF + if hasattr(protCtf, 'outputCTF'): + ctfs = protCtf.outputCTF + else: + ctfs = protCtf.outputSet # case of union, FIXME: validate other non-valid + print_prot(protCtf, label='CTF protocol') print(f" CTFs: {ctfs.getSize()}") write_micrographs_star('micrographs_ctf.star', ctfs) From b69c53e2c350fb73d981e0c1df5dbae0f05e54ba Mon Sep 17 00:00:00 2001 From: "J.M de la Rosa Trevin" Date: Sun, 3 Mar 2024 11:06:14 -0600 Subject: [PATCH 3/3] Updated version and publish workflow --- .github/workflows/publish_and_tag.yml | 4 ++-- emtools/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish_and_tag.yml b/.github/workflows/publish_and_tag.yml index 5735587..698e6f7 100644 --- a/.github/workflows/publish_and_tag.yml +++ b/.github/workflows/publish_and_tag.yml @@ -27,8 +27,8 @@ jobs: pip install setuptools wheel twine - name: Build and publish env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_USERNAME: ${{ __token__ }} + TWINE_PASSWORD: ${{ secrets.PYPI_JMRT_TOKEN }} run: | python setup.py sdist bdist_wheel twine upload dist/* diff --git a/emtools/__init__.py b/emtools/__init__.py index f0c9a67..3fc9a10 100644 --- a/emtools/__init__.py +++ b/emtools/__init__.py @@ -24,5 +24,5 @@ # * # ************************************************************************** -__version__ = '0.0.10' +__version__ = '0.0.11'