You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #6664, there was some discussion how to access test data in documentation. It would seem handy to have a general method. In #6664 (comment), I wrote and suggested:
I think there is a general question here of how to access test data files. In a package of my own, I "solved" it by having an __init__.py for my data directory that defines variables that hold the paths to the various files, which then can be imported [1]. Not sure that this scales to all of astropy, but I think that instead of
Another advantage is that it allows the test data files to have docstrings, which can be typeset with sphinx (and I guess with suitable cleverness be made part of the instance).
In #6664, there was some discussion how to access test data in documentation. It would seem handy to have a general method. In #6664 (comment), I wrote and suggested:
I think there is a general question here of how to access test data files. In a package of my own, I "solved" it by having an
__init__.py
for mydata
directory that defines variables that hold the paths to the various files, which then can be imported [1]. Not sure that this scales to all of astropy, but I think that instead ofit is clearer what happens if one sees,
Another advantage is that it allows the test data files to have docstrings, which can be typeset with sphinx (and I guess with suitable cleverness be made part of the instance).
[1] https://github.com/mhvk/baseband/blob/master/baseband/data/__init__.py
The text was updated successfully, but these errors were encountered: