deepset-ai / haystack-tutorials

Here you can find all the Tutorials for Haystack 📓
https://haystack.deepset.ai/tutorials
Apache License 2.0
227 stars 80 forks source link

Update nightly tests for Haystack 2 #312

Closed silvanocerza closed 3 months ago

silvanocerza commented 3 months ago

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 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.

I also handled the issue that we fixed with #308.

Example run 👇 https://github.com/deepset-ai/haystack-tutorials/actions/runs/8471615895

review-notebook-app[bot] commented 3 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB