-
Notifications
You must be signed in to change notification settings - Fork 83
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
Clean up lacking codecov for __main__.py and add evalml info
to docs
#1293
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1293 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 213 213
Lines 13387 13385 -2
=======================================
- Hits 13379 13378 -1
+ Misses 8 7 -1
Continue to review full report at Codecov.
|
@@ -22,5 +22,8 @@ | |||
] | |||
}, | |||
data_files=[('evalml/demos/data', ['evalml/demos/data/fraud_transactions.csv.tar.gz', 'evalml/demos/data/churn.csv']), | |||
("evalml/tests/data", ['evalml/tests/data/tips.csv', 'evalml/tests/data/titanic.csv'])] | |||
('evalml/tests/data', ['evalml/tests/data/tips.csv', 'evalml/tests/data/titanic.csv'])], | |||
package_data = { |
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.
We need to add core-requirements.txt
to package_data so that it is included in the binary distribution and available via pip installation.
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 would install the core-requirements.txt
file at the site-packages
level instead of site-packages/evalml
. It seems kind of weird that we would read a file that is technically not in our package and it could also conflict with other files called core-requirements.txt
.
I think I would prefer the hardcode-a-list-of-requirements approach I think you mentioned at stand-up the other day.
Also, I think we should check if the ../
syntax works on windows?
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.
@angela97lin @freddyaboulton ah, I see what you're talking about. The current impl of the evalml info
CLI happens to read in core-requirements.txt
in order to do its thing.
I suggest we change the impl instead:
- In
cli_utils.py
deleteget_core_requirements()
- And update
print_deps()
:
def print_deps(dependencies):
logger.info("\nINSTALLED VERSIONS")
logger.info("------------------")
installed_packages = get_installed_packages()
packages_to_log = []
for package in installed_packages:
packages_to_log.append((x, installed_packages[x]))
logger.info("{package}: {version}".format(package=package, version=installed_packages[package]))
Will that work?
Also. good point about the pathing! So I think that data_files
and package_data
are used during package creation, meaning they need to work on whatever platform we build source dist / wheels on. We currently do this on linux. So, we're ok for now :)
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.
Hm, is this what we want though? By removing get_core_requirements()
/ just calling get_installed_packages()
, we're getting all of the packages the user has installed, regardless of if it is an evalml dependency or not. I'd argue then that this is not much more useful than pip freeze
. If there's no good workaround, I'm okay with just having a hardcoded list as Featuretools has. Thoughts?
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.
@angela97lin thanks for looking at this and for adding that guide!
I left a suggestion on the impl. Basically, I wonder if instead of packaging core-requirements.txt
, we can just change the impl to log out the entirety of pip freeze
. Let's conclude that conversation one way or another, and then I'll happily approve.
|
||
|
||
if __name__ == '__main__': | ||
cli() |
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.
Hmm, so this isn't needed for click to work?
@@ -22,5 +22,8 @@ | |||
] | |||
}, | |||
data_files=[('evalml/demos/data', ['evalml/demos/data/fraud_transactions.csv.tar.gz', 'evalml/demos/data/churn.csv']), | |||
("evalml/tests/data", ['evalml/tests/data/tips.csv', 'evalml/tests/data/titanic.csv'])] | |||
('evalml/tests/data', ['evalml/tests/data/tips.csv', 'evalml/tests/data/titanic.csv'])], | |||
package_data = { |
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.
@angela97lin @freddyaboulton ah, I see what you're talking about. The current impl of the evalml info
CLI happens to read in core-requirements.txt
in order to do its thing.
I suggest we change the impl instead:
- In
cli_utils.py
deleteget_core_requirements()
- And update
print_deps()
:
def print_deps(dependencies):
logger.info("\nINSTALLED VERSIONS")
logger.info("------------------")
installed_packages = get_installed_packages()
packages_to_log = []
for package in installed_packages:
packages_to_log.append((x, installed_packages[x]))
logger.info("{package}: {version}".format(package=package, version=installed_packages[package]))
Will that work?
Also. good point about the pathing! So I think that data_files
and package_data
are used during package creation, meaning they need to work on whatever platform we build source dist / wheels on. We currently do this on linux. So, we're ok for now :)
"## System Information\n", | ||
"\n", | ||
"EvalML provides a command-line interface (CLI) tool prints the version of EvalML and core dependencies installed, as well as some basic system information. To use this tool, just run `evalml info` in your shell or terminal. This could be useful for debugging purposes or tracking down any version-related issues." | ||
] |
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.
@angela97lin I think there's a bug somewhere -- the output shows a stack trace in the docs
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.
My bad, I was testing out the suggestion you made. Reverted to working state here (https://evalml.alteryx.com/en/796_cli_check/user_guide/utilities.html) until we discuss.
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.
Discussed with @angela97lin . Plan:
- Merge this PR, since it adds missing code coverage
- File issue to track removing
core-requirements.txt
from our package, and update the env CLI to list all installed packages (i.e.pip freeze
)
Closes #796
Updated docs here: https://evalml.alteryx.com/en/796_cli_check/user_guide/utilities.html
evalml info
. Try pip installing evalml and runningevalml info
--it currently breaks. Then, try usingpip install git+ssh://git@github.com/alteryx/evalml.git@796_cli_check
to install in fresh environment, cli should work now :)evalml info
to the logger output suffices, capsys and caplog don't play really well with each other 😬