spacetelescope / stpipe

https://stpipe.readthedocs.io
Other
3 stars 25 forks source link

make_output_path components is poorly documented #189

Open emolter opened 6 days ago

emolter commented 6 days ago

The documentation here is confusing for the components argument to make_output_path. An example would be extremely helpful. Digging into the code for 20 minutes, I still couldn't figure out what the format of this is supposed to be.

If I pass in any old dictionary, e.g. {"asn_id":"foo", "slit_name":"bar"} it seems to interpret that as a string literal.

There is also no example making use of the components keyword argument in the docs here.

stscieisenhamer commented 4 days ago

guilty party here and available for consultation after end of current sprint (7oct24)

emolter commented 4 days ago

Thanks @stscieisenhamer. I think part of my confusion was coming from usage of functools.partial operating on the components kwargs of make_output_path upstream of where I got confused, which is my fault. However I still think some additional documentation and examples would be helpful