[X] I have searched exisisting GitHub issues to make sure the feature request does not already exist.
Feature details
Add a CI action that runs the relevant tests in an environment without TensorFlow installed.
Currently, no tests are being run without TensorFlow installed (with the exception of some specific tests where TensorFlow is in some way mocked). This makes it easy to mistakenly add code that is dependent on TensorFlow to core Strawberry Fields, which doesn't have TensorFlow as a requirement.
Example:
Importing a function from the TensorFlow backend into other parts of Strawberry Fields would bypass the check for whether TensorFlow is installed or not. For example, adding the following in strawberryfields/__init__.py would implicitely try to import TensorFlow each time Strawberry Fields is imported (e.g., import strawberryfields as sf):
# strawberryfields/__init__.py
from tensorflow.backends.ops import update_symplectic
Implementation
Add a GitHub action that creates an environment without TensorFlow installed, and runs the parts of the test suite that do not depend on TensorFlow. This should be run on each push to PR and merge.
How important would you say this feature is?
1: Not important. Would be nice to have.
Additional information
Front-end tests have recently been fixed to be able to run without TensorFlow (#639).
Feature details
Add a CI action that runs the relevant tests in an environment without TensorFlow installed.
Currently, no tests are being run without TensorFlow installed (with the exception of some specific tests where TensorFlow is in some way mocked). This makes it easy to mistakenly add code that is dependent on TensorFlow to core Strawberry Fields, which doesn't have TensorFlow as a requirement.
Example: Importing a function from the TensorFlow backend into other parts of Strawberry Fields would bypass the check for whether TensorFlow is installed or not. For example, adding the following in
strawberryfields/__init__.py
would implicitely try to import TensorFlow each time Strawberry Fields is imported (e.g.,import strawberryfields as sf
):Implementation
Add a GitHub action that creates an environment without TensorFlow installed, and runs the parts of the test suite that do not depend on TensorFlow. This should be run on each push to PR and merge.
How important would you say this feature is?
1: Not important. Would be nice to have.
Additional information
Front-end tests have recently been fixed to be able to run without TensorFlow (#639).