Skip to content

Commit

Permalink
Upgrade grpcio-tools and protobuf versions
Browse files Browse the repository at this point in the history
Upgraded grpcio-tools from 1.51.1 to 1.66.1 and protobuf from 4.25.4 to 5.28.1 in pyproject.toml and poetry.lock to the latest versions. Updated Dockerfile to adjust paths and improve build context. These changes improve compatibility and maintain security standards.
  • Loading branch information
meanmail committed Sep 18, 2024
1 parent 2e89ce4 commit 160ae0d
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 72 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
steps:
- name: Run tests
run: |
poetry run python -m pytest
poetry run pytest
build:
runs-on: [ self-hosted, small ]
Expand All @@ -73,20 +73,20 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.git,__pycache__,docs/source/conf.py,old,build,dist,venv,test/resources,.eggs,review.egg-info,.pytest_cache,node_modules,hyperstyle/src/python/review/inspectors/common/inspector/proto
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.git,__pycache__,docs/source/conf.py,old,build,dist,venv,test/resources,.eggs,review.egg-info,.pytest_cache,node_modules,hyperstyle/src/python/review/inspectors/common/inspector/proto
# TODO: change max-complexity into 10 after refactoring
# TODO: remove R504, A003, E800, E402, WPS1, WPS2, WPS3, WPS4, WPS5, WPS6, H601
poetry run python -m flake8 . --count --max-complexity=11 --max-line-length=120 --max-doc-length=120 --ignore=R504,A003,E800,E402,W503,WPS,H601,N400,I100,I201,I202, --statistics --exclude=.git,__pycache__,docs/source/conf.py,old,build,dist,venv,test/resources,.eggs,review.egg-info,.pytest_cache,node_modules,hyperstyle/src/python/review/inspectors/common/inspector/proto
poetry run flake8 . --count --max-complexity=11 --max-line-length=120 --max-doc-length=120 --ignore=R504,A003,E800,E402,W503,WPS,H601,N400,I100,I201,I202, --statistics --exclude=.git,__pycache__,docs/source/conf.py,old,build,dist,venv,test/resources,.eggs,review.egg-info,.pytest_cache,node_modules,hyperstyle/src/python/review/inspectors/common/inspector/proto
- name: Check installed module can run python linters
run: |
poetry run review test/resources/inspectors/python/case39_no_issues.py
poetry run python -m hyperstyle.src.python.review.run_tool test/resources/inspectors/python/case39_no_issues.py
- name: Check installed module can run java linters
run: |
poetry run review test/resources/inspectors/java/test_algorithm_with_scanner.java
poetry run python -m hyperstyle.src.python.review.run_tool test/resources/inspectors/java/test_algorithm_with_scanner.java
- name: Check installed module can run js linters
run: |
poetry run review test/resources/inspectors/js/case0_no_issues.js
poetry run python -m hyperstyle.src.python.review.run_tool test/resources/inspectors/js/case0_no_issues.js
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ RUN curl -sSfLO https://raw.githubusercontent.com/StepicOrg/epicbox-images/a5ead
ARG POETRY_VERSION=1.8.3
RUN pip install poetry==${POETRY_VERSION}

WORKDIR /review

COPY pyproject.toml poetry.lock ./
RUN poetry install --no-interaction --no-ansi --no-cache --no-root

COPY . review
COPY . .

RUN PROTO_PATH="review/hyperstyle/src/python/review/inspectors/common/inspector/proto" \
RUN PROTO_PATH="hyperstyle/src/python/review/inspectors/common/inspector/proto" \
&& poetry run python -m grpc_tools.protoc --proto_path=. --python_out=. --pyi_out=. --grpc_python_out=. ${PROTO_PATH}/model.proto

CMD ["poetry", "run", "python", "-m", "pytest"]
Loading

0 comments on commit 160ae0d

Please sign in to comment.