edf-hpc / unclebench

10 stars 4 forks source link

Package version number - procedure to update #48

Closed erothe closed 5 years ago

erothe commented 5 years ago

Currently both files setup.py and _version.py have hard coded version id's making it easy to forget to update them when a new version is to be created .

An additional step in the packaging procedure is a simple solution to prevent a developer from forgetting to update the package version in these two files .

An alternative method can be constructed by automatically deploying a file with the version number of the package upon the package creation step (although this method wouldn't work if the source code is cloned directly from edf-hpc repo) .

Any ideas?

rezib commented 5 years ago

AFAIK, the usual pythonic way to reduce this duplication is to import version.py in setup.py, as done in neos for example: https://github.com/edf-hpc/neos/blob/master/setup.py#L37

erothe commented 5 years ago

That's great! On my way as soon as possible. Bye for now.

erothe commented 5 years ago

Unclebench has now a single __version__ variable (v 0.3.7). The version number is changed in release.py which replaces _version.py. In future improvements, more attributes can be set in this file which is then imported to other modules as needed. setup.py and ubench were modified to accept the new version variable. This thread will now be closed.