prjemian / punx

Python Utilities for NeXus HDF5 files
https://prjemian.github.io/punx
5 stars 7 forks source link

update CI #228

Closed prjemian closed 1 year ago

prjemian commented 1 year ago
prjemian commented 1 year ago

Running workflow locally using nektos/act. Why is this code failing now? https://github.com/prjemian/punx/blob/307df8a4479a64a47e19a7469564dbdcafc07fb6/punx/cache_manager.py#L462

| punx/tests/test_cache_manager.py::test_instance FAILED                   [  0%]
| 
| =================================== FAILURES ===================================
| ________________________________ test_instance _________________________________
| 
|     def test_instance():
| >       cm = cache_manager.CacheManager()
| 
| punx/tests/test_cache_manager.py:19: 
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
| punx/singletons.py:22: in __call__
|     self._instances[self] = super(_Singleton, self).__call__(*args, **kwargs)
| punx/cache_manager.py:280: in __init__
|     self.user = UserCache()
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
| 
| self = <punx.cache_manager.UserCache object at 0x7f55fac5cc10>
| 
|     def __init__(self):
|         self.qsettings = QtCore.QSettings(
|             QtCore.QSettings.IniFormat,
|             QtCore.QSettings.UserScope,
|             __settings_organization__,
|             __settings_package__,
|         )
|     
|         path = self.path
|         if not os.path.exists(path):
| >           os.mkdir(path)
| E           FileNotFoundError: [Errno 2] No such file or directory: '/root/.config/punx'
| 
| punx/cache_manager.py:462: FileNotFoundError
| =========================== short test summary info ============================
| FAILED punx/tests/test_cache_manager.py::test_instance - FileNotFoundError: [Errno 2] No such file or directory: '/root/.config/punx'
| !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
| ========================= 1 failed, 1 passed in 0.98s ==========================
prjemian commented 1 year ago

Does not fail in GHA. Moving on...

prjemian commented 1 year ago

Refactor with pathlib.

prjemian commented 1 year ago

Encountered this exception: ImportError: cannot import name 'Reporter' from 'coverage.report' Seen that one before. Move the install of coveralls and coverage later, by pip as shown in spec2nexus.

coveralls commented 1 year ago

Coverage Status

coverage: 95.553% (+0.05%) from 95.5% when pulling 1d0142c1f515dbf75c7bb319b39491880562c888 on 227-CI-workflows into 307df8a4479a64a47e19a7469564dbdcafc07fb6 on main.

prjemian commented 1 year ago

Strange. Py3.7 workflow runs but skips the tests. Dropping this version from test matrix.