-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
821 changed files
with
62,602 additions
and
47,358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
exclude_paths: | ||
- '**/3rdparty/**' | ||
- '**/engine/js/cvat-core.min.js' | ||
- '**/engine/js/unzip_imgs.js' | ||
- CHANGELOG.md | ||
- '**/3rdparty/**' | ||
- '**/engine/js/cvat-core.min.js' | ||
- '**/engine/js/unzip_imgs.js' | ||
- CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.*/ | ||
3rdparty/ | ||
node_modules/ | ||
dist/ | ||
data/ | ||
datumaro/ | ||
keys/ | ||
logs/ | ||
static/ | ||
templates/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,23 @@ | ||
/* | ||
* Copyright (C) 2018 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
// Copyright (C) 2018-2020 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
module.exports = { | ||
"env": { | ||
"node": false, | ||
"browser": true, | ||
"es6": true, | ||
"jquery": true, | ||
"qunit": true, | ||
module.exports = { | ||
env: { | ||
node: true, | ||
browser: true, | ||
es6: true, | ||
}, | ||
"parserOptions": { | ||
"sourceType": "script", | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2018, | ||
}, | ||
"plugins": [ | ||
"security", | ||
"no-unsanitized", | ||
"no-unsafe-innerhtml", | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:security/recommended", | ||
"plugin:no-unsanitized/DOM", | ||
"airbnb-base", | ||
], | ||
"rules": { | ||
"no-await-in-loop": [0], | ||
"global-require": [0], | ||
"no-new": [0], | ||
"class-methods-use-this": [0], | ||
"no-restricted-properties": [0, { | ||
"object": "Math", | ||
"property": "pow", | ||
}], | ||
"no-param-reassign": [0], | ||
"no-underscore-dangle": ["error", { "allowAfterThis": true }], | ||
"no-restricted-syntax": [0, {"selector": "ForOfStatement"}], | ||
"no-continue": [0], | ||
"no-unsafe-innerhtml/no-unsafe-innerhtml": 1, | ||
// This rule actual for user input data on the node.js environment mainly. | ||
"security/detect-object-injection": 0, | ||
"indent": ["warn", 4], | ||
// recently added to airbnb | ||
"max-classes-per-file": [0], | ||
// it was opposite before and our code has been written according to previous rule | ||
"arrow-parens": [0], | ||
// object spread is a modern ECMA standard. Let's do not use it without babel | ||
"prefer-object-spread": [0], | ||
plugins: ['eslint-plugin-header'], | ||
extends: ['eslint:recommended', 'prettier'], | ||
rules: { | ||
'header/header': [2, 'line', [{ | ||
pattern: ' {1}Copyright \\(C\\) (?:20\\d{2}-)?2020 Intel Corporation', | ||
template: ' Copyright (C) 2020 Intel Corporation' | ||
}, '', ' SPDX-License-Identifier: MIT']], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"all": true, | ||
"compact": false, | ||
"extension": [ | ||
".js", | ||
".jsx", | ||
".ts", | ||
".tsx" | ||
], | ||
"exclude": [ | ||
"**/3rdparty/*", | ||
"**/tests/*" | ||
], | ||
"parser-plugins": [ | ||
"typescript" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.*/ | ||
3rdparty/ | ||
node_modules/ | ||
dist/ | ||
data/ | ||
datumaro/ | ||
keys/ | ||
logs/ | ||
static/ | ||
templates/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"embeddedLanguageFormatting": "auto", | ||
"htmlWhitespaceSensitivity": "css", | ||
"insertPragma": false, | ||
"jsxBracketSameLine": false, | ||
"jsxSingleQuote": true, | ||
"printWidth": 120, | ||
"proseWrap": "preserve", | ||
"quoteProps": "as-needed", | ||
"requirePragma": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"useTabs": false, | ||
"vueIndentScriptAndStyle": false, | ||
"overrides": [ | ||
{ | ||
"files": ["*.json", "*.yml", "*.yaml", "*.md"], | ||
"options": { | ||
"tabWidth": 2 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
exports.settings = {bullet: '*', paddedTable: false} | ||
exports.settings = { bullet: '*', paddedTable: false }; | ||
|
||
exports.plugins = [ | ||
'remark-preset-lint-recommended', | ||
'remark-preset-lint-consistent', | ||
['remark-preset-lint-markdown-style-guide', 'mixed'], | ||
['remark-lint-no-dead-urls', { skipOffline: true }], | ||
['remark-lint-maximum-line-length', 120], | ||
['remark-lint-maximum-heading-length', 120], | ||
['remark-lint-strong-marker', "*"], | ||
['remark-lint-emphasis-marker', "_"], | ||
['remark-lint-unordered-list-marker-style', "-"], | ||
['remark-lint-ordered-list-marker-style', "."], | ||
['remark-lint-no-file-name-irregular-characters', false], | ||
['remark-lint-list-item-spacing', false], | ||
] | ||
'remark-preset-lint-recommended', | ||
'remark-preset-lint-consistent', | ||
['remark-preset-lint-markdown-style-guide', 'mixed'], | ||
['remark-lint-no-dead-urls', { skipOffline: true }], | ||
['remark-lint-maximum-line-length', 120], | ||
['remark-lint-maximum-heading-length', 120], | ||
['remark-lint-strong-marker', '*'], | ||
['remark-lint-emphasis-marker', '_'], | ||
['remark-lint-unordered-list-marker-style', '-'], | ||
['remark-lint-ordered-list-marker-style', '.'], | ||
['remark-lint-no-file-name-irregular-characters', false], | ||
['remark-lint-list-item-spacing', false], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
{ | ||
"extends": "stylelint-config-standard", | ||
"rules": { | ||
"indentation": 4, | ||
"value-keyword-case": null, | ||
"selector-combinator-space-after": null, | ||
"no-descending-specificity": null, | ||
"at-rule-no-unknown": [true, { | ||
"ignoreAtRules": ["extend"] | ||
}], | ||
"selector-type-no-unknown": [true, { | ||
"ignoreTypes": ["first-child"] | ||
}] | ||
}, | ||
"ignoreFiles": [ | ||
"**/*.js", | ||
"**/*.ts", | ||
"**/*.py" | ||
"extends": "stylelint-config-standard", | ||
"rules": { | ||
"indentation": 4, | ||
"value-keyword-case": null, | ||
"selector-combinator-space-after": null, | ||
"no-descending-specificity": null, | ||
"at-rule-no-unknown": [ | ||
true, | ||
{ | ||
"ignoreAtRules": ["extend"] | ||
} | ||
], | ||
"selector-type-no-unknown": [ | ||
true, | ||
{ | ||
"ignoreTypes": ["first-child"] | ||
} | ||
] | ||
}, | ||
"ignoreFiles": ["**/*.js", "**/*.ts", "**/*.py"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
sudo: required | ||
|
||
language: python | ||
|
||
python: | ||
- "3.5" | ||
language: generic | ||
dist: focal | ||
|
||
cache: | ||
npm: true | ||
directories: | ||
- ~/.cache | ||
|
||
addons: | ||
firefox: 'latest' | ||
chrome: stable | ||
apt: | ||
packages: | ||
- libgconf-2-4 | ||
- libgconf-2-4 | ||
|
||
services: | ||
- docker | ||
|
@@ -25,25 +23,34 @@ env: | |
DJANGO_SU_EMAIL="[email protected]" | ||
DJANGO_SU_PASSWORD="12qwaszx" | ||
NODE_VERSION="12" | ||
API_ABOUT_PAGE="localhost:8080/api/v1/server/about" | ||
|
||
before_install: | ||
- nvm install ${NODE_VERSION} | ||
|
||
before_script: | ||
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml build | ||
- chmod a+rwx ${HOST_COVERAGE_DATA_DIR} | ||
|
||
script: | ||
# FIXME: Git package and application name conflict in PATH and try to leave only one python test execution | ||
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'coverage run -a manage.py test cvat/apps && coverage run -a manage.py test --pattern="_test*.py" cvat/apps/dataset_manager/tests cvat/apps/engine/tests utils/cli && coverage run -a manage.py test datumaro/ && mv .coverage ${CONTAINER_COVERAGE_DATA_DIR}' | ||
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'cd cvat-data && npm install && cd ../cvat-core && npm install && npm run test && coveralls-lcov -v -n ./reports/coverage/lcov.info > ${CONTAINER_COVERAGE_DATA_DIR}/coverage.json' | ||
# Up all containers | ||
- if [[ $TRAVIS_EVENT_TYPE == "cron" && $TRAVIS_BRANCH == "develop" ]]; | ||
then | ||
docker-compose -f docker-compose.yml -f ./tests/docker-compose.email.yml up -d --build; | ||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${API_ABOUT_PAGE})" != "401" ]]; do sleep 5; done'; | ||
docker exec -it cvat bash -ic "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 install && npm run cypress:run:firefox; exit $?; | ||
fi; | ||
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml build | ||
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'coverage run -a manage.py test cvat/apps utils/cli && mv .coverage ${CONTAINER_COVERAGE_DATA_DIR}' | ||
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'cd cvat-data && npm install && cd ../cvat-core && npm install && npm run test && mv ./reports/coverage/lcov.info ${CONTAINER_COVERAGE_DATA_DIR} && chmod a+rwx ${CONTAINER_COVERAGE_DATA_DIR}/lcov.info' | ||
- docker-compose up -d | ||
# Create superuser | ||
- docker exec -it cvat bash -ic "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" | ||
# Install Cypress and run tests | ||
- cd ./tests && npm install | ||
- $(npm bin)/cypress run --headless --browser chrome && cd .. | ||
# End-to-end testing | ||
- npm install && npm run coverage | ||
- docker-compose up -d --build | ||
- cd ./tests && npm install && npx cypress run --headless --browser chrome | ||
- mv ./.nyc_output ../ && cd .. | ||
- npx nyc report --reporter=text-lcov >> ${HOST_COVERAGE_DATA_DIR}/lcov.info | ||
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml run cvat_ci /bin/bash -c 'cd ${CONTAINER_COVERAGE_DATA_DIR} && coveralls-lcov -v -n lcov.info > ${CONTAINER_COVERAGE_DATA_DIR}/coverage.json' | ||
|
||
after_success: | ||
# https://coveralls-python.readthedocs.io/en/latest/usage/multilang.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.