Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce testing #3

Merged
merged 4 commits into from
Sep 13, 2022
Merged

Introduce testing #3

merged 4 commits into from
Sep 13, 2022

Conversation

masci
Copy link
Contributor

@masci masci commented Sep 12, 2022

This PR introduces notebooks testing, very close to what we have in Haystack:

  1. We execute the notebooks that have changed in a PR
  2. We check that the markdowns have been generated correctly at every PR
  3. We execute all (with the exclusion of those requiring a GPU) the notebooks every night3.

As we decided to stop supporting the pure Python version of the tutorials, the testing strategy consists of two steps:

  • At every PR, we convert the notebook into a Python script with nbconvert
  • We then run the Python script

The conversion drops any cell containing shell scripts, in order to avoid errors in the CI. To be able to do this, the notebooks need a bit of refactoring, grouping all the shell script code in dedicated cells - this has already been done in this PR for Tutorial 01 as an example. The rest of the tutorials will be adapted in subsequent PRs.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@masci masci marked this pull request as ready for review September 12, 2022 13:19
@TuanaCelik
Copy link
Member

Looks good to me. As I can see this PR doesn't only include Tutorial 1 refactors as an example but it will also only attempt to run tutorial 1. Happy to merge if that's the case and I'm not missing anything..

@masci
Copy link
Contributor Author

masci commented Sep 13, 2022

@TuanaCelik yes, tutorial 01 is executed both on PRs touching it and nightlies

@TuanaCelik TuanaCelik merged commit fd6fc0d into main Sep 13, 2022
@TuanaCelik TuanaCelik deleted the massi/ci branch September 13, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants