-
-
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
Conversation
gensim/__main__.py
Outdated
parser.add_argument("--info", action="store_true", help="Display version of Gensim and its dpendencies") | ||
opt = parser.parse_args() | ||
if opt.info: | ||
print(platform.platform()) |
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.
Please move it do distinct function (that returns dict
with information)
from gesnim import package_info
info = package_info()
and print it here in nice manner
gensim/__main__.py
Outdated
|
||
if __name__ == "__main__": | ||
|
||
parser = argparse.ArgumentParser() |
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.
Where is the description? Should use __doc__
variable like here 117d447
gensim/__main__.py
Outdated
import scipy | ||
import gensim | ||
import argparse | ||
|
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::
section
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.
Also, need to add .rst
to gensim/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.
Also, need to add .rst to gensim/docs/src
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).
gensim/__main__.py
Outdated
import argparse | ||
|
||
if __name__ == "__main__": | ||
|
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.
remove this line
gensim/__main__.py
Outdated
if __name__ == "__main__": | ||
|
||
parser = argparse.ArgumentParser() | ||
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 comment
The reason will be displayed to describe this comment to others. Learn more.
indentation should be 4 spaces (not 8)
gensim/__main__.py
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
missing smart_open
, FAST_VERSION
and path where gensim installed
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.
for smart_open smart_open.__version__
doesn't work as the variable does not exist.
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.
Try to found other way
c473c87
to
7abdead
Compare
Thanks @sharanry 👍 |
…ges. Fix piskvorky#1902 (piskvorky#1903) * Add help option when running gensim * requested changes * Add program output * Fix flake8 errors * Add .rst file * Fix many stuff * fix * rename all as scripts.package_info * fix
Fixes #1902