GeezerVison is showing github.com — Add show_versions() function for printing debugging information used in issue reports by seisman · Pull Request #466 · GenericMappingTools/pygmt
Conversation
seisman
commented
May 31, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Description of proposed changes
The show_versions function reports system information, package versions and GMT library information. The output looks like:
PyGMT information:
version: v0.1.1+20.g4d11e8c.dirty
System information:
python: 3.7.6 (default, Jan 8 2020, 13:42:34) [Clang 4.0.1 (tags/RELEASE_401/final)]
executable: /Users/seisman/.anaconda/bin/python
machine: Darwin-19.4.0-x86_64-i386-64bit
Dependency information:
numpy: 1.18.1
pandas: 1.0.1
xarray: 0.15.1
netCDF4: 1.5.3
packaging: 20.1
ghostscript: 9.50
gmt: 6.1.0_ddd829b_2020.05.29
GMT library information:
binary dir: /Users/seisman/.anaconda/bin
cores: 8
grid layout: rows
library path: /Users/seisman/local/GMT/lib/libgmt.dylib
padding: 2
plugin dir: /Users/seisman/local/GMT/lib/gmt/plugins
share dir: /Users/seisman/local/GMT/share
version: 6.1.0
TODO:
- Update the github issue template
- Update the pygmt test instructions in the documentation
- Replace
print_clib_info() with show_versions in Makefile
Fixes #460
Reminders
- Run
make format and make check to make sure the code follows the style guide.
- Add tests for new features or tests that would have caught the bug that you're fixing.
- Add new public functions/methods/classes to
doc/api/index.rst.
- Write detailed docstrings for all functions/methods.
- If adding new functionality, add an example to docstrings or tutorials.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Trying to think of other good ones to print, maybe conda and ghostscript?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I agree with ghostscript, but do we really care about conda version?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Yeah, let's skip conda. It's looking really good by the way! One more thing we might want is to have it print out a more specific GMT version using (gmt --version?). conda list used to show the build number I think.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
One more thing we might want is to have it print out a more specific GMT version using (gmt --version?).
Agree.
conda list used to show the build number I think.
Yes, but conda list is usually slow.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
GMT version added. See the first comment for the updated output.
|
weiji14 reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
seisman
changed the title
Add show_versions function for print useful debugging information
Add show_versions() function for printing debugging information used in issue reports
May 31, 2020
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.
Great work @seisman, just one small comment to improve the documentation of show_versions. This is what it looks like on my system, the GMT version is duplicated but that's fairly minor:
PyGMT information:
version: v0.1.1+21.gb55250e.dirty
System information:
python: 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) [GCC 7.3.0]
executable: /home/weiji/miniconda3/envs/pygmt/bin/python
machine: Linux-4.19.0-8-amd64-x86_64-with-debian-10.4
Dependency information:
numpy: 1.18.4
pandas: 1.0.4
xarray: 0.15.1
netCDF4: 1.5.3
packaging: 20.4
ghostscript: 9.22
gmt: 6.0.0
GMT library information:
binary dir: /home/weiji/miniconda3/envs/pygmt/bin
cores: 2
grid layout: rows
library path: /home/weiji/miniconda3/envs/pygmt/lib/libgmt.so
padding: 2
plugin dir: /home/weiji/miniconda3/envs/pygmt/lib/gmt/plugins
share dir: /home/weiji/miniconda3/envs/pygmt/share/gmt
version: 6.0.0
There should be room to add extra stuff to this going forward. Would be great ot print out what's in gmt.conf but that's low priority right now.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is what it looks like on my system, the GMT version is duplicated but that's fairly minor:
Yes, the two GMT versions are different if
- users are using the GMT master branch
- there are multiple GMT installed, and the loaded library is different from the in the command line
There should be room to add extra stuff to this going forward. Would be great ot print out what's in gmt.conf but that's low priority right now.
We perhaps can wrap the gmt defaults module, but I agree it's very low priority.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced May 12, 2024
This branch was previously deployed
1 inactive
deployment
Reviewers
weiji14
weiji14 approved these changes
leouieda
Awaiting requested review from leouieda
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|