bluesky / suitcase-tiff

http://nsls-ii.github.io/suitcase
Other
2 stars 5 forks source link

ENH/API: add zero-padding to the frame number #42

Closed tacaswell closed 2 years ago

tacaswell commented 3 years ago

This was identified by @danolds and


I am getting alot of local failures that look like with and these changes, seeing if CI agrees:

_______________________________________________________________________________________________ test_file_prefix_stream_name_field_formatting[one_stream_multi_descriptors_plan-<lambda>-event_page] _______________________________________________________________________________________________

example_data = <function example_data.<locals>._example_data_func at 0x7f127067e8b0>, tmp_path = PosixPath('/tmp/pytest-of-tcaswell/pytest-12/test_file_prefix_stream_name_f35')

    def test_file_prefix_stream_name_field_formatting(example_data, tmp_path):
        '''
        Runs a test of ``file_prefix`` formatting including ``field``
        and ``stream_name``.

        ..note::

            Due to the `example_data` `pytest.fixture` this will run multiple tests
            each with a range of detectors and event_types. See `suitcase.utils.conftest`
            for more info.

        '''
        collector = example_data()
        file_prefix = "test-{stream_name}-{field}/{start[uid]}-"
>       artifacts = export(collector, tmp_path, file_prefix=file_prefix)

suitcase/tiff_stack/tests/tests.py:73: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
suitcase/tiff_stack/__init__.py:115: in export
    serializer(*item)
suitcase/tiff_stack/__init__.py:322: in __exit__
    self.close()
suitcase/tiff_stack/__init__.py:316: in close
    self._manager.close()
../../../../.virtualenvs/sys38/lib/python3.8/site-packages/suitcase/utils/__init__.py:266: in close
    a.handle.close()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def wrapped_close():
>       handle.seek(0, os.SEEK_END)
E       ValueError: seek of closed file

../../../../.virtualenvs/sys38/lib/python3.8/site-packages/suitcase/utils/__init__.py:93: ValueError
tacaswell commented 3 years ago

attn @st3107

mrakitin commented 2 years ago

Power-cycled to pick up the GHA CI configs.

Looks like it was handled by #45 (https://github.com/bluesky/suitcase-tiff/pull/45/commits/1af3ebd581c10b3dc111496b9c58472ce9e505c4). Should we still have this fix? Is it ready?