Fix many spelling errors (#3244)

* Fix spelling errors

* Bump version numbers after the spelling fixes

* Fix OSX build (os.mknod requires super-priviligies)

* Fixed eslint warnings.

Co-authored-by: Nikita Manovich <nikita.manovich@intel.com>
main
Roman Donchenko 5 years ago committed by GitHub
parent d3fb352fcb
commit d15a3199c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,7 +59,7 @@ jobs:
cache-from: type=local,src=/tmp/cvat_cache_server
tags: openvino/cvat_server:latest
load: true
- name: Runing unit tests
- name: Running unit tests
env:
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }}
CONTAINER_COVERAGE_DATA_DIR: "/coverage_data"
@ -203,7 +203,7 @@ jobs:
needs: [Unit_testing, E2E_testing]
steps:
- uses: actions/checkout@v2
- name: Geting SHA from the default branch
- name: Getting SHA from the default branch
id: get-sha
run: |
URL_get_default_branch="https://api.github.com/repos/${{ github.repository }}"

@ -157,7 +157,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- PATCH requests from cvat-core submit only changed fields (<https://github.com/openvinotoolkit/cvat/pull/2445>)
- deploy.sh in serverless folder is seperated into deploy_cpu.sh and deploy_gpu.sh (<https://github.com/openvinotoolkit/cvat/pull/2546>)
- deploy.sh in serverless folder is separated into deploy_cpu.sh and deploy_gpu.sh (<https://github.com/openvinotoolkit/cvat/pull/2546>)
- Bumped nuclio version to 1.5.8
- Migrated to Antd 4.9 (<https://github.com/openvinotoolkit/cvat/pull/2536>)
@ -307,11 +307,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Cannot read property 'pinned' of undefined because of zOrder related issues (<https://github.com/opencv/cvat/pull/1874>)
- Do not iterate over hidden objects in aam (which are invisible because of zOrder) (<https://github.com/opencv/cvat/pull/1874>)
- Cursor position is reset after changing a text field (<https://github.com/opencv/cvat/pull/1874>)
- Hidden points and cuboids can be selected to be groupped (<https://github.com/opencv/cvat/pull/1874>)
- Hidden points and cuboids can be selected to be grouped (<https://github.com/opencv/cvat/pull/1874>)
- `outside` annotations should not be in exported images (<https://github.com/opencv/cvat/issues/1620>)
- `CVAT for video format` import error with interpolation (<https://github.com/opencv/cvat/issues/1893>)
- `Image compression` definition mismatch (<https://github.com/opencv/cvat/issues/1900>)
- Points are dublicated during polygon interpolation sometimes (<https://github.com/opencv/cvat/pull/1892>)
- Points are duplicated during polygon interpolation sometimes (<https://github.com/opencv/cvat/pull/1892>)
- When redraw a shape with activated autobordering, previous points are visible (<https://github.com/opencv/cvat/pull/1892>)
- No mapping between side object element and context menu in some attributes (<https://github.com/opencv/cvat/pull/1923>)
- Interpolated shapes exported as `keyframe = True` (<https://github.com/opencv/cvat/pull/1937>)
@ -462,7 +462,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
- Annotation convertation utils, currently supported natively via Datumaro framework
- Annotation conversion utils, currently supported natively via Datumaro framework
(<https://github.com/opencv/cvat/pull/1477>)
### Fixed

@ -116,7 +116,7 @@ You develop CVAT under WSL (Windows subsystem for Linux) following next steps.
wsl -d Ubuntu-18.04
```
- Run all commands from this isntallation guide in WSL Ubuntu shell.
- Run all commands from this installation guide in WSL Ubuntu shell.
## Setup additional components in development environment

@ -134,7 +134,7 @@ RUN if [ "$INSTALL_SOURCES" = "yes" ]; then \
fi
COPY --from=build-image /tmp/openh264/openh264*.tar.gz /tmp/ffmpeg/ffmpeg*.tar.gz ${HOME}/sources/
# Copy python virtual enviroment and FFmpeg binaries from build-image
# Copy python virtual environment and FFmpeg binaries from build-image
COPY --from=build-image /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
COPY --from=build-image /opt/ffmpeg /usr

@ -116,7 +116,7 @@ Prebuilt docker images for CVAT releases are available on Docker Hub:
Automatically generated Swagger documentation for Django REST API is available
on `<cvat_origin>/api/swagger`(default: `localhost:8080/api/swagger`).
Swagger documentation is visiable on allowed hostes, Update environement
Swagger documentation is visible on allowed hosts, Update environment
variable in docker-compose.yml file with cvat hosted machine IP or domain
name. Example - `ALLOWED_HOSTS: 'localhost, 127.0.0.1'`.

@ -245,4 +245,4 @@ canvas.draw({
You can call setup() during editing, dragging, and resizing only to update objects, not to change a frame.
You can change frame during draw only when you do not redraw an existing object
Other methods do not change state and can be used everytime.
Other methods do not change state and can be used at any time.

@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.4.3",
"version": "2.4.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.4.3",
"version": "2.4.4",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -28,14 +28,14 @@ export class AutoborderHandlerImpl implements AutoborderHandler {
private auxiliaryGroupID: number | null;
private auxiliaryClicks: number[];
private listeners: Record<
number,
Record<
number,
{
click: (event: MouseEvent) => void;
dblclick: (event: MouseEvent) => void;
}
>
number,
Record<
number,
{
click: (event: MouseEvent) => void;
dblclick: (event: MouseEvent) => void;
}
>
>;
public constructor(frameContent: SVGSVGElement) {
@ -172,12 +172,11 @@ export class AutoborderHandlerImpl implements AutoborderHandler {
} else {
// sign defines bypass direction
const landmarks = this.auxiliaryClicks;
const sign =
Math.sign(landmarks[2] - landmarks[0]) *
Math.sign(landmarks[1] - landmarks[0]) *
Math.sign(landmarks[2] - landmarks[1]);
const sign = Math.sign(landmarks[2] - landmarks[0])
* Math.sign(landmarks[1] - landmarks[0])
* Math.sign(landmarks[2] - landmarks[1]);
// go via a polygon and get vertexes
// go via a polygon and get vertices
// the first vertex has been already drawn
const way = [];
for (let i = landmarks[0] + sign; ; i += sign) {

@ -352,7 +352,7 @@ function setupCuboidPoints(points: Point[]): any[] {
? Math.abs(points[1].y - points[0].y)
: Math.abs(points[1].y - points[2].y);
// seperate into left and right point
// separate into left and right point
// we pick the first and third point because we know assume they will be on
// opposite corners
if (points[0].x < points[2].x) {

@ -462,11 +462,11 @@ export class DrawHandlerImpl implements DrawHandler {
this.drawInstance.draw('point', e);
} else {
this.drawInstance.draw('update', e);
const deltaTreshold = 15;
const deltaThreshold = 15;
const dx = (e.clientX - lastDrawnPoint.x) ** 2;
const dy = (e.clientY - lastDrawnPoint.y) ** 2;
const delta = Math.sqrt(dx + dy);
if (delta > deltaTreshold) {
if (delta > deltaThreshold) {
this.drawInstance.draw('point', e);
}
}

@ -93,11 +93,11 @@ export class EditHandlerImpl implements EditHandler {
if (lastDrawnPoint.x === null || lastDrawnPoint.y === null) {
(this.editLine as any).draw('point', e);
} else {
const deltaTreshold = 15;
const deltaThreshold = 15;
const dxsqr = (e.clientX - lastDrawnPoint.x) ** 2;
const dysqr = (e.clientY - lastDrawnPoint.y) ** 2;
const delta = Math.sqrt(dxsqr + dysqr);
if (delta > deltaTreshold) {
if (delta > deltaThreshold) {
(this.editLine as any).draw('point', e);
}
}

@ -94,7 +94,7 @@ export class InteractionHandlerImpl implements InteractionHandler {
if ((e.button === 0 || (e.button === 2 && this.interactionData.enableNegVertices)) && !e.altKey) {
e.preventDefault();
const [cx, cy] = translateToSVG((this.canvas.node as any) as SVGSVGElement, [e.clientX, e.clientY]);
if (!this.isWithingFrame(cx, cy)) return;
if (!this.isWithinFrame(cx, cy)) return;
if (!this.isWithinThreshold(cx, cy)) return;
this.currentInteractionShape = this.canvas
@ -149,7 +149,7 @@ export class InteractionHandlerImpl implements InteractionHandler {
}
};
// clear this listener in relese()
// clear this listener in release()
this.canvas.on('mousedown.interaction', eventListener);
}
@ -234,7 +234,7 @@ export class InteractionHandlerImpl implements InteractionHandler {
return xDiff < this.thresholdRectSize / 2 && yDiff < this.thresholdRectSize / 2;
}
private isWithingFrame(x: number, y: number): boolean {
private isWithinFrame(x: number, y: number): boolean {
const { offset, image } = this.geometry;
const { width, height } = image;
const [imageX, imageY] = [Math.round(x - offset), Math.round(y - offset)];
@ -280,7 +280,7 @@ export class InteractionHandlerImpl implements InteractionHandler {
}
if (this.interactionData.enableSliding && this.interactionShapes.length) {
if (this.isWithingFrame(x, y)) {
if (this.isWithinFrame(x, y)) {
if (this.interactionData.enableThreshold && !this.isWithinThreshold(x, y)) return;
this.onInteraction(
[

@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Intel Corporation
// Copyright (C) 2019-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -43,7 +43,7 @@ export class SplitHandlerImpl implements SplitHandler {
}
private closeSplitting(): void {
// Split done is true if an object was splitted
// Split done is true if an object was split
// Split also can be called with { enabled: false } without splitting an object
if (!this.splitDone) {
this.onSplitDone(null);

@ -2,7 +2,7 @@
## Description
This CVAT module is a client-side JavaScipt library to management of objects, frames, logs, etc.
This CVAT module is a client-side JavaScript library for management of objects, frames, logs, etc.
It contains the core logic of the Computer Vision Annotation Tool.
## Versioning

@ -1,6 +1,6 @@
{
"name": "cvat-core",
"version": "3.13.0",
"version": "3.13.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cvat-core",
"version": "3.13.0",
"version": "3.13.1",
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
"main": "babel.config.js",
"scripts": {

@ -868,7 +868,7 @@
const deepSearch = (deepSearchFrom, deepSearchTo) => {
// deepSearchFrom is expected to be a frame that doesn't satisfy a filter
// deepSearchTo is expected to be a frame that satifies a filter
// deepSearchTo is expected to be a frame that satisfies a filter
let [prev, next] = [deepSearchFrom, deepSearchTo];
// half division method instead of linear search

@ -50,7 +50,7 @@
throw new DataError(`Points must have exact 8 points, but got ${points.length / 2}`);
}
} else {
throw new ArgumentError(`Unknown value of shapeType has been recieved ${shapeType}`);
throw new ArgumentError(`Unknown value of shapeType has been received ${shapeType}`);
}
}
@ -1452,7 +1452,7 @@
/ Math.sqrt(Math.pow(y2 - y1, 2) + Math.pow(x2 - x1, 2)),
);
} else {
// The link below works for lines (which have infinit length)
// The link below works for lines (which have infinite length)
// There is a case when perpendicular doesn't cross the edge
// In this case we don't use the computed distance
// Instead we use just distance to the nearest point

@ -34,7 +34,7 @@
for (const prop in filter) {
if (Object.prototype.hasOwnProperty.call(filter, prop)) {
if (!(prop in fields)) {
throw new ArgumentError(`Unsupported filter property has been recieved: "${prop}"`);
throw new ArgumentError(`Unsupported filter property has been received: "${prop}"`);
} else if (!fields[prop](filter[prop])) {
throw new ArgumentError(`Received filter property "${prop}" is not satisfied for checker`);
}

@ -18,7 +18,7 @@
class Project {
/**
* In a fact you need use the constructor only if you want to create a project
* @param {object} initialData - Object which is used for initalization
* @param {object} initialData - Object which is used for initialization
* <br> It can contain keys:
* <br> <li style="margin-left: 10px;"> name
* <br> <li style="margin-left: 10px;"> labels

@ -18,7 +18,7 @@
const Review = require('./review');
const { FieldUpdateTrigger } = require('./common');
function buildDublicatedAPI(prototype) {
function buildDuplicatedAPI(prototype) {
Object.defineProperties(prototype, {
annotations: Object.freeze({
value: {
@ -576,7 +576,7 @@
* Create a log and add it to a log collection <br>
* Durable logs will be added after "close" method is called for them <br>
* The fields "task_id" and "job_id" automatically added when add logs
* throught a task or a job <br>
* through a task or a job <br>
* Ignore rules exist for some logs (e.g. zoomImage, changeAttribute) <br>
* Payload of ignored logs are shallowly combined to previous logs of the same type
* @method log
@ -999,7 +999,7 @@
class Task extends Session {
/**
* In a fact you need use the constructor only if you want to create a task
* @param {object} initialData - Object which is used for initalization
* @param {object} initialData - Object which is used for initialization
* <br> It can contain keys:
* <br> <li style="margin-left: 10px;"> name
* <br> <li style="margin-left: 10px;"> assignee
@ -1697,8 +1697,8 @@
closeSession,
} = require('./annotations');
buildDublicatedAPI(Job.prototype);
buildDublicatedAPI(Task.prototype);
buildDuplicatedAPI(Job.prototype);
buildDuplicatedAPI(Task.prototype);
Job.prototype.save.implementation = async function () {
if (this.id) {

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -211,7 +211,7 @@ describe('Feature: put annotations', () => {
expect(task.annotations.put([state1])).rejects.toThrow(window.cvat.exceptions.ArgumentError);
});
test('put shape without points and with invalud points to a task', async () => {
test('put shape without points and with invalid points to a task', async () => {
const task = (await window.cvat.tasks.get({ id: 101 }))[0];
await task.annotations.clear(true);
const state = new window.cvat.classes.ObjectState({

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.20.1",
"version": "1.20.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.20.1",
"version": "1.20.2",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {

@ -76,7 +76,7 @@ export default function ControlVisibilityObserver<P = {}>(
visibilityHeightThreshold = wrapper.offsetTop + wrapper.offsetHeight;
// start observing parent size
observer.observe(ref.current.parentElement as HTMLElement);
// then put it to extra controls if parent height is not enought
// then put it to extra controls if parent height is not enough
setVisible(availableHeight - reservedHeight >= visibilityHeightThreshold);
}

@ -96,7 +96,7 @@ function AdaptiveAutoAnnotationForm({ formRef }: { formRef: RefObject<FormInstan
);
}
function AdvanvedConfigurationForm({ formRef }: { formRef: RefObject<FormInstance> }): JSX.Element {
function AdvancedConfigurationForm({ formRef }: { formRef: RefObject<FormInstance> }): JSX.Element {
return (
<Form layout='vertical' ref={formRef}>
<Form.Item
@ -197,7 +197,7 @@ export default function CreateProjectContent(): JSX.Element {
/>
</Col>
<Col span={24}>
<AdvanvedConfigurationForm formRef={advancedFormRef} />
<AdvancedConfigurationForm formRef={advancedFormRef} />
</Col>
<Col span={24}>
<Button type='primary' onClick={onSumbit}>

@ -17,7 +17,7 @@ import GlobalErrorBoundary from 'components/global-error-boundary/global-error-b
import Header from 'components/header/header';
import ResetPasswordPageConfirmComponent from 'components/reset-password-confirm-page/reset-password-confirm-page';
import ResetPasswordPageComponent from 'components/reset-password-page/reset-password-page';
import ShorcutsDialog from 'components/shortcuts-dialog/shortcuts-dialog';
import ShortcutsDialog from 'components/shortcuts-dialog/shortcuts-dialog';
import ProjectsPageComponent from 'components/projects-page/projects-page';
import CreateProjectPageComponent from 'components/create-project-page/create-project-page';
import ProjectPageComponent from 'components/project-page/project-page';
@ -307,7 +307,7 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP
<Layout>
<Header />
<Layout.Content style={{ height: '100%' }}>
<ShorcutsDialog />
<ShortcutsDialog />
<GlobalHotKeys keyMap={subKeyMap} handlers={handlers}>
<Switch>
<Route exact path='/projects' component={ProjectsPageComponent} />

@ -131,7 +131,7 @@ class GlobalErrorBoundary extends React.PureComponent<Props, State> {
<div>
<Paragraph>
<Paragraph strong>What has happened?</Paragraph>
<Paragraph>Program error has just occured</Paragraph>
<Paragraph>Program error has just occurred</Paragraph>
<Collapse accordion>
<Collapse.Panel header='Error message' key='errorMessage'>
<Text type='danger'>

@ -27,7 +27,7 @@ enum ConstructorMode {
UPDATE = 'UPDATE',
}
interface LabelsEditortProps {
interface LabelsEditorProps {
labels: Label[];
onSubmit: (labels: any[]) => void;
}
@ -39,8 +39,8 @@ interface LabelsEditorState {
labelForUpdate: Label | null;
}
export default class LabelsEditor extends React.PureComponent<LabelsEditortProps, LabelsEditorState> {
public constructor(props: LabelsEditortProps) {
export default class LabelsEditor extends React.PureComponent<LabelsEditorProps, LabelsEditorState> {
public constructor(props: LabelsEditorProps) {
super(props);
this.state = {
@ -53,10 +53,10 @@ export default class LabelsEditor extends React.PureComponent<LabelsEditortProps
public componentDidMount(): void {
// just need performe the same code
this.componentDidUpdate((null as any) as LabelsEditortProps);
this.componentDidUpdate((null as any) as LabelsEditorProps);
}
public componentDidUpdate(prevProps: LabelsEditortProps): void {
public componentDidUpdate(prevProps: LabelsEditorProps): void {
function transformLabel(label: any): Label {
return {
name: label.name,

@ -13,7 +13,7 @@ import CVATTooltip from 'components/common/cvat-tooltip';
export interface LabelMapperItemValue {
labelId: number;
newLabelName: string | null;
clearAtrributes: boolean;
clearAttributes: boolean;
}
export interface LabelMapperItemProps {
@ -65,11 +65,11 @@ export default function LabelMapperItem(props: LabelMapperItemProps): JSX.Elemen
<Col>
<Checkbox
disabled
checked={value.clearAtrributes}
checked={value.clearAttributes}
onChange={(_value) =>
onChange({
...value,
clearAtrributes: _value.target.checked,
clearAttributes: _value.target.checked,
})}
>
Clear attributes

@ -40,7 +40,7 @@ export default function MoveTaskModal(): JSX.Element {
labelValues[label.id] = {
labelId: label.id,
newLabelName: null,
clearAtrributes: true,
clearAttributes: true,
};
});
setLabelMap(labelValues);
@ -75,7 +75,7 @@ export default function MoveTaskModal(): JSX.Element {
Object.values(labelMap).map((map) => ({
label_id: map.labelId,
new_label_name: map.newLabelName,
clear_attributes: map.clearAtrributes,
clear_attributes: map.clearAttributes,
})),
),
);
@ -95,7 +95,7 @@ export default function MoveTaskModal(): JSX.Element {
labelValues[id] = {
labelId: label.labelId,
newLabelName: autoNewLabel ? autoNewLabel.name : null,
clearAtrributes: true,
clearAttributes: true,
};
});
setLabelMap(labelValues);
@ -120,7 +120,7 @@ export default function MoveTaskModal(): JSX.Element {
<span>
{`Move task ${task?.id} to project`}
{/* TODO: replace placeholder */}
<CVATTooltip title='Some moving proccess description here'>
<CVATTooltip title='Some moving process description here'>
<QuestionCircleFilled className='ant-typography-secondary' />
</CVATTooltip>
</span>

@ -36,7 +36,7 @@ function mapDispatchToProps(dispatch: any): DispatchToProps {
};
}
function ShorcutsDialog(props: StateToProps & DispatchToProps): JSX.Element | null {
function ShortcutsDialog(props: StateToProps & DispatchToProps): JSX.Element | null {
const { visible, switchShortcutsDialog } = props;
const keyMap = getApplicationKeyMap();
@ -100,4 +100,4 @@ function ShorcutsDialog(props: StateToProps & DispatchToProps): JSX.Element | nu
);
}
export default connect(mapStateToProps, mapDispatchToProps)(ShorcutsDialog);
export default connect(mapStateToProps, mapDispatchToProps)(ShortcutsDialog);

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -74,7 +74,7 @@ class TaskItemComponent extends React.PureComponent<TaskItemProps & RouteCompone
const numOfJobs = taskInstance.jobs.length;
const numOfCompleted = taskInstance.jobs.filter((job: any): boolean => job.status === 'completed').length;
// Progress appearence depends on number of jobs
// Progress appearance depends on number of jobs
let progressColor = null;
let progressText = null;
if (numOfCompleted && numOfCompleted === numOfJobs) {

@ -240,19 +240,19 @@ class AnnotationTopBarContainer extends React.PureComponent<Props, State> {
if (playing && canvasIsReady) {
if (frameNumber < jobInstance.stopFrame) {
let framesSkiped = 0;
let framesSkipped = 0;
if (frameSpeed === FrameSpeed.Fast && frameNumber + 1 < jobInstance.stopFrame) {
framesSkiped = 1;
framesSkipped = 1;
}
if (frameSpeed === FrameSpeed.Fastest && frameNumber + 2 < jobInstance.stopFrame) {
framesSkiped = 2;
framesSkipped = 2;
}
setTimeout(() => {
const { playing: stillPlaying } = this.props;
if (stillPlaying) {
if (canvasInstance.isAbleToChangeFrame()) {
onChangeFrame(frameNumber + 1 + framesSkiped, stillPlaying, framesSkiped + 1);
onChangeFrame(frameNumber + 1 + framesSkipped, stillPlaying, framesSkipped + 1);
} else {
onSwitchPlay(false);
}

@ -202,7 +202,7 @@ const defaultKeyMap = ({
},
ANTICLOCKWISE_ROTATION: {
name: 'Rotate anticlockwise',
description: 'Change image angle (substract 90 degrees)',
description: 'Change image angle (subtract 90 degrees)',
sequences: ['ctrl+shift+r'],
action: 'keydown',
},

@ -42,15 +42,15 @@ export class OpenCVWrapper {
const decoder = new TextDecoder('utf-8');
const reader = (body as ReadableStream<Uint8Array>).getReader();
let recieved = false;
let received = false;
let receivedLength = 0;
let decodedScript = '';
while (!recieved) {
while (!received) {
// await in the loop is necessary here
// eslint-disable-next-line
const { done, value } = await reader.read();
recieved = done;
received = done;
if (value instanceof Uint8Array) {
decodedScript += decoder.decode(value);

@ -1,4 +1,4 @@
# Copyright (C) 2018-2020 Intel Corporation
# Copyright (C) 2018-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -15,7 +15,7 @@ def create_user(sender, instance, created, **kwargs):
db_group = Group.objects.get(name=AUTH_ROLE.ADMIN)
instance.groups.add(db_group)
# create and verify EmailAdress for superuser accounts
# create and verify EmailAddress for superuser accounts
if allauth_settings.EMAIL_REQUIRED:
EmailAddress.objects.get_or_create(user=instance, email=instance.email, primary=True, verified=True)

@ -1,5 +1,5 @@
# Copyright (C) 2019-2020 Intel Corporation
# Copyright (C) 2019-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -346,7 +346,7 @@ class JobAnnotation:
labeledtrack_set = labeledtrack_set.filter(pk__in=labeledtrack_ids)
# It is not important for us that data had some "invalid" objects
# which were skipped (not acutally deleted). The main idea is to
# which were skipped (not actually deleted). The main idea is to
# say that all requested objects are absent in DB after the method.
self.ir_data.tags = data['tags']
self.ir_data.shapes = data['shapes']

@ -1,4 +1,4 @@
# Copyright (C) 2018-2020 Intel Corporation
# Copyright (C) 2018-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -163,13 +163,13 @@ class Git:
slogger.task[self._tid].info("Cloning remote repository from {}..".format(ssh_url))
self._rep = git.Repo.clone_from(ssh_url, self._cwd)
# Intitialization
# Initialization
self._configurate()
# Method is some wrapper for clone
# It restores state if any errors have occured
# It useful if merge conflicts have occured during pull
# It restores state if any errors have occurred
# It useful if merge conflicts have occurred during pull
def _reclone(self):
if os.path.exists(self._cwd):
if not os.path.isdir(self._cwd):
@ -184,7 +184,7 @@ class Git:
self._clone()
shutil.rmtree(tmp_repo, True)
except Exception as ex:
# Restore state if any errors have occured
# Restore state if any errors have occurred
if os.path.isdir(self._cwd):
shutil.rmtree(self._cwd, True)
os.rename(tmp_repo, self._cwd)
@ -386,7 +386,7 @@ def initial_create(tid, git_path, lfs, user):
except git.exc.GitCommandError as ex:
_have_no_access_exception(ex)
except Exception as ex:
slogger.task[tid].exception('exception occured during git initial_create', exc_info = True)
slogger.task[tid].exception('exception occurred during git initial_create', exc_info = True)
raise ex
@ -455,7 +455,7 @@ def update_states():
try:
get(db_git.task_id, db_user)
except Exception:
slogger.glob("Exception occured during a status updating for db_git with tid: {}".format(db_git.task_id))
slogger.glob("Exception occurred during a status updating for db_git with tid: {}".format(db_git.task_id))
@transaction.atomic
def _onsave(jid, data, action):

@ -1,4 +1,4 @@
# Copyright (C) 2018 Intel Corporation
# Copyright (C) 2018-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -16,6 +16,6 @@ class Command(BaseCommand):
try:
update_states()
except Exception as ex:
print("An error occured during update task statuses: {}".format(str(ex)))
print("An error occurred during update task statuses: {}".format(str(ex)))
time.sleep(INTERVAL_SEC)

@ -1,4 +1,4 @@
# Copyright (C) 2018 Intel Corporation
# Copyright (C) 2018-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -30,7 +30,7 @@ def check_process(request, rq_id):
else:
return JsonResponse({"status": "unknown"})
except Exception as ex:
slogger.glob.error("error occured during checking repository request with rq id {}".format(rq_id), exc_info=True)
slogger.glob.error("error occurred during checking repository request with rq id {}".format(rq_id), exc_info=True)
return HttpResponseBadRequest(str(ex))
@ -50,7 +50,7 @@ def create(request, tid):
queue.enqueue_call(func = CVATGit.initial_create, args = (tid, path, lfs, request.user), job_id = rq_id)
return JsonResponse({ "rq_id": rq_id })
except Exception as ex:
slogger.glob.error("error occured during initial cloning repository request with rq id {}".format(rq_id), exc_info=True)
slogger.glob.error("error occurred during initial cloning repository request with rq id {}".format(rq_id), exc_info=True)
return HttpResponseBadRequest(str(ex))
@ -68,7 +68,7 @@ def push_repository(request, tid):
return JsonResponse({ "rq_id": rq_id })
except Exception as ex:
try:
slogger.task[tid].error("error occured during pushing repository request", exc_info=True)
slogger.task[tid].error("error occurred during pushing repository request", exc_info=True)
except Exception:
pass
return HttpResponseBadRequest(str(ex))
@ -83,7 +83,7 @@ def get_repository(request, tid):
return JsonResponse(CVATGit.get(tid, request.user))
except Exception as ex:
try:
slogger.task[tid].error("error occured during getting repository info request", exc_info=True)
slogger.task[tid].error("error occurred during getting repository info request", exc_info=True)
except Exception:
pass
return HttpResponseBadRequest(str(ex))
@ -99,5 +99,5 @@ def get_meta_info(request):
return JsonResponse(response, safe = False)
except Exception as ex:
slogger.glob.exception("error occured during get meta request", exc_info = True)
slogger.glob.exception("error occurred during get meta request", exc_info = True)
return HttpResponseBadRequest(str(ex))

@ -40,8 +40,8 @@ def create(tid, data):
@transaction.atomic
def rq_handler(job, exc_type, exc_value, traceback):
splitted = job.id.split('/')
tid = int(splitted[splitted.index('tasks') + 1])
split = job.id.split('/')
tid = int(split[split.index('tasks') + 1])
try:
db_task = models.Task.objects.select_for_update().get(pk=tid)
with open(db_task.get_log_path(), "wt") as log_file:

@ -1,5 +1,5 @@
# Copyright (C) 2018-2019 Intel Corporation
# Copyright (C) 2018-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -30,7 +30,7 @@ schema_view = get_schema_view(
# drf-yasg component doesn't handle correctly URL_FORMAT_OVERRIDE and
# send requests with ?format=openapi suffix instead of ?scheme=openapi.
# We map the required paramater explicitly and add it into query arguments
# We map the required parameter explicitly and add it into query arguments
# on the server side.
def wrap_swagger(view):
@login_required

@ -1,4 +1,4 @@
# Copyright (C) 2018-2020 Intel Corporation
# Copyright (C) 2018-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -343,7 +343,7 @@ DATA_ROOT = os.path.join(BASE_DIR, 'data')
LOGSTASH_DB = os.path.join(DATA_ROOT,'logstash.db')
os.makedirs(DATA_ROOT, exist_ok=True)
if not os.path.exists(LOGSTASH_DB):
os.mknod(LOGSTASH_DB)
open(LOGSTASH_DB, 'w').close()
MEDIA_DATA_ROOT = os.path.join(DATA_ROOT, 'data')
os.makedirs(MEDIA_DATA_ROOT, exist_ok=True)
@ -451,7 +451,7 @@ RESTRICTIONS = {
# this setting limits the number of projects for the user
'project_limit': None,
# this setting reduse task visibility to owner and assignee only
# this setting reduces task visibility to owner and assignee only
'reduce_task_visibility': False,
# allow access to analytics component to users with the following roles

@ -1,4 +1,4 @@
# Copyright (C) 2020 Intel Corporation
# Copyright (C) 2020-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
@ -50,7 +50,7 @@ def scale_bbox(x, y, h, w, class_id, confidence, h_scale, w_scale):
def parse_yolo_region(blob, resized_image_shape, original_im_shape, params, threshold):
# ------------------------------------------ Validating output parameters ------------------------------------------
_, _, out_blob_h, out_blob_w = blob.shape
assert out_blob_w == out_blob_h, "Invalid size of output blob. It sould be in NCHW layout and height should " \
assert out_blob_w == out_blob_h, "Invalid size of output blob. It should be in NCHW layout and height should " \
"be equal to width. Current height = {}, current width = {}" \
"".format(out_blob_h, out_blob_w)
@ -131,7 +131,7 @@ class ModelHandler:
objects += parse_yolo_region(out_blob, self.model.input_size(),
origin_im_size, layer_params, threshold)
# Filtering overlapping boxes (non-maximum supression)
# Filtering overlapping boxes (non-maximum suppression)
IOU_THRESHOLD = 0.4
objects = sorted(objects, key=lambda obj : obj['confidence'], reverse=True)
for i, obj in enumerate(objects):

@ -135,7 +135,7 @@ sudo systemctl disable s3fs.service
For more details see [here](https://github.com/Azure/azure-storage-fuse/wiki/1.-Installation)
1. Create enviroments(replace `account_name`, `account_key`, `mount_point`):
1. Create environments (replace `account_name`, `account_key`, `mount_point`):
```bash
export AZURE_STORAGE_ACCOUNT=<account_name>

@ -30,7 +30,7 @@ In annotation mode each image tag has `width` and `height` attributes for the sa
<name>String: some task name</name>
<size>Number: count of frames/images in the task</size>
<mode>String: interpolation or annotation</mode>
<overlap>Number: number of overlaped frames between segments</overlap>
<overlap>Number: number of overlapped frames between segments</overlap>
<bugtracker>String: URL on an page which describe the task</bugtracker>
<flipped>Boolean: were images of the task flipped? (True/False)</flipped>
<created>String: date when the task was created</created>
@ -300,7 +300,7 @@ Both formats has a common part which is described below:
<name>String: some task name</name>
<size>Number: count of frames/images in the task</size>
<mode>String: interpolation or annotation</mode>
<overlap>Number: number of overlaped frames between segments</overlap>
<overlap>Number: number of overlapped frames between segments</overlap>
<bugtracker>String: URL on an page which describe the task</bugtracker>
<created>String: date when the task was created</created>
<updated>String: date when the task was updated</updated>

@ -31,10 +31,10 @@ s1 - sequence
00 - means that this bounding box is the first one among the several
```
- supported annotations: Label `market-1501` with atrributes (`query`, `person_id`, `camera_id`)
- supported annotations: Label `market-1501` with attributes (`query`, `person_id`, `camera_id`)
#### Market-1501 import
Uploaded file: a zip archive of the structure above
- supported annotations: Label `market-1501` with atrributes (`query`, `person_id`, `camera_id`)
- supported annotations: Label `market-1501` with attributes (`query`, `person_id`, `camera_id`)

@ -18,7 +18,7 @@ weight: 6
- `occluded` (both UI option and a separate attribute)
- `truncated` and `difficult` (should be defined for labels as `checkbox` -es)
- action attributes (import only, should be defined as `checkbox` -es)
- arbitrary attributes (in the `attributes` secion of XML files)
- arbitrary attributes (in the `attributes` section of XML files)
#### Pascal VOC export

@ -472,7 +472,7 @@ docker-compose -f docker-compose.yml -f components/analytics/docker-compose.anal
Your server should be available (and unsecured) at `http://CVAT.example.com`
Something went wrong ? The most common cause is a containers and images cache which were builded earlier.
Something went wrong ? The most common cause is a containers and images cache which were built earlier.
This will enable serving `http://CVAT.example.com/.well-known/acme-challenge/`
route from `/var/tmp/letsencrypt-webroot` directory on the container's filesystem

@ -63,5 +63,5 @@ A background class can be:
- `background` class with any color (has a priority, name is case-insensitive)
- Any class of black color (RGB 0, 0, 0)
To change backgound color in generated masks (default is black),
To change background color in generated masks (default is black),
change `background` class color to the desired one.

@ -37,4 +37,4 @@ displayed as a red square which is tied to the cursor.
During the drawing process you can remove the last point by clicking on it with the left mouse button.
- Once all the points are placed, you can complete the creation of the object by clicking on the icon or clicking `N`.
As a result, a polygon will be created (read more about the polygons in the [annoation with polygons](/docs/for-users/user-guide/advanced/annotation-with-polygons/)).
As a result, a polygon will be created (read more about the polygons in the [annotation with polygons](/docs/for-users/user-guide/advanced/annotation-with-polygons/)).

@ -29,13 +29,13 @@ Many UI elements have shortcut hints. Put your pointer to a required element to
| | _Modes_ |
| `N` | Repeat the latest procedure of drawing with the same parameters |
| `M` | Activate or deactivate mode to merging shapes |
| `Alt+M` | Activate or deactivate mode to spliting shapes |
| `Alt+M` | Activate or deactivate mode to splitting shapes |
| `G` | Activate or deactivate mode to grouping shapes |
| `Shift+G` | Reset group for selected shapes (in group mode) |
| `Esc` | Cancel any active canvas mode |
| | _Image operations_ |
| `Ctrl+R` | Change image angle (add 90 degrees) |
| `Ctrl+Shift+R` | Change image angle (substract 90 degrees) |
| `Ctrl+Shift+R` | Change image angle (subtract 90 degrees) |
| `Shift+B+=` | Increase brightness level for the image |
| `Shift+B+-` | Decrease brightness level for the image |
| `Shift+C+=` | Increase contrast level for the image |

@ -102,7 +102,7 @@ context('Object make a copy.', () => {
cy.get(`#cvat-objects-sidebar-state-item-${id}`).within(() => {
cy.get('[aria-label="more"]').trigger('mouseover').wait(300); // Wait dropdown menu transition
});
cy.get('.cvat-object-item-menu').last().should('be.visible').contains('button', 'Make a copy').click(); // Get the tast element from cvat-object-item-menu array
cy.get('.cvat-object-item-menu').last().should('be.visible').contains('button', 'Make a copy').click(); // Get the last element from cvat-object-item-menu array
cy.get('.cvat-canvas-container').click(coordX, coordY);
cy.get('.cvat-canvas-container').click();
coordX += 100;
@ -145,7 +145,7 @@ context('Object make a copy.', () => {
.find('[aria-label="more"]')
.trigger('mouseover')
.wait(300); // Wait dropdown menu transition;
cy.get('.cvat-object-item-menu').last().should('be.visible').contains('button', 'Make a copy').click(); // Get the tast element from cvat-object-item-menu array
cy.get('.cvat-object-item-menu').last().should('be.visible').contains('button', 'Make a copy').click(); // Get the last element from cvat-object-item-menu array
cy.get('.cvat-canvas-container').click(coordX, coordY);
cy.get('.cvat-canvas-container').click(); // Deactivate all objects and hide context menu
coordX += 100;

@ -89,7 +89,7 @@ context('Autoborder feature.', () => {
testCollectCxCircleCoord(polygonSvgJsCircleId);
});
it('Start drawing a polyline with autobordering beetwen the two shapes.', () => {
it('Start drawing a polyline with autobordering between the two shapes.', () => {
cy.get('.cvat-draw-polyline-control').click();
cy.get('.cvat-draw-polyline-popover-visible').find('[type="button"]').contains('Shape').click();
testAutoborderPointsCount(12); // 8 points at the rectangles + 4 at the polygon

@ -127,7 +127,7 @@ context('Base actions on the project', () => {
cy.contains('.cvat-projects-project-item-title', failProjectName).should('not.exist');
cy.logout(userName);
});
it('Login first user. Assing project to second user. Logout.', () => {
it('Login first user. Assign project to second user. Logout.', () => {
cy.login();
cy.goToProjectsList();
cy.openProject(projectName);

@ -65,7 +65,7 @@ context('Dump/Upload annotation.', { browser: '!firefox' }, () => {
});
describe(`Testing case "${caseId}"`, () => {
it('Save job. Dump annotaion. Remove annotation. Save job.', () => {
it('Save job. Dump annotation. Remove annotation. Save job.', () => {
cy.saveJob('PATCH', 200, 'saveJobDump');
cy.intercept('GET', '/api/v1/tasks/**/annotations**').as('dumpAnnotations');
cy.interactMenu('Dump annotations');

@ -11,7 +11,7 @@ context('Create an annotation task with manifest.', () => {
const attrName = `Attr for ${labelName}`;
const textDefaultValue = 'Some default value for type Text';
const pathToFiles = `${__dirname}/assets/case_65_manifest`;
let filesToAttache = [];
let filesToAttach = [];
before(() => {
cy.visit('auth/login');
@ -28,9 +28,9 @@ context('Create an annotation task with manifest.', () => {
cy.task('listFiles', pathToFiles).then(($files) => {
$files.forEach(($el) => {
// Add the path relative to the fixtures folder to the file names for the plugin "cypress-file-upload" to work correctly
filesToAttache.push(`../../${pathToFiles}/${$el}`);
filesToAttach.push(`../../${pathToFiles}/${$el}`);
});
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, filesToAttache);
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, filesToAttach);
});
cy.get('.cvat-notification-create-task-success').should('exist');
cy.get('.cvat-notification-create-task-fail').should('not.exist');

@ -55,7 +55,7 @@ context('Mutable attribute.', () => {
testChangingAttributeValue(attrValueSecondFrame, attrValueThirdFrame);
});
it('Go to Standard mode. The object detaild have correct values on the corresponding frames.', () => {
it('Go to Standard mode. The object details have correct values on the corresponding frames.', () => {
cy.changeWorkspace('Standard');
cy.get('#cvat_canvas_shape_1')
.trigger('mousemove', { scrollBehavior: false })

@ -63,7 +63,7 @@ context('Import annotations for frames with dots in name.', { browser: '!firefox
});
describe(`Testing case "${issueId}"`, () => {
it('Save job. Dump annotaion to YOLO format. Remove annotation. Save job.', () => {
it('Save job. Dump annotation to YOLO format. Remove annotation. Save job.', () => {
cy.saveJob('PATCH', 200, 'saveJobDump');
cy.intercept('GET', '/api/v1/tasks/**/annotations**').as('dumpAnnotations');
cy.interactMenu('Dump annotations');

@ -6,7 +6,7 @@
import { taskName } from '../../support/const';
context('Collapse sidebar/apperance', () => {
context('Collapse sidebar/appearance', () => {
const caseId = '30';
let defaultValueLeftBackground;
@ -51,7 +51,7 @@ context('Collapse sidebar/apperance', () => {
checkEqualBackground();
});
it('Collapse apperance', () => {
it('Collapse appearance', () => {
// hide
cy.get('.cvat-objects-appearance-collapse-header').click();
cy.get('.cvat-objects-appearance-content').should('not.be.visible');

@ -48,7 +48,7 @@ context('Add/delete labels and attributes.', () => {
cy.get('.cvat-constructor-viewer-item').should('exist');
});
it('Start to edit the label. Attribute should exist. Remove the atrribute. Press Done.', () => {
it('Start to edit the label. Attribute should exist. Remove the attribute. Press Done.', () => {
cy.get('.cvat-constructor-viewer-item').find('[aria-label="edit"]').click();
cy.get('.cvat-attribute-inputs-wrapper')
.should('exist')

@ -10,7 +10,7 @@ context('Settings. "Player speed" option.', () => {
const caseId = '50';
let timeBeforePlay = 0;
let timeAferPlay = 0;
let timeAfterPlay = 0;
let durationSlower = 0;
let durationFastest = 0;
let durationFast = 0;
@ -41,8 +41,8 @@ context('Settings. "Player speed" option.', () => {
cy.get('.cvat-player-filename-wrapper')
.should('have.text', `${imageFileName}_28.png`)
.then(() => {
timeAferPlay = Date.now();
durationSlower = timeAferPlay - timeBeforePlay;
timeAfterPlay = Date.now();
durationSlower = timeAfterPlay - timeBeforePlay;
});
cy.goCheckFrameNumber(0);
});
@ -55,8 +55,8 @@ context('Settings. "Player speed" option.', () => {
cy.get('.cvat-player-filename-wrapper')
.should('have.text', `${imageFileName}_28.png`)
.then(() => {
timeAferPlay = Date.now();
durationFastest = timeAferPlay - timeBeforePlay;
timeAfterPlay = Date.now();
durationFastest = timeAfterPlay - timeBeforePlay;
expect(durationSlower).to.be.greaterThan(durationFastest);
});
cy.goCheckFrameNumber(0);
@ -70,8 +70,8 @@ context('Settings. "Player speed" option.', () => {
cy.get('.cvat-player-filename-wrapper')
.should('have.text', `${imageFileName}_28.png`)
.then(() => {
timeAferPlay = Date.now();
durationFast = timeAferPlay - timeBeforePlay;
timeAfterPlay = Date.now();
durationFast = timeAfterPlay - timeBeforePlay;
expect(durationSlower).to.be.greaterThan(durationFast);
});
});

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -65,10 +65,10 @@ context('When clicking on the Logout button, get the user session closed.', () =
email: Cypress.env('email'),
password: Cypress.env('password'),
},
}).then(async (responce) => {
responce = await responce['headers']['set-cookie'];
const csrfToken = responce[0].match(/csrftoken=\w+/)[0].replace('csrftoken=', '');
const sessionId = responce[1].match(/sessionid=\w+/)[0].replace('sessionid=', '');
}).then(async (response) => {
response = await response['headers']['set-cookie'];
const csrfToken = response[0].match(/csrftoken=\w+/)[0].replace('csrftoken=', '');
const sessionId = response[1].match(/sessionid=\w+/)[0].replace('sessionid=', '');
cy.visit(`/login-with-token/${sessionId}/${csrfToken}?next=/tasks/${taskId}`);
cy.contains('.cvat-task-details-task-name', `${taskName}`).should('be.visible');
});

@ -4,7 +4,7 @@
/// <reference types="cypress" />
context("Some parts of the Redux state (issues) isn't reset after chaning a task.", () => {
context("Some parts of the Redux state (issues) isn't reset after changing a task.", () => {
const issueId = '2524_2633';
const labelName = `Issue ${issueId}`;
const taskName = {

@ -150,7 +150,7 @@ context('Canvas 3D functionality. Basic actions.', () => {
cy.get('.cvat-player-first-button').click();
cy.checkFrameNum(0);
cy.get('.cvat-player-filename-wrapper').should('contain.text', '000001.pcd');
testContextImage(); // Check context image on the firts frame
testContextImage(); // Check context image on the first frame
cy.get('.cvat-player-forward-button').click();
cy.checkFrameNum(2);
cy.get('.cvat-player-filename-wrapper').should('contain.text', '000003.pcd');

@ -8,8 +8,8 @@ import { taskName } from '../../support/const_canvas3d';
context('Canvas 3D functionality. Resize views.', () => {
const caseId = '62';
let widthHightArrBeforeResize = [];
let widthHightArrAfterResize = [];
let widthHeightArrBeforeResize = [];
let widthHeightArrAfterResize = [];
function getViewWidthHeight(element, arrToPush) {
cy.get(element)
@ -27,10 +27,10 @@ context('Canvas 3D functionality. Resize views.', () => {
before(() => {
cy.openTaskJob(taskName);
getViewWidthHeight('.cvat-canvas3d-perspective', widthHightArrBeforeResize);
getViewWidthHeight('.cvat-canvas3d-topview', widthHightArrBeforeResize);
getViewWidthHeight('.cvat-canvas3d-sideview', widthHightArrBeforeResize);
getViewWidthHeight('.cvat-canvas3d-frontview', widthHightArrBeforeResize);
getViewWidthHeight('.cvat-canvas3d-perspective', widthHeightArrBeforeResize);
getViewWidthHeight('.cvat-canvas3d-topview', widthHeightArrBeforeResize);
getViewWidthHeight('.cvat-canvas3d-sideview', widthHeightArrBeforeResize);
getViewWidthHeight('.cvat-canvas3d-frontview', widthHeightArrBeforeResize);
});
describe(`Testing case "${caseId}"`, () => {
@ -39,7 +39,7 @@ context('Canvas 3D functionality. Resize views.', () => {
cy.get('.cvat-canvas3d-perspective')
.trigger('mousemove', 600, 300, { scrollBehavior: false })
.trigger('mouseup');
getViewWidthHeight('.cvat-canvas3d-perspective', widthHightArrAfterResize);
getViewWidthHeight('.cvat-canvas3d-perspective', widthHeightArrAfterResize);
});
it('Resizing topview.', () => {
@ -47,7 +47,7 @@ context('Canvas 3D functionality. Resize views.', () => {
cy.get('.cvat-canvas3d-topview')
.trigger('mousemove', 200, 200, { scrollBehavior: false })
.trigger('mouseup');
getViewWidthHeight('.cvat-canvas3d-topview', widthHightArrAfterResize);
getViewWidthHeight('.cvat-canvas3d-topview', widthHeightArrAfterResize);
});
it('Resizing sideview.', () => {
@ -55,27 +55,27 @@ context('Canvas 3D functionality. Resize views.', () => {
cy.get('.cvat-canvas3d-frontview')
.trigger('mousemove', 200, 200, { scrollBehavior: false })
.trigger('mouseup');
getViewWidthHeight('.cvat-canvas3d-sideview', widthHightArrAfterResize);
getViewWidthHeight('.cvat-canvas3d-frontview', widthHightArrAfterResize);
getViewWidthHeight('.cvat-canvas3d-sideview', widthHeightArrAfterResize);
getViewWidthHeight('.cvat-canvas3d-frontview', widthHeightArrAfterResize);
});
it('Checking for elements resizing.', () => {
expect(widthHightArrBeforeResize[0][0]).to.be.equal(widthHightArrAfterResize[0][0]); // Width of cvat-canvas3d-perspective before and after didn't change
expect(widthHightArrBeforeResize[0][1]).not.be.equal(widthHightArrAfterResize[0][1]); // Height of cvat-canvas3d-perspective changed
expect(widthHightArrAfterResize[1][1])
.to.be.equal(widthHightArrAfterResize[2][1])
.to.be.equal(widthHightArrAfterResize[3][1]); // Top/side/front has equal height after changes
expect(widthHeightArrBeforeResize[0][0]).to.be.equal(widthHeightArrAfterResize[0][0]); // Width of cvat-canvas3d-perspective before and after didn't change
expect(widthHeightArrBeforeResize[0][1]).not.be.equal(widthHeightArrAfterResize[0][1]); // Height of cvat-canvas3d-perspective changed
expect(widthHeightArrAfterResize[1][1])
.to.be.equal(widthHeightArrAfterResize[2][1])
.to.be.equal(widthHeightArrAfterResize[3][1]); // Top/side/front has equal height after changes
[
[widthHightArrBeforeResize[1][0], widthHightArrAfterResize[1][0]],
[widthHightArrBeforeResize[2][0], widthHightArrAfterResize[2][0]],
[widthHightArrBeforeResize[3][0], widthHightArrAfterResize[3][0]],
[widthHeightArrBeforeResize[1][0], widthHeightArrAfterResize[1][0]],
[widthHeightArrBeforeResize[2][0], widthHeightArrAfterResize[2][0]],
[widthHeightArrBeforeResize[3][0], widthHeightArrAfterResize[3][0]],
].forEach(([widthBefore, widthAfter]) => {
expect(widthBefore).not.be.equal(widthAfter); // Width of top/side/front changed
});
[
[widthHightArrBeforeResize[1][1], widthHightArrAfterResize[1][1]],
[widthHightArrBeforeResize[2][1], widthHightArrAfterResize[2][1]],
[widthHightArrBeforeResize[3][1], widthHightArrAfterResize[3][1]],
[widthHeightArrBeforeResize[1][1], widthHeightArrAfterResize[1][1]],
[widthHeightArrBeforeResize[2][1], widthHeightArrAfterResize[2][1]],
[widthHeightArrBeforeResize[3][1], widthHeightArrAfterResize[3][1]],
].forEach(([heightBefore, heightAfter]) => {
expect(heightBefore).not.be.equal(heightAfter); // Height of top/side/front changed
});

@ -6,7 +6,7 @@
import { taskName, advancedConfigurationParams, labelName } from '../../support/const';
context('First part of a splitted track is visible', () => {
context('First part of a split track is visible', () => {
const issueId = '1819';
const createRectangleTrack2Points = {
points: 'By 2 Points',
@ -42,7 +42,7 @@ context('First part of a splitted track is visible', () => {
cy.get('input[role="spinbutton"]').should('have.value', advancedConfigurationParams.segmentSize - 2);
});
});
it('First part of a splitted track is visible', () => {
it('First part of a split track is visible', () => {
cy.get('#cvat_canvas_shape_2').should('be.visible');
});
});

@ -25,7 +25,7 @@ context(
complete: true,
numberOfPoints: null,
};
const createThridPointsShape = {
const createThirdPointsShape = {
type: 'Shape',
labelName: labelName,
pointsMap: [{ x: 400, y: 410 }],
@ -46,7 +46,7 @@ context(
cy.get('#cvat-objects-sidebar-state-item-1').should('contain', '1').and('contain', 'POINTS SHAPE');
cy.createPoint(createSecondPointsShape);
cy.get('#cvat-objects-sidebar-state-item-2').should('contain', '2').and('contain', 'POINTS SHAPE');
cy.createPoint(createThridPointsShape);
cy.createPoint(createThirdPointsShape);
cy.get('#cvat-objects-sidebar-state-item-3')
.should('contain', '3')
.and('contain', 'POINTS SHAPE')

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -16,8 +16,8 @@ describe('Delete users and tasks created during the test run.', () => {
email: Cypress.env('email'),
password: Cypress.env('password'),
},
}).then(async (responce) => {
authKey = await responce['body']['key'];
}).then(async (response) => {
authKey = await response['body']['key'];
});
});
it('Get a list of users and delete all except id:1', () => {
@ -26,8 +26,8 @@ describe('Delete users and tasks created during the test run.', () => {
headers: {
Authorization: `Token ${authKey}`,
},
}).then(async (responce) => {
const responceResult = await responce['body']['results'];
}).then(async (response) => {
const responceResult = await response['body']['results'];
for (let user of responceResult) {
let userId = user['id'];
if (userId !== 1) {
@ -48,8 +48,8 @@ describe('Delete users and tasks created during the test run.', () => {
headers: {
Authorization: `Token ${authKey}`,
},
}).then(async (responce) => {
const responceResult = await responce['body']['results'];
}).then(async (response) => {
const responceResult = await response['body']['results'];
for (let tasks of responceResult) {
let taskId = tasks['id'];
cy.request({
@ -68,8 +68,8 @@ describe('Delete users and tasks created during the test run.', () => {
headers: {
Authorization: `Token ${authKey}`,
},
}).then(async (responce) => {
const responceResult = await responce['body']['results'];
}).then(async (response) => {
const responceResult = await response['body']['results'];
for (let tasks of responceResult) {
let taskId = tasks['id'];
cy.request({

@ -55,15 +55,15 @@ Cypress.Commands.add('deletingRegisteredUsers', (accountToDelete) => {
email: Cypress.env('email'),
password: Cypress.env('password'),
},
}).then((responce) => {
const authKey = responce['body']['key'];
}).then((response) => {
const authKey = response['body']['key'];
cy.request({
url: '/api/v1/users?page_size=all',
headers: {
Authorization: `Token ${authKey}`,
},
}).then((responce) => {
const responceResult = responce['body']['results'];
}).then((response) => {
const responceResult = response['body']['results'];
for (const user of responceResult) {
const userId = user['id'];
const userName = user['username'];

Loading…
Cancel
Save