Details
-
Type:
Story
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: daf_butler, obs_base, pipe_base
-
Labels:None
-
Team:Architecture
-
Urgent?:No
Description
Quite a few middleware-related python objects don't have a useful string representation. I've listed the ones I know about below, with suggestions for how to implement stringification.
obs_base
- Instrument
- FilterDefinitions: repr could duplicate str?
pipe_base
- Pipeline: the str could be the instrument and description fields?
- PipelineTaskConnections
- QuantumGraph
daf_butler
- Butler: at minimum, repr should match str.
- Registry: repr almost looks more useful to me; str is just a long string with the path.
- Datastore: str/repr exist, but could be more useful[1].
- StorageClassFactory: repr could duplicate str?
- RegistryDefaults
1)
>>> str(self.butler.datastore)
|
'file:///var/folders/1s/x4hsw5kj4pdbnlvfw75zzkv40000gq/T/tmpccyrt726/'
|
>>> repr(self.butler.datastore)
|
'FileDatastore@<butlerRoot>'
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Quite a few middleware-related python objects don't have a useful string representation. I've listed the ones I know about below, with suggestions for how to implement stringification.
*obs_base* * Instrument * FilterDefinitions: repr could duplicate str? *pipe_base* * Pipeline: the str could be the instrument and description fields? *daf_butler* * Butler: at minimum, repr should match str. * Registry: repr almost looks more useful to me; str is just a long string with the path. * Datastore: str/repr exist, but could be more useful[1]. * StorageClassFactory: repr could duplicate str? * RegistryDefaults 1) {code} >>> str(self.butler.datastore) 'file:///var/folders/1s/x4hsw5kj4pdbnlvfw75zzkv40000gq/T/tmpccyrt726/' >>> repr(self.butler.datastore) 'FileDatastore@<butlerRoot>' {code} |
Quite a few middleware-related python objects don't have a useful string representation. I've listed the ones I know about below, with suggestions for how to implement stringification.
*obs_base* * Instrument * FilterDefinitions: repr could duplicate str? *pipe_base* * Pipeline: the str could be the instrument and description fields? * PipelineTaskConnections *daf_butler* * Butler: at minimum, repr should match str. * Registry: repr almost looks more useful to me; str is just a long string with the path. * Datastore: str/repr exist, but could be more useful[1]. * StorageClassFactory: repr could duplicate str? * RegistryDefaults 1) {code} >>> str(self.butler.datastore) 'file:///var/folders/1s/x4hsw5kj4pdbnlvfw75zzkv40000gq/T/tmpccyrt726/' >>> repr(self.butler.datastore) 'FileDatastore@<butlerRoot>' {code} |
Description |
Quite a few middleware-related python objects don't have a useful string representation. I've listed the ones I know about below, with suggestions for how to implement stringification.
*obs_base* * Instrument * FilterDefinitions: repr could duplicate str? *pipe_base* * Pipeline: the str could be the instrument and description fields? * PipelineTaskConnections *daf_butler* * Butler: at minimum, repr should match str. * Registry: repr almost looks more useful to me; str is just a long string with the path. * Datastore: str/repr exist, but could be more useful[1]. * StorageClassFactory: repr could duplicate str? * RegistryDefaults 1) {code} >>> str(self.butler.datastore) 'file:///var/folders/1s/x4hsw5kj4pdbnlvfw75zzkv40000gq/T/tmpccyrt726/' >>> repr(self.butler.datastore) 'FileDatastore@<butlerRoot>' {code} |
Quite a few middleware-related python objects don't have a useful string representation. I've listed the ones I know about below, with suggestions for how to implement stringification.
*obs_base* * Instrument * FilterDefinitions: repr could duplicate str? *pipe_base* * Pipeline: the str could be the instrument and description fields? * PipelineTaskConnections * QuantumGraph *daf_butler* * Butler: at minimum, repr should match str. * Registry: repr almost looks more useful to me; str is just a long string with the path. * Datastore: str/repr exist, but could be more useful[1]. * StorageClassFactory: repr could duplicate str? * RegistryDefaults 1) {code} >>> str(self.butler.datastore) 'file:///var/folders/1s/x4hsw5kj4pdbnlvfw75zzkv40000gq/T/tmpccyrt726/' >>> repr(self.butler.datastore) 'FileDatastore@<butlerRoot>' {code} |
For Pipeline, do you mean you would like the repr to be something different, because the string form is the pipeline itself.