Description
Situation
I would like to have a simple text file in my repo, named "version", which contains only the semantic version number of the project. This could then be consumed by every place in the code that needs to know the package number.
For example, I may need it for the version attribute of the package, again for the documentation, and again for the Pip or Conda packaging configuration. Having all these share a single, simple source for the version number would make it easy to update the version number. It would also make it easy to get the version number for tools and packages written in other languages since it is stored as a simple text file that almost all languages can read. Especially since you have a CLI that would make it easy to use with other languages also.
Possible Solution/Idea
I propose adding a static or class method "open" which takes a string or path object pointing to the version file. The version file will only contain the semantic version. The method will read in the file and return a Version object.
Additional context
While it seems easy enough to open the file and pass it to the Version constructor as a string, this would require adding scripts or modules to each project to add this basic functionality. Python is all about "batteries included", right?