I made quite a number of changes and will briefly explain them:
New Features & Bugfixes:
all functions now have docstrings and code is better commented
Global variables which are very error prone are placed into a struct-like class for safety
More functions have been added. Eg. get_esm_packages, get_esm_package_attributes, ...
New command: get
deprecated FUNCTION_PATHis now replaced with a better functionality. I will also replace the other occurences in the remaining ESM-Tools packages in a similar way
GitHub connection which was causing errors is now optional. If you call esm_versions --from_github <command> it will get the info from GitHub but if you drop this flag then it will query the esm_packages locally.
esm_versions check output is not really cool. It use the tabulate package (added to requirements in setup.py). A nice exercise: run this command with maximizing your terminal size and then again with a smaller terminal and see how it works
esm_versions check has an extra argumen --option <package> where only the information of the selected package is displayed
Bugs in the cleancommand are fixed. I don't know if anyone tested it but there was a clear bug there. String of the current esm tool is passed instead of the full path therefore os.path.exists was failing
Additionally if "esm" in binary is extremely dangerous since it also matches something like foobar_esm.exe. I changed it to startswith("esm_"). Which is not perfect but at least much better.
upgradecommand now has a much better output. This is not only for aesthetics but also to make the tools look much more professional. Dumping the output is terrible of UX. Now the colorful output with extra newline makes it much easier to read
There is a new command called get. esm_versions get <package> <attribute>. It will return the desired attribute from the selected package. Eg. where you installed it. This is very useful for removing the dependency on obsolete FUNCTION_PATH.
Here are some quick tests:esm_versions --help
-> new command get and docstrings for all functions
-> new option --from_github
esm_versions get esm_tools file_pathesm_versions get esm_tools fooesm_versions get foo baresm_versions --from_github get esm_tools file_pathesm_versions --from_github get esm_archiving file_path
esm_version upgrade
-> better output formatting with colors and extra newline for readability
I made quite a number of changes and will briefly explain them:
New Features & Bugfixes:
get_esm_packages
,get_esm_package_attributes
, ...get
FUNCTION_PATH
is now replaced with a better functionality. I will also replace the other occurences in the remaining ESM-Tools packages in a similar wayesm_versions --from_github <command>
it will get the info from GitHub but if you drop this flag then it will query the esm_packages locally.esm_versions check
output is not really cool. It use the tabulate package (added to requirements insetup.py
). A nice exercise: run this command with maximizing your terminal size and then again with a smaller terminal and see how it worksesm_versions check
has an extra argumen--option <package>
where only the information of the selected package is displayedclean
command are fixed. I don't know if anyone tested it but there was a clear bug there. String of the current esm tool is passed instead of the full path thereforeos.path.exists
was failingif "esm" in binary
is extremely dangerous since it also matches something likefoobar_esm.exe
. I changed it tostartswith("esm_")
. Which is not perfect but at least much better.upgrade
command now has a much better output. This is not only for aesthetics but also to make the tools look much more professional. Dumping the output is terrible of UX. Now the colorful output with extra newline makes it much easier to readget
.esm_versions get <package> <attribute>
. It will return the desired attribute from the selected package. Eg. where you installed it. This is very useful for removing the dependency on obsoleteFUNCTION_PATH
.Here are some quick tests:
esm_versions --help
-> new command get and docstrings for all functions -> new option --from_githubesm_versions check
esm_versions --from_github check
esm_versions --from_github check --package esm_archiving
esm_versions check --package esm_archiving
esm_versions get esm_tools file_path
esm_versions get esm_tools foo
esm_versions get foo bar
esm_versions --from_github get esm_tools file_path
esm_versions --from_github get esm_archiving file_path
esm_version upgrade
-> better output formatting with colors and extra newline for readability