astropy / package-template

Template for packages that use Astropy. Maintainer: @astrofrog
http://docs.astropy.org/projects/package-template/en/latest/
Other
60 stars 63 forks source link

Fix customization of pytest-astropy-header when running with tox #439

Closed astrofrog closed 1 year ago

astrofrog commented 4 years ago

In https://github.com/astropy/package-template/pull/438 @mhvk pointed out that the pytest-astropy-header isn't picking up the custom configuration in conftest.py in time and the header is therefore not being customized, so this issue is a reminder to fix this.

One idea mentioned in #438 was to make setup.cfg the primary place to specify the packages to show in the pytest-astropy-header and to somehow have that be copied into the package, either by generating/modifying the conftest.py file or by generating a secondary file, e.g. conftest.header that gets read in by conftest.py. An argument against just generating conftest.py is that that file can also be used for other purposes/customizations.

astrofrog commented 4 years ago

One elegant solution would be to do something along the lines of what https://github.com/noirbizarre/setuptools-meta does - because it means we don't actually create additional files but the installed distribution can be given access to more of the metadata in setup.cfg.

pllim commented 4 years ago

xref astropy/pytest-astropy-header#15 and astropy/pytest-astropy-header#17

pllim commented 1 year ago

https://github.com/astropy/package-template#deprecation-warning