Add functions to calculate version number to constants.py