Skip to content

Commit

Permalink
Merge branch 'develop' into kl/event-for-logged-out-user
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Mar 29, 2024
2 parents 97dcbe7 + 85f5376 commit d8635c3
Show file tree
Hide file tree
Showing 19 changed files with 587 additions and 396 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Docs
on:
push:
branches:
- 'master'
- 'develop'
pull_request:
types: [ready_for_review, opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
generate_github_pages:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Generate CVAT SDK
run: |
pip3 install --user -r cvat-sdk/gen/requirements.txt
./cvat-sdk/gen/generate.sh
- name: Setup Hugo
run: |
wget https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_Linux-64bit.tar.gz
(mkdir hugo_extended_0.110.0_Linux-64bit && tar -xf hugo_extended_0.110.0_Linux-64bit.tar.gz -C hugo_extended_0.110.0_Linux-64bit)
wget https://github.com/gohugoio/hugo/releases/download/v0.83.0/hugo_extended_0.83.0_Linux-64bit.tar.gz
(mkdir hugo_extended_0.83.0_Linux-64bit && tar -xf hugo_extended_0.83.0_Linux-64bit.tar.gz -C hugo_extended_0.83.0_Linux-64bit)
mkdir hugo
cp hugo_extended_0.110.0_Linux-64bit/hugo hugo/hugo-0.110
cp hugo_extended_0.83.0_Linux-64bit/hugo hugo/hugo-0.83
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18.x'

- name: Install npm packages
working-directory: ./site
run: |
npm ci
- name: Build docs
run: |
pip install -r site/requirements.txt
python site/process_sdk_docs.py
PATH="$PWD/hugo:$PATH" python site/build_docs.py
env:
HUGO_ENV: production

- name: Deploy
if: github.ref == 'refs/heads/develop'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true
55 changes: 1 addition & 54 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,62 +385,9 @@ jobs:
name: cypress_screenshots_${{ matrix.specs }}
path: ${{ github.workspace }}/tests/cypress/screenshots

generate_github_pages:
needs: [rest_api_testing, unit_testing, e2e_testing]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Download CVAT SDK
uses: actions/download-artifact@v3
with:
name: cvat_sdk
path: /tmp/cvat_sdk/

- name: Setup Hugo
run: |
wget https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_Linux-64bit.tar.gz
(mkdir hugo_extended_0.110.0_Linux-64bit && tar -xf hugo_extended_0.110.0_Linux-64bit.tar.gz -C hugo_extended_0.110.0_Linux-64bit)
wget https://github.com/gohugoio/hugo/releases/download/v0.83.0/hugo_extended_0.83.0_Linux-64bit.tar.gz
(mkdir hugo_extended_0.83.0_Linux-64bit && tar -xf hugo_extended_0.83.0_Linux-64bit.tar.gz -C hugo_extended_0.83.0_Linux-64bit)
mkdir hugo
cp hugo_extended_0.110.0_Linux-64bit/hugo hugo/hugo-0.110
cp hugo_extended_0.83.0_Linux-64bit/hugo hugo/hugo-0.83
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18.x'

- name: Install npm packages
working-directory: ./site
run: |
npm ci
- name: Build docs
run: |
pip install -r site/requirements.txt
python site/process_sdk_docs.py --input-dir /tmp/cvat_sdk/docs/ --site-root site/
PATH="$PWD/hugo:$PATH" python site/build_docs.py
env:
HUGO_ENV: production

- name: Deploy
if: github.ref == 'refs/heads/develop'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true

publish_dev_images:
if: github.ref == 'refs/heads/develop'
needs: [rest_api_testing, unit_testing, e2e_testing, generate_github_pages]
needs: [rest_api_testing, unit_testing, e2e_testing]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions changelog.d/20240315_183623_avaicode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Fixed

- Changed interpolation behavior in `annotation.py`, now correctly keep the last frame
- Insert last frame if it is key to the track, fixes data corruption when tracks crossing more than 1 jobs
(<https://github.com/opencv/cvat/pull/7615>)
4 changes: 2 additions & 2 deletions cvat/apps/analytics_report/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_queryset(self):

@extend_schema(
operation_id="analytics_create_report",
summary="Creates a analytics report asynchronously and allows to check request status",
summary="Create an analytics report",
parameters=[
OpenApiParameter(
"rq_id",
Expand Down Expand Up @@ -144,7 +144,7 @@ def create(self, request, *args, **kwargs):
return Response(serializer.data, status=status.HTTP_201_CREATED)

@extend_schema(
summary="Method returns analytics report",
summary="Get an analytics report",
methods=["GET"],
operation_id="analytics_get_reports",
description="Receive analytics report",
Expand Down
7 changes: 5 additions & 2 deletions cvat/apps/dataset_manager/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,16 @@ def filter_track_shapes(shapes):

if len(segment_shapes) < len(track['shapes']):
interpolated_shapes = TrackManager.get_interpolated_shapes(
track, start, stop, dimension)
track, start, stop + 1, dimension)
scoped_shapes = filter_track_shapes(interpolated_shapes)

if scoped_shapes:
last_key = sorted(track['shapes'], key=lambda s: s['frame'])[-1]['frame']
if not scoped_shapes[0]['keyframe']:
segment_shapes.insert(0, scoped_shapes[0])
if scoped_shapes[-1]['keyframe'] and \
if last_key >= stop and scoped_shapes[-1]['points'] != segment_shapes[-1]['points']:
segment_shapes.append(scoped_shapes[-1])
elif scoped_shapes[-1]['keyframe'] and \
scoped_shapes[-1]['outside']:
segment_shapes.append(scoped_shapes[-1])
elif stop + 1 < len(interpolated_shapes) and \
Expand Down
Loading

0 comments on commit d8635c3

Please sign in to comment.