Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B bob.io.stream
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bob
  • bob.io.stream
  • Merge requests
  • !10

Merged
Created Sep 08, 2020 by Vincent POLLET@vpolletMaintainer

Accept file handle

  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 1

Allow StreamFile class to accept a file handle of the hdf5 file, and use bob.io.base.HDF5File only if a path is provided.

Advantage:

  • Allows to use bob.io.stream with different back-end for interacting with hdf5 library.

Drawback:

  • Less clear who is in charge of opening and closing the file: in the case a string is received, StreamFile handles opening and closing - in the case a file handle is given, the owner of the file must take care of it.
  • If someone provides a file handle which doesn't have a "lread" function, reading will fail and the error won't be very helpful. Concretely, it would be good to list the "back-end" that will work ?
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: accept_file_handle