Support `setup.py test --coverage` in affiliated packages. #39

Merged
merged 1 commit into from Mar 1, 2014

Conversation

Projects
None yet
4 participants
Member

mdboom commented Feb 27, 2014

Fixes #25. Requires astropy/astropy#2132.

mdboom referenced this pull request in astropy/astropy Feb 27, 2014

Merged

Make coverage testing work for affiliated packages #2132

@wkerzendorf wkerzendorf commented on the diff Feb 27, 2014

.gitignore
@@ -11,6 +11,8 @@ __pycache__
# Other generated files
*/version.py
+htmlcov
+.coverage
@wkerzendorf

wkerzendorf Feb 27, 2014

Member

Is a .coverage automatically created or why is it excluded here?

@mdboom

mdboom Feb 27, 2014

Member

Yes. setup.py test --coverage will store its coverage data in .coverage.

@wkerzendorf

wkerzendorf Feb 27, 2014

Member

sorry brain fart - I read .coveragerc.

Owner

astrofrog commented Mar 1, 2014

@mdboom - great, thanks! Merging this now.

@cdeil - you'll need to include these changes in gammapy for coverage testing to work.

astrofrog merged commit 857b7ae into astropy:master Mar 1, 2014

1 check passed

default The Travis CI build passed
Details
Member

cdeil commented Mar 2, 2014

@astrofrog I think it would be a good idea to send an email to astropy-dev every time affiliated package maintainers are supposed to update something because of changes in astropy core or the affiliated package template (and ideally the commands to do it ... is there a way to merge commits from the package-template repo into another affiliated package repo?).

In this case maybe not everyone wants it, but e.g. I am seeing this warning and don't have time to investigate what has changed and what I should do to fix it:

$ python setup.py build
/Users/deil/code/astropy2/astropy/setup_helpers.py:1002: AstropyDeprecationWarning: astropy.setup_helpers.update_package_files is deprecated.  Update your setup.py to use astropy.setup_helpers.get_package_info instead.
  AstropyDeprecationWarning)
Owner

astrofrog commented Mar 2, 2014

@cdeil - I agree about emailing astropy-dev. It'd be really helpful if someone else could start being responsible for maintaining, updating, advertising etc. the package-template since it's a fair bit of work to stay on top of things. If you'd be interested in taking charge of this, then let me know :)

For this change, I didn't advertise it because it's not critical and also because there will be other changes coming soon (setup and configuration) so I figured we might just want to do a sprint and update all the affiliated packages once that's all done.

Assuming an affiliated package started from the package-template, it's easy to just pull from the package-template remote and merge the changes into an existing affiliated package.

Member

mdboom commented Mar 3, 2014

As @astrofrog said, since this is git, it's always possible to see what has changed in the upstream package-template and merge those changes in. It won't do the renaming of values within the files for you, of course, but I have some thoughts about how to make that easier on affiliated packages -- I just haven't had the time to really dive into it.

mdboom referenced this pull request in astropy/astropy Mar 14, 2014

Merged

Automate the package naming in coveragerc #2198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment