SciKit-Surgery / scikit-surgery

SciKit-Surgery - Compact Libraries for Surgical Navigation
http://scikit-surgery.github.io/scikit-surgery/
Other
39 stars 11 forks source link

Versioning - how to use semantic versioning, git hash version, and versioneer.py #13

Closed thompson318 closed 4 years ago

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 23, 2018, 08:32

@ThomasDowrick - how do we use semantic versioning in PythonTemplate? Won't we need semantic versioning for pip install to detect package versions and upgrades.

So, if applications like SmartLiver need various versions of scikit-surgery they would need to know what version to use. How do we do this?

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 23, 2018, 10:47

The requirements.txt/requirements-dev.txt files can be modified to include specfic or minimum version numbers for dependent packages, e.g.:

numpy
opencv-python>=2.0
scikit-surgeryimage==1.0.1
etc.
thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 23, 2018, 11:23

If I have an app that needs a specific version of scikit-surgeryimage, firstly how do I denote the version of scikit-surgeryimage when I tag, or upload to pypi? then secondly, do I need to duplicate in setup.py for when when my app is installed?

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 23, 2018, 11:39

Versioneer will extract the version number from (amongst other things) git tags. So if we have tagged a commit as v.1.2.3, and then upload it to Pypi, it will show up as v1.2.3.

Upon futher reading into the difference between requirements.txt and _installrequires in setup.py, it seems that there is a subtle but important difference between the two (https://caremad.io/posts/2013/07/setup-vs-requirement/). We should keep requirments.txt/requirements-dev.txt for the CI pipeline, but for publishing, it appears to be best practice to use _installrequires in setup.py, rather than referencing an external file.

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Oct 23, 2018, 13:06

Great. Thanks. We can close this task, as we have enough info documented here.

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Oct 23, 2018, 13:16

closed