Skip to content

Develop Context class in context.py #32

@ubdbra001

Description

@ubdbra001

The Context class needs to be added, and functionality needs to be developed.

It should reflect the protocols listed here

This class reflects the context for an individual file in a dataset, and so should be instantiated with path to the file in question and the Dataset object for that file.

Functionality that needs to be added:

  • schema: Can be accessed from Dataset object
  • dataset: Passed on creation
  • subject: From entities? Need to develop Subject class?
  • path: Generated in the FileParts object
  • size: os.path.getsize()?
  • entities: Generated in the FileParts object
  • datatype: Generated in the FileParts object
  • suffix: Generated in the FileParts object
  • extension: Generated in the FileParts object
  • modality: From datatype?
  • sidecar: Needs to use load_sidecar and `walk_back'?
  • associations: Need to develop Associations class
  • columns: If the current file has .tsv extesion then parse? What to use to parse?
  • json: If current file has .json extension then parse using JSON module?
  • gzip: Python has in-built gzip module, not sure how to read the header specifically. Need to develop GZip class?
  • nifti_header: Need to develop NiftiHeader class. Can use nibabel for most of this, will likely need guidance.
  • ome: Need to develop Ome class. Never heard of OME before, so will need guidance.
  • tiff: Need to develop Tiff class

I'll start work on the parts that don't require additional classes, but as suggested I'll create stubs for everything else.

@effigies does this look broadly correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions