googleapis / googleapis/synthtool
python: optional `unit_noextras` session, possibly `system_noextras` too
- Dominant language
- Python
- Stars
- 108
- Forks
- 102
- Avg merge
- 1h 23m
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
There have been times when a BigQuery "extra" (optional dependency) has accidentally become a required dependency. Tests did not catch this because the tests always installed all the optional dependencies it could for a given Python version.
**Describe the solution you'd like**
A `unit_noextras` session similar to the one provided here: https://github.com/googleapis/python-bigquery/blob/dcb8728c12f5ab0d7809a1b6cf72755dff973772/noxfile.py#L106
It can optionally be included in the default for projects where there is a risk of making an extra non-optional, such as with tqdm in https://github.com/googleapis/python-bigquery-pandas
**Describe alternatives you've considered**
One could use one of the middle Python versions to test with no extras via `unit_test_extras_by_python`. The minimum version should always have all extras, since that's where the constraints for testing minimum versions are expected to be.
This feels a bit arbitrary to me, though is a good workaround for now.
**Additional context**
* https://github.com/googleapis/python-bigquery/pull/623 -- add `unit_noextras`
* https://github.com/googleapis/python-bigquery/issues/549 -- accidentally making pyarrow required
Contributor guide
Assessment
This issue has not been assessed yet.