Skip to content

Commit 8d0e64d

Browse files
committed
add steps for the workflow to commit changes in licenses
1 parent d9c85cc commit 8d0e64d

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed

.github/workflows/python_lint.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,35 @@ on:
88
branches: [ release-1.19.0-prep ]
99
workflow_dispatch:
1010

11+
env:
12+
GITHUB_USER: seldondev
13+
1114
jobs:
1215
python-lint:
13-
1416
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
1519
container: seldonio/python-builder:0.9
1620

1721
steps:
1822
- uses: actions/checkout@v4
1923
with:
2024
fetch-depth: '0'
21-
- name: lint-python
22-
run: make -C python install_dev lint
25+
26+
- name: Install dev deps
27+
run: make -C python install_dev update_package install
28+
29+
- name: Lint
30+
run: make -C python lint
31+
32+
- name: Make licenses
33+
run: make -C python licenses
34+
35+
- name: Configure git user
36+
run: |
37+
git config --global user.name "${GITHUB_USER}"
38+
git config --global user.email "${GITHUB_USER}@users.noreply.github.com"
39+
40+
- name: Commit changes in licensing
41+
run: |
42+
git add python/ && git commit -m "chore: automatically push the changed licenses files" || echo "Nothing to commit"

python/Makefile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,17 @@ fmt:
107107
nbqa isort \
108108
../ --profile black --nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
109109

110-
.ONESHELL:
111110
lint:
112-
#black \
113-
# --check ./ ../testing/scripts \
114-
# --exclude "(proto|seldon_core/proto/|.eggs|.tox)"
115-
# isort \
116-
# --check-only ./ ../testing/scripts \
117-
# --skip proto --skip seldon_core/proto --skip .eggs --skip .tox
118-
#flake8
119-
#nbqa black \
120-
# ../ --check --nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
121-
#nbqa isort ../ --check-only --profile black --nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
122-
#git -C .. \
123-
# --no-pager diff \
124-
# --exit-code \
125-
# -- python/licenses/license_info.no_versions.csv
126-
git -C "$(REPO_ROOT)" --no-pager diff --exit-code -- python/licenses/license_info.no_versions.csv
111+
black \
112+
--check ./ ../testing/scripts \
113+
--exclude "(proto|seldon_core/proto/|.eggs|.tox)"
114+
isort \
115+
--check-only ./ ../testing/scripts \
116+
--skip proto --skip seldon_core/proto --skip .eggs --skip .tox
117+
flake8
118+
nbqa black \
119+
../ --check --nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
120+
nbqa isort ../ --check-only --profile black --nbqa-exclude "(proto|seldon_core/proto/|.eggs|.tox|_README\.ipynb)"
127121

128122
.PHONY: clean
129123
clean:

0 commit comments

Comments
 (0)