This PR does several things to enable nightly testing of Haystack 2.x tutorials.
I updated the generate_matrix.py script to return different tutorials depending on the version it's called with.
Calling it with python ./scripts/generate_matrix.py --haystack-version "v2.0.0" will generate a matrix with Haystack 2 tutorials only. python ./scripts/generate_matrix.py --haystack-version "v1.25.1" instead will generate one with only Haystack 1 tutorials. It relies on the haystack_2 field in index.toml for this.
In index.toml I also added a dependencies field, that is a list of all pip dependencies that will be installed before running that tutorial. I added the field only on Haystack 2 tutorials. This eases immensely deps install for testing.
I also had to change most Haystack 2 tutorials to correctly handle secrets as getpass can't be run in CI.
nightly.yaml has been changed so that tutorials are ran in two separate jobs depending on the Haystack version. Haystack 2 tutorials require different steps so it makes sense to keep them separate. It will also be easier to remove Haystack 1 tutorials when we drop support for it.
Part of #197.
This PR does several things to enable nightly testing of Haystack 2.x tutorials.
I updated the
generate_matrix.py
script to return different tutorials depending on the version it's called with.Calling it with
python ./scripts/generate_matrix.py --haystack-version "v2.0.0"
will generate a matrix with Haystack 2 tutorials only.python ./scripts/generate_matrix.py --haystack-version "v1.25.1"
instead will generate one with only Haystack 1 tutorials. It relies on thehaystack_2
field inindex.toml
for this.In
index.toml
I also added adependencies
field, that is a list of allpip
dependencies that will be installed before running that tutorial. I added the field only on Haystack 2 tutorials. This eases immensely deps install for testing.I also had to change most Haystack 2 tutorials to correctly handle secrets as
getpass
can't be run in CI.nightly.yaml
has been changed so that tutorials are ran in two separate jobs depending on the Haystack version. Haystack 2 tutorials require different steps so it makes sense to keep them separate. It will also be easier to remove Haystack 1 tutorials when we drop support for it.I also handled the issue that we fixed with #308.
Example run 👇 https://github.com/deepset-ai/haystack-tutorials/actions/runs/8471615895