move-coop / parsons

A python library of connectors for the progressive community.
Other
255 stars 125 forks source link

Install dependencies for tests based on package install #951

Closed austinweisgrau closed 7 months ago

austinweisgrau commented 7 months ago

Parsons dependencies can be installed in two different ways. pip install -r requirements.txt is equivalent to pip install parsons UNLESS the environment variable PARSONS_LIMITED_DEPENDENCIES is set, in which case the dependencies are installed based on the explicit configuration in setup.py.

There can be drift between what is defined in requirements.txt and what is defined in setup.py.

These changes ensure that both sets of dependencies are used to run tests, ensuring alignment between test environments and actual usage.

An example is tests passing on this PR even though the same tests would fail when using PARSONS_LIMITED_DEPENDENCIES=1 pip install parsons[all] (as explained and fixed in this PR)

shaunagm commented 7 months ago

My only concern about this is that it doubles the total number of tests, and might push us out of the free tier of Github actions. But we can always revisit if we run out of memory/minutes/compute/whatever-it-is-they-limit