Add [all] extras to install all extra dependencies#7610
Add [all] extras to install all extra dependencies#7610tswast merged 4 commits intogoogleapis:masterfrom
Conversation
tseaver
left a comment
There was a problem hiding this comment.
For future reference, please avoid mixing blackening with "real" changes? The noise makes reviewing the substantive bits hard. Either split the blacken bit out into a separate commit, or else a separate PR.
| else: | ||
| all_extras.extend(extras[extra]) | ||
|
|
||
| extras["all"] = all_extras |
There was a problem hiding this comment.
Can't we just normalize the extras above to always be lists?
There was a problem hiding this comment.
I fear if we miss one, then we end up with a bad dependency list.
>>> l = []
>>> l.extend("Uh, oh!")
>>> l
['U', 'h', ',', ' ', 'o', 'h', '!']
That means we still would need a check for string type or something else to validate they are all lists.
There was a problem hiding this comment.
I don't what I was thinking with that comment. This is why we have tests. I assume by using the [all] extra in the nox session, we'd catch such errors. I'll simplify this on Monday as you suggest.
|
Good point re: blackening separately. Sent #7619 |
tswast
left a comment
There was a problem hiding this comment.
I've reverted the blacken changes.
| else: | ||
| all_extras.extend(extras[extra]) | ||
|
|
||
| extras["all"] = all_extras |
There was a problem hiding this comment.
I fear if we miss one, then we end up with a bad dependency list.
>>> l = []
>>> l.extend("Uh, oh!")
>>> l
['U', 'h', ',', ' ', 'o', 'h', '!']
That means we still would need a check for string type or something else to validate they are all lists.
An [all] extra will be useful for convenience to get all the "bonus" features like progress bars, pandas integration, and BigQuery Storage API integration. It also simplifies the noxfile a bit, since the list of extras installed in each session was getting long, especially after using the bqstorage extra instead of in LOCAL_DEPS.
* Add [all] extras to install all extra dependencies An [all] extra will be useful for convenience to get all the "bonus" features like progress bars, pandas integration, and BigQuery Storage API integration. It also simplifies the noxfile a bit, since the list of extras installed in each session was getting long, especially after using the bqstorage extra instead of in LOCAL_DEPS. * Need fastavro to actually read rows from bqstorage. * Blacken * Use lists for all extras.
An [all] extra will be useful for convenience to get all the "bonus"
features like progress bars, pandas integration, and BigQuery Storage
API integration.
I also blacken the setup.py file and simplify the noxfile by using this
new [all] extra.
This is a pattern I've seen in other projects that have a lot of "extras", such as Apache Airflow (though they have a lot more the
google-cloud-bigquery).https://github.com/apache/airflow/blob/6cb735c6d301a5689ff9666349abdb6387abc7a1/setup.py#L335