Skip to content

Conversation

@dmitriyrepin
Copy link
Contributor

@dmitriyrepin dmitriyrepin commented Oct 13, 2025

In order to address the Issue 613 Open handles not properly cleaned up (closes #613) introduce

class SegyFileAsync(SegyFile):
    """SEG-Y file that can be instantiated side by side with Zarr for cloud access.

    This is a workaround for Zarr issues 3487 'Explicitly using fsspec and zarr FsspecStore causes
    RuntimeError "Task attached to a different loop"'

    # TODO (Dmitriy Repin): when Zarr issue 3487 is resolved, we can remove this workaround
    # https://github.com/zarr-developers/zarr-python/issues/3487

    Args:
        url: Path to the SEG-Y file.
        spec: SEG-Y specification.
        settings: SEG-Y settings.
        header_overrides: SEG-Y header overrides.
    """

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 81.70732% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.84%. Comparing base (c3ba558) to head (7775e26).
⚠️ Report is 192 commits behind head on main.

Files with missing lines Patch % Lines
src/mdio/segy/file.py 79.36% 12 Missing and 1 partial ⚠️
src/mdio/segy/_workers.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #712      +/-   ##
==========================================
+ Coverage   85.30%   88.84%   +3.53%     
==========================================
  Files          46       85      +39     
  Lines        2219     4561    +2342     
  Branches      306      297       -9     
==========================================
+ Hits         1893     4052    +2159     
- Misses        281      439     +158     
- Partials       45       70      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tasansal tasansal changed the title SegyFileAsync to fix Issue 613 Open handles not properly cleaned up Wrap SegyFile to handle asyncio loop conflicts with Zarr. Oct 14, 2025
Copy link
Collaborator

@BrianMichell BrianMichell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Tested with cloud-to-cloud ingestion and the errors did not show up.

@BrianMichell BrianMichell added the bug Something isn't working label Oct 14, 2025
@BrianMichell BrianMichell merged commit 88d178d into TGSAI:main Oct 14, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open handles not properly cleaned up

3 participants