-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve version tracking and deprecate SVN support #349
Comments
So far, I created a utility file which has two functions to track the python versions. Here's my code: import EXOSIMS def get_version_info():
def get_git_info():
|
@VeronicaSergeeva Note that pkg_resources is deprecated. All new code should use importlib instead, where possible. See the migration guide here: https://importlib-resources.readthedocs.io/en/latest/migration.html. Also potentially helpful: https://discuss.python.org/t/will-setuptools-remove-pkg-resources-module-in-the-future/27182/10 |
Thank you, here's the version using importlib: import platform def get_version_info():
def get_git_info():
if name == "main":
|
I think I have come up with the solution and have 2 fully working files. The first file, version_util.py, should be placed in the util folder, this script should output the python version, the EXOSIMS version, and all required packages for EXOSIMS also with versions. The second file, rec_check.py. This is also in a separate file, this checks that the requirements.txt file contains all the correct packages that are needed for EXOSIMS. |
version_util.py file: from importlib import metadata def get_version():
version_info = get_version() |
rec_chekc.py file: from importlib import metadata with open('requirements.txt', 'r') as f: for package in required_packages: |
I have uploaded 2 working files on my fork - the SVN-free SurveySimulation file and version_util for tracking versions and git info. I pasted the working version_util code here too: from importlib import metadata def get_git_info():
def is_editable_installation(): def get_version():
version_info = get_version() |
The last version_info block is what calls the functions, so it's in the new SurveySimulation file |
Is your feature request related to a problem? Please describe.
Currently, the code attempts to determine the software version to help with reproducibility. In the case of installs from repositories, the commit information is also tracked. All of this currently happens in the SurveySimulation prototype.
Describe the solution you'd like
We need multiple updates:
The text was updated successfully, but these errors were encountered: