From e59cd7414a8070fb34bb43088cf82afe09eac74f Mon Sep 17 00:00:00 2001 From: "cvat-bot[bot]" <147643061+cvat-bot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:17:04 +0000 Subject: [PATCH 01/38] Update develop after v2.23.1 --- cvat-cli/requirements/base.txt | 2 +- cvat-cli/src/cvat_cli/version.py | 2 +- cvat-sdk/gen/generate.sh | 2 +- cvat/__init__.py | 2 +- cvat/schema.yml | 2 +- docker-compose.yml | 20 ++++++++++---------- helm-chart/values.yaml | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cvat-cli/requirements/base.txt b/cvat-cli/requirements/base.txt index 8793644b6339..ed0e7619253b 100644 --- a/cvat-cli/requirements/base.txt +++ b/cvat-cli/requirements/base.txt @@ -1,3 +1,3 @@ -cvat-sdk~=2.23.1 +cvat-sdk~=2.23.2 Pillow>=10.3.0 setuptools>=70.0.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/cvat-cli/src/cvat_cli/version.py b/cvat-cli/src/cvat_cli/version.py index c642e25a75ea..a8db20fc3a49 100644 --- a/cvat-cli/src/cvat_cli/version.py +++ b/cvat-cli/src/cvat_cli/version.py @@ -1 +1 @@ -VERSION = "2.23.1" +VERSION = "2.23.2" diff --git a/cvat-sdk/gen/generate.sh b/cvat-sdk/gen/generate.sh index de41d2f680cb..1131ef70d1c9 100755 --- a/cvat-sdk/gen/generate.sh +++ b/cvat-sdk/gen/generate.sh @@ -8,7 +8,7 @@ set -e GENERATOR_VERSION="v6.0.1" -VERSION="2.23.1" +VERSION="2.23.2" LIB_NAME="cvat_sdk" LAYER1_LIB_NAME="${LIB_NAME}/api_client" DST_DIR="$(cd "$(dirname -- "$0")/.." && pwd)" diff --git a/cvat/__init__.py b/cvat/__init__.py index 48299beff13a..8ebb57409985 100644 --- a/cvat/__init__.py +++ b/cvat/__init__.py @@ -4,6 +4,6 @@ from cvat.utils.version import get_version -VERSION = (2, 23, 1, "final", 0) +VERSION = (2, 23, 2, "alpha", 0) __version__ = get_version(VERSION) diff --git a/cvat/schema.yml b/cvat/schema.yml index 4b261f66c905..38e74d7936e0 100644 --- a/cvat/schema.yml +++ b/cvat/schema.yml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: CVAT REST API - version: 2.23.1 + version: 2.23.2 description: REST API for Computer Vision Annotation Tool (CVAT) termsOfService: https://www.google.com/policies/terms/ contact: diff --git a/docker-compose.yml b/docker-compose.yml index b00ff6ba3ac6..a921b70cbf9f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,7 +79,7 @@ services: cvat_server: container_name: cvat_server - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: <<: *backend-deps @@ -113,7 +113,7 @@ services: cvat_utils: container_name: cvat_utils - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -130,7 +130,7 @@ services: cvat_worker_import: container_name: cvat_worker_import - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -146,7 +146,7 @@ services: cvat_worker_export: container_name: cvat_worker_export - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -162,7 +162,7 @@ services: cvat_worker_annotation: container_name: cvat_worker_annotation - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -178,7 +178,7 @@ services: cvat_worker_webhooks: container_name: cvat_worker_webhooks - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -194,7 +194,7 @@ services: cvat_worker_quality_reports: container_name: cvat_worker_quality_reports - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -210,7 +210,7 @@ services: cvat_worker_analytics_reports: container_name: cvat_worker_analytics_reports - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -226,7 +226,7 @@ services: cvat_worker_chunks: container_name: cvat_worker_chunks - image: cvat/server:${CVAT_VERSION:-v2.23.1} + image: cvat/server:${CVAT_VERSION:-dev} restart: always depends_on: *backend-deps environment: @@ -242,7 +242,7 @@ services: cvat_ui: container_name: cvat_ui - image: cvat/ui:${CVAT_VERSION:-v2.23.1} + image: cvat/ui:${CVAT_VERSION:-dev} restart: always depends_on: - cvat_server diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index be05c90f1960..ae0180efd972 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -139,7 +139,7 @@ cvat: additionalVolumeMounts: [] replicas: 1 image: cvat/server - tag: v2.23.1 + tag: dev imagePullPolicy: Always permissionFix: enabled: true @@ -162,7 +162,7 @@ cvat: frontend: replicas: 1 image: cvat/ui - tag: v2.23.1 + tag: dev imagePullPolicy: Always labels: {} # test: test From 094c62d7c52ac5bb230b22daabec2d5d88de1be7 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Mon, 9 Dec 2024 11:45:57 +0200 Subject: [PATCH 02/38] Remove the `ready_for_review` trigger from the Docs workflow (#8788) This workflow runs for draft PRs, so there's no need to run it again when a PR is marked as ready. --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b52deddc3f58..c93361d55975 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,7 +5,7 @@ on: - 'master' - 'develop' pull_request: - types: [ready_for_review, opened, synchronize, reopened] + types: [opened, synchronize, reopened] concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 9a08a0c19e0ebbb523bf1bbae15b90ecd95486e3 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 10 Dec 2024 17:31:51 +0200 Subject: [PATCH 03/38] Nuclio functions in cvat network (#8777) --- docker-compose.yml | 2 ++ serverless/deploy_cpu.sh | 6 +++--- serverless/deploy_gpu.sh | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a921b70cbf9f..c13cb5bab74f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: MIT +name: cvat + x-backend-env: &backend-env CVAT_POSTGRES_HOST: cvat_db CVAT_REDIS_INMEM_HOST: cvat_redis_inmem diff --git a/serverless/deploy_cpu.sh b/serverless/deploy_cpu.sh index 9f37ea020a6b..1e3834edbd99 100755 --- a/serverless/deploy_cpu.sh +++ b/serverless/deploy_cpu.sh @@ -26,9 +26,9 @@ do echo "Deploying $func_rel_path function..." nuctl deploy --project-name cvat --path "$func_root" \ --file "$func_config" --platform local \ - --env CVAT_REDIS_HOST=$(echo ${CVAT_REDIS_INMEM_HOST:-cvat_redis_ondisk}) \ - --env CVAT_REDIS_PORT=$(echo ${CVAT_REDIS_INMEM_PORT:-6666}) \ - --env CVAT_REDIS_PASSWORD=$(echo ${CVAT_REDIS_INMEM_PASSWORD}) + --env CVAT_FUNCTIONS_REDIS_HOST=cvat_redis_ondisk \ + --env CVAT_FUNCTIONS_REDIS_PORT=6666 \ + --platform-config '{"attributes": {"network": "cvat_cvat"}}' done nuctl get function --platform local diff --git a/serverless/deploy_gpu.sh b/serverless/deploy_gpu.sh index 9c8e1515b73b..49d71ff352c3 100755 --- a/serverless/deploy_gpu.sh +++ b/serverless/deploy_gpu.sh @@ -18,9 +18,9 @@ do echo "Deploying $func_rel_path function..." nuctl deploy --project-name cvat --path "$func_root" \ --file "$func_config" --platform local \ - --env CVAT_REDIS_HOST=$(echo ${CVAT_REDIS_INMEM_HOST:-cvat_redis_ondisk}) \ - --env CVAT_REDIS_PORT=$(echo ${CVAT_REDIS_INMEM_PORT:-6666}) \ - --env CVAT_REDIS_PASSWORD=$(echo ${CVAT_REDIS_INMEM_PASSWORD}) + --env CVAT_FUNCTIONS_REDIS_HOST=cvat_redis_ondisk \ + --env CVAT_FUNCTIONS_REDIS_PORT=6666 \ + --platform-config '{"attributes": {"network": "cvat_cvat"}}' done nuctl get function --platform local From 90f12babfe3799021ba3a5cf782d0d3b0cdde431 Mon Sep 17 00:00:00 2001 From: Oleg Valiulin Date: Tue, 10 Dec 2024 15:59:35 +0000 Subject: [PATCH 04/38] Fix instructions for running tests (#8808) Update instructions for running tests: - for running docker without sudo, the user has to be in docker group (as per Docker's [Linux post-install](https://docs.docker.com/engine/install/linux-postinstall/)) - the referenced guide already has instructions for installing the local packages, no need to duplicate it here --- tests/python/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/python/README.md b/tests/python/README.md index 74373153085b..3a7b246c5508 100644 --- a/tests/python/README.md +++ b/tests/python/README.md @@ -20,13 +20,15 @@ the server calling REST API directly (as it done by users). ## How to run? **Initial steps** +1. On Debian/Ubuntu, make sure that your `$USER` is in `docker` group: + ```shell + sudo usermod -aG docker $USER + ``` 1. Follow [this guide](../../site/content/en/docs/api_sdk/sdk/developer-guide.md) to prepare `cvat-sdk` and `cvat-cli` source code 1. Install all necessary requirements before running REST API tests: - ``` + ```shell pip install -r ./tests/python/requirements.txt - pip install -e ./cvat-sdk - pip install -e ./cvat-cli ``` 1. Stop any other CVAT containers which you run previously. They keep ports which are used by containers for the testing system. From 15fd273ee3bd385ba8be014c481d4a12a7a1f9ad Mon Sep 17 00:00:00 2001 From: Oleg Valiulin Date: Tue, 10 Dec 2024 16:00:32 +0000 Subject: [PATCH 05/38] Update pip install command for local packages (#8809) ```pip install cvat-sdk/``` command is error-prone, the user can easily forget the slash and start downloading from PyPI, which is not required. To avoid this, it's better to write explicitly with current directory in mind --- site/content/en/docs/api_sdk/sdk/developer-guide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/en/docs/api_sdk/sdk/developer-guide.md b/site/content/en/docs/api_sdk/sdk/developer-guide.md index 65047488df34..ddb62344eab3 100644 --- a/site/content/en/docs/api_sdk/sdk/developer-guide.md +++ b/site/content/en/docs/api_sdk/sdk/developer-guide.md @@ -32,15 +32,15 @@ the repository. To get the full package, one need to generate missing package fi 1. Install the packages: ```bash - pip install cvat-sdk/ - pip install cvat-cli/ + pip install ./cvat-sdk + pip install ./cvat-cli ``` If you want to edit package files, install them with `-e`: ```bash - pip install -e cvat-sdk/ - pip install -e cvat-cli/ + pip install -e ./cvat-sdk + pip install -e ./cvat-cli ``` ## How to edit templates From 17016dedeb7249178b129a63dc8cd08311e7b5c2 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 10 Dec 2024 18:50:09 +0200 Subject: [PATCH 06/38] Added support for boolean parameters in annotations actions (#8798) --- ...0241209_110126_sekachev.bs_support_boolean.md | 4 ++++ cvat-core/src/annotations-actions/base-action.ts | 1 + .../annotations-actions-modal.tsx | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20241209_110126_sekachev.bs_support_boolean.md diff --git a/changelog.d/20241209_110126_sekachev.bs_support_boolean.md b/changelog.d/20241209_110126_sekachev.bs_support_boolean.md new file mode 100644 index 000000000000..4e0e98e1aba2 --- /dev/null +++ b/changelog.d/20241209_110126_sekachev.bs_support_boolean.md @@ -0,0 +1,4 @@ +### Added + +- Support for boolean parameters in annotations actions + () diff --git a/cvat-core/src/annotations-actions/base-action.ts b/cvat-core/src/annotations-actions/base-action.ts index 3246261d2c9a..2ec2148b24c7 100644 --- a/cvat-core/src/annotations-actions/base-action.ts +++ b/cvat-core/src/annotations-actions/base-action.ts @@ -9,6 +9,7 @@ import { Job, Task } from '../session'; export enum ActionParameterType { SELECT = 'select', NUMBER = 'number', + CHECKBOX = 'checkbox', } // For SELECT values should be a list of possible options diff --git a/cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx b/cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx index f33dd9bf231a..fc98e3c27fa8 100644 --- a/cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx +++ b/cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx @@ -25,10 +25,12 @@ import { getCVATStore } from 'cvat-store'; import { BaseCollectionAction, BaseAction, Job, getCore, ObjectState, + ActionParameterType, } from 'cvat-core-wrapper'; import { Canvas } from 'cvat-canvas-wrapper'; import { fetchAnnotationsAsync } from 'actions/annotation-actions'; import { clamp } from 'utils/math'; +import { Switch } from 'antd/lib'; const core = getCore(); @@ -248,7 +250,7 @@ function ActionParameterComponent(props: ActionParameterProps & { onChange: (val const computedValues = typeof values === 'function' ? values({ instance: job }) : values; - if (type === 'select') { + if (type === ActionParameterType.SELECT) { return (