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

Version number normalization test #254

Closed
wants to merge 1 commit into from

Conversation

c24t
Copy link
Member

@c24t c24t commented Oct 29, 2019

From @Oberon00's comment: #250 (comment).

@Oberon00 do you think it's worth including tests like this?

This PR adds a test for each package to check that the version number is normalized, similar to the check in the Dynatrace OneAgent SDK. It checks that the verison is importable in each package, and matches the normalized version according to pkg_resources.

We're unlikely to make this particular mistake again, but it can't hurt to test it.

@c24t c24t added the question Further information is requested label Oct 29, 2019
@toumorokoshi
Copy link
Member

Adding the test to every repository doesn't seem scalable. I could easily forget to add this snippet into my unit tests.

Regarding the normalized version: I debate a little bit how important that is. part of the purpose of the version normalization is to ensure that developers don't have to worry about normalizing version strings themselves.

If the goal is for .version to match what pkg_resources dictates, why not just modify the code so that version is retrieving the string from pkg_resources vs writing the value out ourselves?

@Oberon00
Copy link
Member

Oberon00 commented Dec 9, 2019

I think such a test would best be provided as a separate script that is then invoked via eachdist.py (#291), so that you can't forget to add it for a new package.

@a-feld a-feld removed their request for review December 10, 2019 00:56
@codeboten
Copy link
Contributor

Closing in favour of using setuptools scm

@codeboten codeboten closed this May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants