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

(ci) fix notebook environments in ci #907

Merged
merged 11 commits into from
Sep 6, 2024
Merged

Conversation

thomasht86
Copy link
Collaborator

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

This PR solves #905 while still allowing us to keep using

!pip3 install package1 package2

in the notebooks, so they they can be run directly from Colab.

To achieve this, I added a script that:

  • Identifies these lines.
  • Removes pyvespa and vespacli as they are already installed.
  • Adds the other packages to a additional_requirements.txt
  • Install these only.
  • Comments out the installation line from the notebook
  • Runs the notebook test.

Also, moved to using uv for package management for speed and ability to lock versions, in preparation for #824 . (For this workflow only for now, others to follow)

@thomasht86 thomasht86 requested a review from esolitos September 5, 2024 11:48
Copy link
Contributor

@esolitos esolitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are green and the logic seems fine. 😊

Added just a couple of comments, they don't need to be done now, just a suggestion fro the future.

notebook=$1

# Now you can use the variable $notebook in your script
echo "The path to the notebook is \"$notebook\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps some (most?) of those echo should use the debug output option/prefix, so that we only show what is necessary on a normal run?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, didn't know about this. Thx!
Will fix the next times these files are touched!

Comment on lines +75 to +76
echo "Running replace_pip_install_notebooks.sh"
sh .github/scripts/replace_pip_install_notebooks.sh ${{ matrix.notebook }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output of this could be wrapped in a log group. 😉

@thomasht86 thomasht86 merged commit 61529bf into master Sep 6, 2024
55 checks passed
@thomasht86 thomasht86 deleted the thomasht86/fix-notebook-envs branch September 6, 2024 07:39
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.

2 participants