-
Notifications
You must be signed in to change notification settings - Fork 653
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
Implement "modin.pandas.show_versions()" and "python -m modin --versions" #4007
Implement "modin.pandas.show_versions()" and "python -m modin --versions" #4007
Conversation
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
Also include Modin version in versions report Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
Codecov Report
@@ Coverage Diff @@
## master #4007 +/- ##
===========================================
- Coverage 85.52% 28.44% -57.09%
===========================================
Files 201 187 -14
Lines 16670 15887 -783
===========================================
- Hits 14257 4519 -9738
- Misses 2413 11368 +8955
Continue to review full report at Codecov.
|
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
PyDbEngine, | ||
) | ||
|
||
result["omniscidbe"] = "present" |
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.
Is there a way to know omniscidbe 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.
I didn't find any (except querying by something like conda list
). Maybe there's some C API of sorts... @modin-project/modin-omnisci ideas?
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.
Currently, we don't have any API to get omniscidbe 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.
Does conda list
way make sense to use?
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.
Too many assumptions (and conda list
is a slow thing to me).
I would rather we add an API function to get the 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.
Also we assume that conda
is present in the PATH which is not guaranteed.
assert isinstance(sys_info["LOCALE"], dict) # needed for mypy | ||
language_code = sys_info["LOCALE"]["language-code"] | ||
encoding = sys_info["LOCALE"]["encoding"] | ||
sys_info["LOCALE"] = f"{language_code}.{encoding}" |
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.
Why do we need to override this value?
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.
This is mostly a copy-paste from pandas.show_versions()
, I don't know why they did it so 🙃
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
79886cc
to
00f7e47
Compare
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.
Can we just instead do from pandas import show_versions
?
Yes and no. I wanted to integrate Modin components smoothly, which is impossible without effectively re-writing the function. I think this code would be changed very rarely when it stabilizes in our repo. |
Can we not do this: def show_versions(as_json):
from pandas import show_versions as _show_versions
if not as_json:
_show_versions()
# Modin logic here
else:
# capture stdout and add json logic |
I've inserted Modin components in between, so I'd have to capture the stdout anyway to achieve the same thing. I'd have to duplicate the logic of composing the output after that anyway. So what's I'm gaining is only not importing and using some protected functions from pandas, which is a fair price so that I don't have to muck with grabbing the output. |
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
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.
Can we add this file to codecov ignores?
Otherwise, I am ok with these changes.
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
@devin-petersohn I've excluded |
@vnlitvinov can we also remove the new functionality from codecov, or do you plan to add a test later? |
I've added a small test already: https://github.com/modin-project/modin/pull/4007/files#diff-003a411f9eba9c58275576d3bfeddd0815d72660fce91c34f77052d6fe5b92a5R257-R265 : modin/modin/test/test_utils.py Lines 257 to 265 in 88f2e8c
|
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.
LGTM. Codecov is complaining about some lines, but functionality looks good.
What do these changes do?
This is an augmentation for pandas.show_versions() plus an ability to call this from command line in an easy way.
Example output
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/developer/architecture.rst
is up-to-date