Skip to content

Commit

Permalink
merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
summeroff committed Dec 8, 2024
2 parents a1cd143 + 12eec54 commit 1ac092b
Show file tree
Hide file tree
Showing 408 changed files with 9,816 additions and 4,898 deletions.
33 changes: 3 additions & 30 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: files
uses: tj-actions/[email protected]
with:
files: |
cvat-sdk/**/*.py
cvat-cli/**/*.py
tests/python/**/*.py
cvat/apps/quality_control/**/*.py
cvat/apps/analytics_report/**/*.py
dir_names: true

- name: Run checks
env:
PR_FILES_AM: ${{ steps.files.outputs.added_modified }}
PR_FILES_RENAMED: ${{ steps.files.outputs.renamed }}
run: |
# If different modules use different Black configs,
# we need to run Black for each python component group separately.
# Otherwise, they all will use the same config.
pipx install $(grep "^black" ./cvat-cli/requirements/development.txt)
UPDATED_DIRS="${{steps.files.outputs.all_changed_files}}"
echo "Black version: $(black --version)"
if [[ ! -z $UPDATED_DIRS ]]; then
pipx install $(egrep "black.*" ./cvat-cli/requirements/development.txt)
echo "Black version: "$(black --version)
echo "The dirs will be checked: $UPDATED_DIRS"
EXIT_CODE=0
for DIR in $UPDATED_DIRS; do
black --check --diff $DIR || EXIT_CODE=$(($? | $EXIT_CODE)) || true
done
exit $EXIT_CODE
else
echo "No files with the \"py\" extension found"
fi
black --check --diff .
2 changes: 1 addition & 1 deletion .github/workflows/finalize-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Bump version
run:
./dev/update_version.py --minor
./dev/update_version.py --patch

- name: Commit post-release changes
run: |
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
cache-from: type=local,src=/tmp/cvat_cache_server
context: .
file: Dockerfile
tags: cvat/server
tags: cvat/server:${{ env.CVAT_VERSION }}
outputs: type=docker,dest=/tmp/cvat_server/image.tar

- name: CVAT UI. Build and push
Expand All @@ -64,7 +64,7 @@ jobs:
cache-from: type=local,src=/tmp/cvat_cache_ui
context: .
file: Dockerfile.ui
tags: cvat/ui
tags: cvat/ui:${{ env.CVAT_VERSION }}
outputs: type=docker,dest=/tmp/cvat_ui/image.tar

- name: CVAT SDK. Build
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

- name: Download CVAT server image
uses: actions/download-artifact@v4
Expand All @@ -126,8 +126,6 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker tag cvat/ui:latest cvat/ui:${CVAT_VERSION}
docker image ls -a
- name: Verify API schema
Expand Down Expand Up @@ -158,7 +156,7 @@ jobs:
- name: Install SDK
run: |
pip3 install -r ./tests/python/requirements.txt \
-e './cvat-sdk[pytorch]' -e ./cvat-cli \
-e './cvat-sdk[masks,pytorch]' -e ./cvat-cli \
--extra-index-url https://download.pytorch.org/whl/cpu
- name: Running REST API and SDK tests
Expand Down Expand Up @@ -203,7 +201,6 @@ jobs:
- name: Load Docker server image
run: |
docker load --input /tmp/cvat_server/image.tar
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker image ls -a
- name: Running OPA tests
Expand Down Expand Up @@ -280,8 +277,6 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker tag cvat/ui:latest cvat/ui:${CVAT_VERSION}
docker image ls -a
- name: Run CVAT instance
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
cache-from: type=local,src=/tmp/cvat_cache_server
context: .
file: Dockerfile
tags: cvat/server
tags: cvat/server:${{ env.CVAT_VERSION }}
outputs: type=docker,dest=/tmp/cvat_server/image.tar

- name: Instrumentation of the code then rebuilding the CVAT UI
Expand All @@ -81,7 +81,7 @@ jobs:
cache-from: type=local,src=/tmp/cvat_cache_ui
context: .
file: Dockerfile.ui
tags: cvat/ui
tags: cvat/ui:${{ env.CVAT_VERSION }}
outputs: type=docker,dest=/tmp/cvat_ui/image.tar

- name: CVAT SDK. Build
Expand All @@ -95,7 +95,7 @@ jobs:
id: verify_schema
run: |
docker load --input /tmp/cvat_server/image.tar
docker run --rm cvat/server bash \
docker run --rm "cvat/server:${CVAT_VERSION}" bash \
-c 'python manage.py spectacular' > cvat/schema-expected.yml
if ! git diff --no-index cvat/schema.yml cvat/schema-expected.yml; then
Expand All @@ -109,7 +109,7 @@ jobs:
- name: Verify migrations
run: |
docker run --rm cvat/server bash \
docker run --rm "cvat/server:${CVAT_VERSION}" bash \
-c 'python manage.py makemigrations --check'
- name: Upload CVAT server artifact
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

- name: Download CVAT server image
uses: actions/download-artifact@v4
Expand All @@ -156,8 +156,6 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker tag cvat/ui:latest cvat/ui:${CVAT_VERSION}
docker image ls -a
- name: Generate SDK
Expand All @@ -168,7 +166,7 @@ jobs:
- name: Install SDK
run: |
pip3 install -r ./tests/python/requirements.txt \
-e './cvat-sdk[pytorch]' -e ./cvat-cli \
-e './cvat-sdk[masks,pytorch]' -e ./cvat-cli \
--extra-index-url https://download.pytorch.org/whl/cpu
- name: Run REST API and SDK tests
Expand Down Expand Up @@ -221,7 +219,6 @@ jobs:
- name: Load Docker server image
run: |
docker load --input /tmp/cvat_server/image.tar
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker image ls -a
- name: Running OPA tests
Expand Down Expand Up @@ -304,8 +301,6 @@ jobs:
run: |
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker tag cvat/server:latest cvat/server:${CVAT_VERSION}
docker tag cvat/ui:latest cvat/ui:${CVAT_VERSION}
docker image ls -a
- name: Run CVAT instance
Expand Down Expand Up @@ -426,10 +421,10 @@ jobs:
SERVER_IMAGE_REPO: ${{ secrets.DOCKERHUB_WORKSPACE }}/server
UI_IMAGE_REPO: ${{ secrets.DOCKERHUB_WORKSPACE }}/ui
run: |
docker tag cvat/server:latest "${SERVER_IMAGE_REPO}:dev"
docker tag "cvat/server:${CVAT_VERSION}" "${SERVER_IMAGE_REPO}:dev"
docker push "${SERVER_IMAGE_REPO}:dev"
docker tag cvat/ui:latest "${UI_IMAGE_REPO}:dev"
docker tag "cvat/ui:${CVAT_VERSION}" "${UI_IMAGE_REPO}:dev"
docker push "${UI_IMAGE_REPO}:dev"
codecov:
Expand Down
Loading

0 comments on commit 1ac092b

Please sign in to comment.