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

Make check/nbfmt more careful about tensorflow-docs #219

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mhucka
Copy link
Contributor

@mhucka mhucka commented Feb 28, 2025

If the user previously installed unitary in one virtual environment, did the pip install -r requirements.txt, ran check/nbfmt (which in turn installs dev_tools/nbformat and tensorflow-docs), then at a later time created a different virtual environment, did the same installation steps, and ran check/nbfmt, it would fail because the presence of dev_tools/nbformat fooled nbfmt into thinking tensorflow-docs was already installed. A solution is to decouple of check for the nbformat script and the tensorflow-docs package.

I also tweaked the error-message rewriting code at the very end, because it wasn't doing the substitution in my environment. (That might be because the stock version of Bash on MacOS is an old 3.2.)

If the user previously installed unitary in one virtual environment,
did the `pip install -r requirements.txt`, ran `check/nbfmt` (which in
turn installs `dev_tools/nbformat` and tensorflow-docs), then at a
later time created a different virtual environment, did the same
installation steps, and ran `check/nbfmt`, it would fail because the
presence of `dev_tools/nbformat` fooled `nbfmt` into thinking
tensorflow-docs was already installed. A solution is to decouple of
check for the nbformat script and the tensorflow-docs package.

I also tweaked the error-message rewriting code at the very end,
because it wasn't doing the substitution in my environment. (That
might be because the stock version of Bash on MacOS is an old 3.2.)
@mhucka
Copy link
Contributor Author

mhucka commented Feb 28, 2025

Note: the current CI check failures should disappear after PR #220 is applied.

@mhucka mhucka marked this pull request as ready for review February 28, 2025 18:31
@mhucka mhucka requested a review from dstrain115 February 28, 2025 18:31
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.

1 participant