CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 4 forks source link

Replace explicit version number with versioneer #229

Closed SeanBryan51 closed 10 months ago

SeanBryan51 commented 10 months ago

Previously (prior to #228), we used the PBR package with an explicit version number in setup.cfg. This enables the 'pre-versioning' mode of managing version strings (see features) which raises an error if the inferred version from Git tags is greater than explicit version in setup.cfg. This prevents developers from doing an editable install via pip install -e . (see #129). This issue was fixed implicitly in #228 when PBR was removed from the build dependencies.

This change is a feature in that it implements dynamic version strings from Git tags via versioneer so that an explicit version number in setup.cfg is not required. We choose versioneer so that version strings were consistent across pip and conda installations. This was not possible with other tools such as PBR and setuptools_scm.

Fixes #129

codecov[bot] commented 10 months ago

Codecov Report

Attention: 634 lines in your changes are missing coverage. Please review.

Comparison is base (db6b941) 82.34% compared to head (e5c2a74) 58.23%. Report is 2 commits behind head on main.

Files Patch % Lines
versioneer.py 9.95% 633 Missing :warning:
setup.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #229 +/- ## =========================================== - Coverage 82.34% 58.23% -24.11% =========================================== Files 28 29 +1 Lines 1410 2114 +704 =========================================== + Hits 1161 1231 +70 - Misses 249 883 +634 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SeanBryan51 commented 10 months ago

Testing pip install --user .:

$ pip install --user -q . && pip list | grep benchcab
benchcab           3.0.0+13.ge5c2a74

Testing pip install -e .

$ pip install -e .
Obtaining file:///home/189/sb8430/benchcab
  Preparing metadata (setup.py) ... done
Installing collected packages: benchcab
  Running setup.py develop for benchcab
Successfully installed benchcab-3.0.0+13.ge5c2a74

Testing conda build -c conda-forge .:

$ conda search --use-local benchcab
Loading channels: done
# Name                       Version           Build  Channel
benchcab             3.0.0+13.ge5c2a74           py_13  scratch/tm70/sb8430/conda/bld