Skip to content
GitLab
Projects Groups Snippets
  • /
  • 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
  • bobbob
  • bob.io.stream
  • Merge requests
  • !8

Accept file handle

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Vincent POLLET requested to merge accept_file_handle into master Sep 07, 2020
  • Overview 1
  • Commits 17
  • Pipelines 2
  • Changes 7

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 ?
Edited Sep 07, 2020 by Vincent POLLET
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: accept_file_handle