XanaduAI / strawberryfields

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
https://strawberryfields.ai
Apache License 2.0
747 stars 186 forks source link

Create a separate requirements file for the CI #582

Closed antalszava closed 2 years ago

antalszava commented 3 years ago

We would like to have a separate requirements.txt (pinned exactly to the versions used) and requirements-ci.txt (pinned closely to setup.py). This latter would be used by the CI.

See the conversation thread at the end of #581.

sduquemesa commented 2 years ago

Hi @antalszava,

From your comment I understand that requirements-ci.txt would be used by the CI to test that strawberryfields works as expected when used as a package, hence it will contain the requirements appearing on setup.py. On the other hand, requirements.txt will have all dependencies required to used all the features of SF. Is that correct? Could you elaborate a bit more?

When you mention pinned closely and pinned exactly, are you referring to semantic versioning?

sduquemesa commented 2 years ago

Pennylane has resolved the same issue and is a good reference for this: Create a separate requirements file for the CI #1292

antalszava commented 2 years ago

Hi @sduquemesa,

When you mention pinned closely and pinned exactly, are you referring to semantic versioning?

Yes! The idea would be to only pin only those packages to a certain version in the requirements-ci.txt file where there is a specific constraint (i.e., SF only works with a certain version of the dependency). The rest of the packages would stay unpinned so that when issuing pip install -r requirements-ci.txt, the latest version for each package is installed by the continuous integration check.

In contrast, in the requirements.txt file we would like to provide the user with a working setup to use Strawberry Fields. We provide a list of dependencies with pinned versions, such that by doing pip install -r requirements.txt, they will get a working combination of dependencies and be able to use Strawberry Fields.