Develop `Context` class in context.py

Aperta
#32 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Una pull request collegata è già stata integrata.

  • #34 di @ubdbra001 — integrata

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Inizia in context.py e confronta la superficie proposta di Context con la documentazione del protocollo Context, quindi segui Dataset e FileParts per i valori già identificati. Conferma l'ambito rimanente per associations, ome e tiff e come debbano essere rappresentate le relative classi; il lavoro è completato quando Context copre il protocollo ed espone i metadati dei file elencati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
Python
Stelle
10
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bids-standard/python-validator

Tutte le issue di bids-standard/python-validator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.