Skip to content

Commit

Permalink
Merge branch 'midas-research:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
azhavoro authored Jul 31, 2024
2 parents 147d5b7 + 6fea78c commit e9aedd1
Show file tree
Hide file tree
Showing 1,106 changed files with 64,346 additions and 35,043 deletions.
14 changes: 11 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
/.git
/.env
/.vscode
/.github
/.husky
/share
/data
/media
/.env
/.vscode
/db.sqlite3
/keys
**/node_modules
/static
/serverless
/site
/helm-chart
/dev
/changelog.d
/cvat-cli
/profiles
8 changes: 7 additions & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (C) 2018-2022 Intel Corporation
// Copyright (C) 2023 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

Expand All @@ -14,9 +15,10 @@ module.exports = {
parser: '@typescript-eslint/parser',
},
ignorePatterns: [
'.eslintrc.js',
'.eslintrc.cjs',
'lint-staged.config.js',
'site/themes/**',
'webpack.config.cjs',
],
plugins: ['@typescript-eslint', 'security', 'no-unsanitized', 'import'],
extends: [
Expand Down Expand Up @@ -53,6 +55,10 @@ module.exports = {
'import/order': ['error', {'groups': ['builtin', 'external', 'internal']}],
'import/prefer-default-export': 0, // works incorrect with interfaces

'react/jsx-indent-props': 0, // new rule, breaks current styling
'react/jsx-indent': 0, // new rule, conflicts with eslint@typescript-eslint/indent eslint@indent, breaks current styling
'function-paren-newline': 0, // new rule, breaks current styling
'@typescript-eslint/default-param-last': 0, // does not really work with redux reducers
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/indent': ['error', 4],
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
options:
- label: I searched the existing issues and did not find anything similar.
required: true
- label: I read/searched [the docs](https://github.com/cvat-ai/cvat/tree/master#documentation)
- label: I read/searched [the docs](https://docs.cvat.ai/docs/)
required: true

- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
options:
- label: I searched the existing issues and did not find anything similar.
required: true
- label: I read/searched [the docs](https://github.com/cvat-ai/cvat/tree/master#documentation)
- label: I read/searched [the docs](https://docs.cvat.ai/docs/)
required: true
- type: textarea
attributes:
Expand Down
14 changes: 7 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Raise an issue to propose your change (https://github.com/opencv/cvat/issues).
<!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues).
It helps to avoid duplication of efforts from multiple independent contributors.
Discuss your ideas with maintainers to be sure that changes will be approved and merged.
Read the [Contribution guide](https://opencv.github.io/cvat/docs/contributing/). -->
Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). -->

<!-- Provide a general summary of your changes in the Title above -->

Expand All @@ -27,13 +27,13 @@ If you're unsure about any of these, don't hesitate to ask. We're here to help!
- [ ] I have linked related issues (see [GitHub docs](
https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [ ] I have increased versions of npm packages if it is necessary
([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),
[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),
[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning) and
[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))
([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),
[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),
[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning) and
[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [ ] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project.
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project.
Feel free to contact the maintainers if that's a concern.
4 changes: 2 additions & 2 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jobs:
Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
**/*.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jobs:
Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
cvat-sdk/**/*.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
REPO: ${{ github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/cache@v3
id: server-cache-action
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/cancel.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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
cname: docs.cvat.ai
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ jobs:
Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'

Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
needs: search_cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

Expand Down Expand Up @@ -160,7 +160,8 @@ jobs:
- name: Install SDK
run: |
pip3 install -r ./tests/python/requirements.txt \
-e './cvat-sdk[pytorch]' -e ./cvat-cli
-e './cvat-sdk[pytorch]' -e ./cvat-cli \
--extra-index-url https://download.pytorch.org/whl/cpu
- name: Running REST API and SDK tests
id: run_tests
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

Expand All @@ -207,12 +208,10 @@ jobs:
- name: Running OPA tests
run: |
python cvat/apps/iam/rules/tests/generate_tests.py \
--output-dir cvat/apps/iam/rules/
python cvat/apps/iam/rules/tests/generate_tests.py
curl -L -o opa https://openpolicyagent.org/downloads/v0.45.0/opa_linux_amd64_static
chmod +x ./opa
./opa test cvat/apps/iam/rules
docker compose run --rm -v "$PWD:/mnt/src:ro" -w /mnt/src \
cvat_opa test cvat/apps/*/rules
- name: Running unit tests
env:
Expand Down Expand Up @@ -257,11 +256,11 @@ jobs:
'actions_projects_models', 'canvas3d_functionality', 'canvas3d_functionality_2',
'issues_prs', 'issues_prs2', 'features']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.x'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jobs:
Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
**/Dockerfile*
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- '**/*.md'
workflow_dispatch:

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

jobs:
testing:
if: |
Expand All @@ -19,7 +23,7 @@ jobs:
!startsWith(github.event.pull_request.title, '[Dependent]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Start minikube
uses: medyagh/setup-minikube@latest
Expand Down Expand Up @@ -82,6 +86,7 @@ jobs:
# They are still tested without Helm
run: |
kubectl cp tests/mounted_file_share/images $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
kubectl cp tests/mounted_file_share/videos $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
pytest --timeout 30 --platform=kube -m "not with_external_services" tests/python --log-cli-level DEBUG
- name: Creating a log file from "cvat" container logs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/isort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ jobs:
Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
cvat-sdk/**/*.py
Expand Down
Loading

0 comments on commit e9aedd1

Please sign in to comment.