-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add method that show base installation info about gensim & related packages. Fix #1902 #1903
Changes from 1 commit
d884194
e337c80
573e933
1a81616
26f97cc
6ddd940
bb3e90a
6e78656
eb96e6d
2267ecf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import platform | ||
import sys | ||
import numpy | ||
import scipy | ||
import gensim | ||
import argparse | ||
|
||
if __name__ == "__main__": | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this line |
||
parser = argparse.ArgumentParser() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is the description? Should use |
||
parser.add_argument("--info", action="store_true", help="Display version of Gensim and its dpendencies") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation should be 4 spaces (not 8) |
||
opt = parser.parse_args() | ||
if opt.info: | ||
print(platform.platform()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move it do distinct function (that returns from gesnim import package_info
info = package_info() and print it here in nice manner |
||
print("Python", sys.version) | ||
print("NumPy", numpy.__version__) | ||
print("SciPy", scipy.__version__) | ||
print("gensim", gensim.__version__) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for smart_open There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try to found other way |
||
|
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.
Missing docstring for the module, should looks like 117d447#diff-cbaf05cc913e951e3205d150e33edf2eR9
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.
In addition, don't forget about
.. program-output::
sectionThere 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.
Also, need to add
.rst
togensim/docs/src
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.
On it
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.
How do I do this?
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.
Look into
gensim/docs/src/scripts
for example, you'll see several*.rst
files, you need to add something similar to needed place (same as in package hierarchy).