banesullivan / scooby

🐶 🕵️ Great Dane turned Python environment detective
MIT License
47 stars 12 forks source link

Replace no_version from PyPI to local #102

Closed prisae closed 1 year ago

prisae commented 1 year ago

Create a local dummy package without a version. Because pip/PyPI gives it automatically a version number 0.1.0 if None is provided.

codecov-commenter commented 1 year ago

Codecov Report

Merging #102 (5a8dbde) into main (6704341) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #102   +/-   ##
=======================================
  Coverage   85.61%   85.61%           
=======================================
  Files           5        5           
  Lines         438      438           
=======================================
  Hits          375      375           
  Misses         63       63           
banesullivan commented 1 year ago

pip/PyPI gives it automatically a version number 0.1.0 if None is provided.

Not exactly. This version is coming from the package distribution (installed via pip but from the setup.py):

https://github.com/prisae/no_version/blob/c8b8bfe7c45bae9f2e09de91ffb4081b328502c8/setup.py#L6

The whole point of #101 is to support scenarios exactly like this where packages are not providing a __version__ attribute and only set it in the distribution -- a bad, but common practice