Skip to content

Commit

Permalink
Merge pull request #7 from 3dem/devel
Browse files Browse the repository at this point in the history
Minor release 0.0.11
  • Loading branch information
delarosatrevin authored Mar 3, 2024
2 parents 6cb44b3 + b69c53e commit dc5b4c8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish_and_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand Down
2 changes: 1 addition & 1 deletion emtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
# *
# **************************************************************************

__version__ = '0.0.10'
__version__ = '0.0.11'

8 changes: 5 additions & 3 deletions emtools/pwx/monitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions emtools/scripts/emt-scipion-otf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dc5b4c8

Please sign in to comment.