Uh oh!
There was an error while loading. Please reload this page.
Add monitoring missing dependency: pandas - #5100
Conversation
kabute
commented
Mar 23, 2018
(Fixed unit testing for pandas) |
tswast
commented
Mar 23, 2018
Pandas should probably be an "extras" as was done here: #4354 |
kabute
commented
Mar 25, 2018
Given that client query will break (Pandas seems to be a hard dependency), can I suggest changes to?
|
theacodes
commented
Mar 26, 2018
It's fine with me if this needs to directly depend on Pandas. Is the query method the most commonly used method here? |
tseaver
commented
Mar 26, 2018
@jonparrott It looks like |
theacodes
commented
Mar 26, 2018
Okay so it's not needed to query, just need to do |
kabute
commented
Apr 8, 2018
Then extras is probably the best way to go (and add the conditional back on the unit testing). What do you think? |
kabute
commented
Apr 9, 2018
Added pandas as optional (and documented how to install it). |
| 'google-api-core<2.0.0dev,>=0.1.1', | ||
| ] | ||
| extras = { | ||
| 'optional': ['pandas>=0.22.0'], |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| **Pandas:** | ||
| Pandas is an optional dependency that is needed if *query.as_dataframe* is used. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| To install pandas package run: | ||
| $ pip install --upgrade .[pandas] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| try: | ||
| import pandas | ||
| except ImportError: | ||
| except ImportError: # pragma: NO COVER |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| HAVE_PANDAS = False | ||
| else: | ||
| HAVE_PANDAS = True # pragma: NO COVER | ||
| else: # pragma: NO COVER |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| class Test__sorted_resource_labels(unittest.TestCase): | ||
| class Test__sorted_resource_labels(unittest.TestCase): # pragma: NO COVER |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
theacodes
commented
Apr 20, 2018
superseded by #5212 |
Add missing pandas dependency as per:
google/cloud/monitoring/_dataframe.py
google/cloud/monitoring/client.py
google/cloud/monitoring/query.py