-
Notifications
You must be signed in to change notification settings - Fork 43
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
1869 easily accessible dependencies #1903
Conversation
@rozyczko will provide some hints to @Caddy-Jones |
Still needing to implement suggestions |
Output is now in the log file Module list generator now moved to the help tab. Added docstrings to the functions
Hi @butlerpd and @wpotrzebowski , I've implemented the suggestions from the call. I've also replied to the comments left by @andyfaff |
ready for testing on Win |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks safe enough but am not comfortable judging beyond that. Functionality does seem to work -- though it is a lot of modules which explains why @Caddy-Jones was worried about dumping the output too often. My question now is the json output which does not seem to be compatible with the json viewers I had due to the use of 'xx' rather than "xx" for strings?
It would be helpful if there were an easy way to cut and paste the output into a tool to examine compared to, for example the required files or yml files?
That said, if this passes a better code review the concern above can be figured out later and turned into another issue. This is already a great step forward.
Hi @butlerpd The pip list command does output a json file, however the log_installed_modules function converts the json to a python dictionary. As a result the output will not be compatible with a json viewer. There isn't a critical reason for this change, it was just a stylistic choice to keep the outputs of both log_installed_modules and log_imported_modules the same, however both methods could easily be modified to output jsons if that would make life easier It could also be an idea to compare the outputs to the yml file, and to make any differences easily visible in the functions outputs. Something like
But I think this may be best answered in a separate pull request |
Thanks for the clarification. The comparison might be nice but not sure that works once you make a build as I don't think the build slurps in the yml files? So this could cause a problem when trying to build .. and to some extent duplicates the work of "check_packages.py" so not really necessary when not working with a built version? Json output might help but then maybe not. I think that requires more thinking so I agree that all this can be put into a future ticket as desired. I will try to test the new changes (responding to @pkienzle ) later today to make sure it doesn't break anything obvious to me at which point I am ready to approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as before for me (without building an installer) so this can now be merged. I note that the following online json formatter/beautifier can deal with most of the issues and "fix" the "json" and render it in an easy to read format.
https://jsonformatter.curiousconcept.com/
Hi guys
I’ve done some work on issue #1869, but need advice on the next steps.
This pull request does 2 things,
On start up pip is used to generate a list of locally installed modules, and their version number. This only works for modules hosted on pip, so Matplotlib and bumps, but no sasmodules.
On exit, python saves a dictionary of modules used while running this session of SasView as the key, with the accompanying version number as the value. This works for all modules*, including sasmodules.
There are a few areas I need clarification on.