glass-dev / glass

Generator for Large Scale Structure
https://glass.readthedocs.io
MIT License
35 stars 8 forks source link

`test_fits.py::test_out_filename` is accessing private functions from the `fitsio` library #239

Closed paddyroddy closed 1 month ago

paddyroddy commented 1 month ago

Describe the Bug

This is bad practice, as the external code cannot guarantee keeping internal functions with a consistent API. Are we happy with this? https://github.com/glass-dev/glass/blob/f7cedc9e5289f0505a15aff742ca0ff8bb4c180e/tests/test_fits.py#L93-L99

To Reproduce

import glass
...

Expected Behaviour

No response

Actual Behaviour

No response

Version In Use

2024.2.dev41+ga3f00f2.d20240918

Additional Context

No response

ntessore commented 1 month ago

Yeah, we can use get_filename() to obtain the same thing.

Saransh-cpp commented 1 month ago

I couldn't find a get_filename() in fitsio. Is the function somewhere else or am I missing something?