Skip to content

Commit

Permalink
Merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Oct 12, 2020
2 parents 9135de8 + df6e6fd commit 654dc4a
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed issues from #2112 (<https://github.com/openvinotoolkit/cvat/pull/2217>)
- Git application name (renamed to dataset_repo) (<https://github.com/openvinotoolkit/cvat/pull/2243>)
- A problem in exporting of tracks, where tracks could be truncated (<https://github.com/openvinotoolkit/cvat/issues/2129>)
- Fixed CVAT startup process if the user has `umask 077` in .bashrc file (<https://github.com/openvinotoolkit/cvat/pull/2293>)
- Exception: Cannot read property "each" of undefined after drawing a single point (<https://github.com/openvinotoolkit/cvat/pull/2307>)
- Cannot read property 'label' of undefined (Fixed?) (<https://github.com/openvinotoolkit/cvat/pull/2311>)


### Security

-
Expand Down
2 changes: 1 addition & 1 deletion cvat-canvas/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cvat-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.1.2",
"version": "2.1.3",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion cvat-canvas/src/typescript/drawHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,16 @@ export class DrawHandlerImpl implements DrawHandler {

const sizeDecrement = (): void => {
if (--size === 0) {
this.drawInstance.draw('done');
// we need additional settimeout because we cannot invoke draw('done')
// from event listener for drawstart event
// because of implementation of svg.js
setTimeout((): void => this.drawInstance.draw('done'));
}
};

this.drawInstance.on('drawstart', sizeDecrement);
this.drawInstance.on('drawpoint', sizeDecrement);
this.drawInstance.on('drawupdate', (): void => this.transform(this.geometry));
this.drawInstance.on('undopoint', (): number => size++);

// Add ability to cancel the latest drawn point
Expand Down
3 changes: 2 additions & 1 deletion cvat-canvas/src/typescript/editHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ export class EditHandlerImpl implements EditHandler {
this.transform(this.geometry);
lastDrawnPoint.x = e.detail.event.clientX;
lastDrawnPoint.y = e.detail.event.clientY;
}).draw(dummyEvent, { snapToGrid: 0.1 });
}).on('drawupdate', (): void => this.transform(this.geometry))
.draw(dummyEvent, { snapToGrid: 0.1 });

if (this.editData.state.shapeType === 'points') {
this.editLine.attr('stroke-width', 0);
Expand Down
17 changes: 15 additions & 2 deletions cvat/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2018-2019 Intel Corporation
# Copyright (C) 2018-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -50,10 +50,22 @@ def generate_ssh_keys():
ssh_dir = '{}/.ssh'.format(os.getenv('HOME'))
pidfile = os.path.join(ssh_dir, 'ssh.pid')

def add_ssh_keys():
IGNORE_FILES = ('README.md', 'ssh.pid')
keys_to_add = [entry.name for entry in os.scandir(ssh_dir) if entry.name not in IGNORE_FILES]
keys_to_add = ' '.join(os.path.join(ssh_dir, f) for f in keys_to_add)
subprocess.run(['ssh-add {}'.format(keys_to_add)],
shell = True,
stderr = subprocess.PIPE,
# lets set the timeout if ssh-add requires a input passphrase for key
# otherwise the process will be freezed
timeout=30,
)

with open(pidfile, "w") as pid:
fcntl.flock(pid, fcntl.LOCK_EX)
try:
subprocess.run(['ssh-add {}/*'.format(ssh_dir)], shell = True, stderr = subprocess.PIPE)
add_ssh_keys()
keys = subprocess.run(['ssh-add -l'], shell = True,
stdout = subprocess.PIPE).stdout.decode('utf-8').split('\n')
if 'has no identities' in keys[0]:
Expand Down Expand Up @@ -440,3 +452,4 @@ def generate_ssh_keys():
}

USE_CACHE = True

1 change: 1 addition & 0 deletions ssh/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Put your SSH keys and SSH config here and they will be installed to the CVAT container.
Please do not use encrypted keys that require a passphrase - these keys will not be used.

If you have any problems with a git repository cloning inside the CVAT:
* Make sure that SSH keys have been added to the CVAT container:
Expand Down

0 comments on commit 654dc4a

Please sign in to comment.