Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

liberfa version number test too tight #52

Closed
olebole opened this issue Sep 21, 2020 · 4 comments · Fixed by #53
Closed

liberfa version number test too tight #52

olebole opened this issue Sep 21, 2020 · 4 comments · Fixed by #53

Comments

@olebole
Copy link

olebole commented Sep 21, 2020

On Debian, we have pyerfa and erfa in separate packages and update them independently (and by different people). However, there is one test that fails when doing so:

def test_version(self):
assert hasattr(erfa, '__version__')
version = erfa.__version__
assert version is erfa.version.version
# Oops, we had the wrong version for quite a while...
assert (erfa.version.erfa_version == '1.6.0' and version.startswith('1.7.0')
or version.startswith(erfa.version.erfa_version))

Specifically, I now updated erfa to 1.7.1, and pyerfa-1.7.0 fails on this test now. It would IMO be better if the test would just check the backward compatibility, i.e. that pyerfa uses a version that is too old (incompatible) with the current version. But in principle, if all other tests succeed (and have sufficient code coverage) there would be no need to have this test at all?

Having too strong dependencies on the package (even for testing) makes it much harder to maintain them.

Cc: @avalentino as the Debian maintainer of pyerfa

@bnavigator
Copy link

+1 from openSUSE

@bnavigator
Copy link

bnavigator commented Sep 25, 2020

BTW, the last commit on master 822d095 makes the same fail even with bundled erfa 1.7.1

The test reveals a very confusing naming convention: How to distinguish between pyerfa version and erfa version? Unless you really want to pin to equal versions for both packages, the attributes should have a more declarative name. Otherwise a strict pin on the requirements and coincident releases would be needed. In that case, did you just forget to mark the tag https://github.com/liberfa/pyerfa/releases/tag/v1.7.1 as release and upload to PyPI?

@bnavigator
Copy link

According to #39 (comment), differing versions between liberfa and pyerfa should be okay. Skipping the test for now.

@avalentino
Copy link
Member

In #53 the test have been changed to perform tight version checking only in case of embedded liberfa.

@mhvk mhvk closed this as completed in #53 Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants