DRAGONS icon indicating copy to clipboard operation
DRAGONS copied to clipboard

Inconsistent behavior when using tox

Open b1quint opened this issue 3 years ago • 8 comments

The tests in GitHub Actions are failing while the same tests pass when using Jenkin. You can see the traceback from the latest errors in GitHub Actions here. The traceback itself is a bit obscure.

When calling tox locally, the tests also fail. After trying several options, I realized that they fail when tox is called without any arguments. For example:

$ tox -e py37-unit                                                                                                                                                                                                           

Sometimes the error is the same reported on GitHub Actions, but most of the time the test failures have a different traceback. I am not completely sure that both issues are the same, if they are correlated somehow, or if they are simply two different issues.

The major requirement for our Tox setup is that we can run the tests using the command line above locally. So I will focus on this particular issue. The main error shows as:

_ ERROR collecting .tox/py37-unit/lib/python3.7/site-packages/recipe_system/cal_service/tests/test_caldb.py _
../../.tox/py37-unit/lib/python3.7/site-packages/recipe_system/cal_service/tests/test_caldb.py:12: in <module>
    from geminidr.gmos.primitives_gmos_longslit import GMOSLongslit
<frozen importlib._bootstrap>:983: in _find_and_load
    ???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:677: in _load_unlocked
    ???
../../.tox/py37-unit/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:170: in exec_module
    exec(co, module.__dict__)
../../.tox/py37-unit/lib/python3.7/site-packages/geminidr/gmos/primitives_gmos_longslit.py:21: in <module>
    from geminidr.core.primitives_spect import _transpose_if_needed
<frozen importlib._bootstrap>:983: in _find_and_load
    ???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:677: in _load_unlocked
    ???
../../.tox/py37-unit/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:170: in exec_module
    exec(co, module.__dict__)
../../.tox/py37-unit/lib/python3.7/site-packages/geminidr/core/__init__.py:8: in <module>
    from .primitives_spect import Spect
<frozen importlib._bootstrap>:983: in _find_and_load
    ???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:677: in _load_unlocked
    ???
../../.tox/py37-unit/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:170: in exec_module
    exec(co, module.__dict__)
../../.tox/py37-unit/lib/python3.7/site-packages/geminidr/core/primitives_spect.py:42: in <module>
    from geminidr.interactive.fit.aperture import interactive_find_source_apertures
<frozen importlib._bootstrap>:983: in _find_and_load
    ???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:677: in _load_unlocked
    ???
../../.tox/py37-unit/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:170: in exec_module
    exec(co, module.__dict__)
../../.tox/py37-unit/lib/python3.7/site-packages/geminidr/interactive/fit/aperture.py:4: in <module>
    import holoviews as hv
../../.tox/py37-unit/lib/python3.7/site-packages/holoviews/__init__.py:9: in <module>
    reponame="holoviews"))
../../.tox/py37-unit/lib/python3.7/site-packages/param/version.py:278: in __str__
    known_stale = self._known_stale()
../../.tox/py37-unit/lib/python3.7/site-packages/param/version.py:223: in _known_stale
    commit = self.commit
../../.tox/py37-unit/lib/python3.7/site-packages/param/version.py:133: in commit
    return self.fetch()._commit
../../.tox/py37-unit/lib/python3.7/site-packages/param/version.py:162: in fetch
    self.git_fetch(cmd)
../../.tox/py37-unit/lib/python3.7/site-packages/param/version.py:212: in git_fetch
    self._update_from_vcs(output)
../../.tox/py37-unit/lib/python3.7/site-packages/param/version.py:259: in _update_from_vcs
    self._commit_count = int(split[1])
E   ValueError: invalid literal for int() with base 10: 'dev'

The full traceback is here: py37-unit.log

b1quint avatar May 05 '21 14:05 b1quint