Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
Browse files Browse the repository at this point in the history
…o openvinotoolkit-develop

* 'develop' of https://github.com/openvinotoolkit/cvat: (181 commits)
  Cypress. Update case 105. Add check "Google cloud storage" provider fields. (cvat-ai#3980)
  Cypress. Fix case 108 for Firefox. (cvat-ai#3981)
  update project section (cvat-ai#3979)
  Cypress. Test "Rotated bounding boxes" (cvat-ai#3961)
  Issue deleting (cvat-ai#3952)
  Remove key_file_path field (cvat-ai#3959)
  update the doc for change default hostname or port (cvat-ai#3915)
  CVAT_server. Test for "Project updated time". (cvat-ai#3953)
  fix: cvat/requirements/base.txt to reduce vulnerabilities (cvat-ai#3970)
  Fix notification (cvat-ai#3960)
  Update documentation for China users (cvat-ai#3946)
  Support GCS (cvat-ai#3919)
  Cypress. Update the test for check issue 3810. (cvat-ai#3900)
  Update the documentation about the smooth image option (cvat-ai#3947)
  Project tasks pagination (cvat-ai#3910)
  Update documentation about review mode (cvat-ai#3944)
  Preserve the order of the label attributes in the object item details. (cvat-ai#3945)
  Added smooth image option (cvat-ai#3933)
  Fixed issue: autoborder points are visible for invisible shapes (cvat-ai#3931)
  Add FiftyOne to partners list (cvat-ai#3943)
  ...
  • Loading branch information
sarikaya committed Dec 4, 2021
2 parents f4bda3c + c79a4c1 commit e219323
Show file tree
Hide file tree
Showing 549 changed files with 116,584 additions and 61,456 deletions.
36 changes: 34 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

module.exports = {
root: true,
env: {
node: true,
browser: true,
Expand All @@ -12,12 +13,43 @@ module.exports = {
sourceType: 'module',
ecmaVersion: 2018,
},
plugins: ['eslint-plugin-header'],
extends: ['eslint:recommended', 'prettier'],
ignorePatterns: [
'.eslintrc.js',
'lint-staged.config.js',
],
plugins: ['security', 'no-unsanitized', 'eslint-plugin-header', 'import'],
extends: [
'eslint:recommended', 'plugin:security/recommended', 'plugin:no-unsanitized/DOM',
'airbnb-base', 'plugin:import/errors', 'plugin:import/warnings',
'plugin:import/typescript',
],
rules: {
'header/header': [2, 'line', [{
pattern: ' {1}Copyright \\(C\\) (?:20\\d{2}-)?2021 Intel Corporation',
template: ' Copyright (C) 2021 Intel Corporation'
}, '', ' SPDX-License-Identifier: MIT']],
'no-plusplus': 0,
'no-continue': 0,
'no-console': 0,
'no-param-reassign': ['error', { 'props': false }],
'no-restricted-syntax': [0, { selector: 'ForOfStatement' }],
'no-await-in-loop': 0,
'indent': ['error', 4, { 'SwitchCase': 1 }],
'max-len': ['error', { code: 120, ignoreStrings: true }],
'func-names': 0,
'valid-typeof': 0,
'no-useless-constructor': 0, // sometimes constructor is necessary to generate right documentation in cvat-core
'quotes': ['error', 'single'],
'lines-between-class-members': 0,
'class-methods-use-this': 0,
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'max-classes-per-file': 0,
'operator-linebreak': ['error', 'after'],
'newline-per-chained-call': 0,
'global-require': 0,
'arrow-parens': ['error', 'always'],
'security/detect-object-injection': 0, // the rule is relevant for user input data on the node.js environment
'import/order': ['error', {'groups': ['builtin', 'external', 'internal']}],
'import/prefer-default-export': 0, // works incorrect with interfaces
},
};
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ develop, hotfix-*, master, release-* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '25 19 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
9 changes: 4 additions & 5 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'

- name: Run checks
run: |
Expand All @@ -21,10 +21,9 @@ jobs:
done
if [[ ! -z ${changed_files_eslint} ]]; then
for package_files in `find -maxdepth 2 -name "package.json" -type f`; do
cd $(dirname $package_files) && npm ci && cd ${{ github.workspace }}
done
npm install eslint-detailed-reporter --save-dev
npm ci
cd tests && npm ci && cd ..
npm install eslint-detailed-reporter --save-dev --legacy-peer-deps
mkdir -p eslint_report
echo "ESLint version: "`npx eslint --version`
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/github_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: '16.x'

- name: Install npm packages
working-directory: ./site
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Build docs
run: |
pip install gitpython packaging
pip install gitpython packaging toml
python site/build_docs.py
- name: Deploy
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ on:
- 'master'
- 'develop'
pull_request:
branches:
- '*'
types: [edited, ready_for_review, opened, synchronize, reopened]

jobs:
Unit_testing:
if: |
github.event.pull_request.draft == false &&
!startsWith(github.event.pull_request.title, '[WIP]') &&
!startsWith(github.event.pull_request.title, '[Dependent]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -76,6 +80,10 @@ jobs:
${{ github.workspace }}/lcov.info
E2E_testing:
if: |
github.event.pull_request.draft == false &&
!startsWith(github.event.pull_request.title, '[WIP]') &&
!startsWith(github.event.pull_request.title, '[Dependent]')
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -127,7 +135,7 @@ jobs:
key: ${{ runner.os }}-build-ui-${{ steps.get-sha.outputs.sha }}
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Building CVAT server image
Expand Down Expand Up @@ -159,23 +167,23 @@ jobs:
DJANGO_SU_PASSWORD: '12qwaszx'
API_ABOUT_PAGE: "localhost:8080/api/v1/server/about"
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml up -d
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml -f tests/docker-compose.file_share.yml up -d
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${API_ABOUT_PAGE})" != "401" ]]; do sleep 5; done'
docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell" docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell"
docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell"
cd ./tests
npm ci
if [[ ${{ github.ref }} == 'refs/heads/develop' ]]; then
if [ ${{ matrix.specs }} == 'canvas3d_functionality' ] || [ ${{ matrix.specs }} == 'canvas3d_functionality_2' ]; then
npx cypress run --browser chrome --config-file cypress_canvas3d.json --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
npx cypress run --headed --browser chrome --config-file cypress_canvas3d.json --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
else
npx cypress run --headless --browser chrome --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
npx cypress run --browser chrome --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
fi
mv ./.nyc_output/out.json ./.nyc_output/out_${{ matrix.specs }}.json
else
if [ ${{ matrix.specs }} == 'canvas3d_functionality' ] || [ ${{ matrix.specs }} == 'canvas3d_functionality_2' ]; then
npx cypress run --browser chrome --env coverage=false --config-file cypress_canvas3d.json --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
npx cypress run --headed --browser chrome --env coverage=false --config-file cypress_canvas3d.json --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
else
npx cypress run --headless --browser chrome --env coverage=false --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
npx cypress run --browser chrome --env coverage=false --spec 'cypress/integration/${{ matrix.specs }}/**/*.js'
fi
fi
- name: Creating a log file from "cvat" container logs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'
- name: Run end-to-end tests
env:
DJANGO_SU_NAME: 'admin'
Expand All @@ -31,7 +31,7 @@ jobs:
API_ABOUT_PAGE: "localhost:8080/api/v1/server/about"
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml build
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml up -d
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f components/serverless/docker-compose.serverless.yml -f tests/docker-compose.file_share.yml up -d
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${API_ABOUT_PAGE})" != "401" ]]; do sleep 5; done'
docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell"
cd ./tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'

- name: Run checks
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'
- name: Build CVAT
env:
DJANGO_SU_NAME: "admin"
DJANGO_SU_EMAIL: "[email protected]"
DJANGO_SU_PASSWORD: "12qwaszx"
API_ABOUT_PAGE: "localhost:8080/api/v1/server/about"
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f ./tests/docker-compose.email.yml -f components/serverless/docker-compose.serverless.yml up -d --build
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f ./tests/docker-compose.email.yml -f tests/docker-compose.file_share.yml -f components/serverless/docker-compose.serverless.yml up -d --build
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${API_ABOUT_PAGE})" != "401" ]]; do sleep 5; done'
docker exec -i cvat /bin/bash -c "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell"
- name: End-to-end testing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stylelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'

- name: Run checks
run: |
Expand Down
24 changes: 19 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/profiles
/ssh/*
!/ssh/README.md
node_modules
/Mask_RCNN/
/letsencrypt-webroot/

Expand All @@ -21,9 +20,6 @@ __pycache__
._*
.coverage

# Ignore development npm files
node_modules

# Ignore npm logs file
npm-debug.log*
yarn-debug.log*
Expand All @@ -46,4 +42,22 @@ yarn-error.log*
/site/public/
/site/resources/
/site/node_modules/
/site/tech-doc-hugo
/site/tech-doc-hugo

# Ignore all the installed packages
node_modules

# Ignore all js dists
cvat-data/dist
cvat-core/dist
cvat-canvas/dist
cvat-canvas3d/dist
cvat-ui/dist

# produced by npm run docs in cvat-core
cvat-core/docs
# produced by npm run test in cvat-core
cvat-core/reports
# produced by prepare in the root package.json script
.husky

6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"type": "pwa-chrome",
"request": "launch",
"preLaunchTask": "npm: start - cvat-ui",
"name": "ui.js: debug",
Expand Down Expand Up @@ -59,7 +59,7 @@
},
{
"name": "server: chrome",
"type": "chrome",
"type": "pwa-chrome",
"request": "launch",
"url": "http://localhost:7000/",
"disableNetworkCache":true,
Expand Down Expand Up @@ -193,7 +193,7 @@
"type": "node",
"request": "launch",
"name": "jest debug",
"program": "${workspaceFolder}/cvat-core/node_modules/.bin/jest",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--config",
"${workspaceFolder}/cvat-core/jest.config.js"
Expand Down
Loading

0 comments on commit e219323

Please sign in to comment.