Compare commits

...
Author SHA1 Message Date
ivanmkc bef66d0856 Ran linter 2022-10-21 15:48:34 -04:00
ivanmkc d8f9cacfd8 Added image to notebook lint 2022-10-21 15:34:11 -04:00
nikitamaia c92d4d8e74 ran linter 2022-10-21 12:31:43 -05:00
nikitamaia 3a95313fac fix failing test 2022-10-20 09:38:58 -05:00
nikitamaia a63aa0d4d1 fix lint errors 2022-10-14 13:54:10 -05:00
nikitamaia 268bc535d6 Added notebook demonstrating hyperparameter tuning 2022-10-14 10:58:25 -05:00
3 changed files with 1256 additions and 28 deletions
+31 -28
View File
@@ -5,34 +5,37 @@ jobs:
format_and_lint:
name: notebook format and lint
runs-on: ubuntu-latest
container:
image: gcr.io/python-docs-samples-tests/notebook_linter
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Fetch pull request branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch base main branch
run: git fetch -u "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" main:main
- name: Install requirements
run: python3 -m pip install -U -r .github/workflows/linter/requirements.txt
- name: Format and lint notebooks
run: |
set +e
# - name: Log the pip deps
# run: |
# pip freeze
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.x'
- name: Fetch pull request branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch base main branch
run: git fetch -u "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" main:main
- name: Format and lint notebooks
run: |
set +e
.github/workflows/linter/run_linter.sh -t
RTN=$?
.github/workflows/linter/run_linter.sh -t
RTN=$?
if [ "$RTN" != "0" ]; then
echo "There were problems formatting/linting the notebooks."
echo "Please run the following commands locally from the root directory to attempt to autofix the issues:"
echo ""
echo "python3 -m pip install -U -r .github/workflows/linter/requirements.txt"
echo ".github/workflows/linter/run_linter.sh"
echo ""
echo "If it can't be autofixed, please fix them manually."
echo "Then, commit the fixes and push again."
exit 1
fi
if [ "$RTN" != "0" ]; then
echo "There were problems formatting/linting the notebooks."
echo "Please run the following commands locally from the root directory to attempt to autofix the issues:"
echo ""
echo "python3 -m pip install -U -r .github/workflows/linter/requirements.txt"
echo ".github/workflows/linter/run_linter.sh"
echo ""
echo "If it can't be autofixed, please fix them manually."
echo "Then, commit the fixes and push again."
exit 1
fi
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB