Skip to content

Commit

Permalink
Sorted requirements, added a comment, removed nosec for exec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Manovich committed Mar 10, 2020
1 parent eda0b42 commit a65072a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion datumaro/datumaro/plugins/openvino_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, path):
script = f.read()

context = {}
exec(script, context, context) # nosec
exec(script, context, context)

process_outputs = context['process_outputs']
assert callable(process_outputs)
Expand All @@ -48,6 +48,9 @@ class OpenVinoLauncher(Launcher):
@staticmethod
def _check_instruction_set(instruction):
return instruction == str.strip(
# Let's ignore a warning from bandit about using shell=True.
# In this case it isn't a security issue and we use some
# shell features like pipes.
subprocess.check_output(
'lscpu | grep -o "{}" | head -1'.format(instruction),
shell=True).decode('utf-8') # nosec
Expand Down
2 changes: 1 addition & 1 deletion datumaro/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Cython>=0.27.3 # include before pycocotools
defusedxml>=0.6.0
GitPython>=3.0.8
lxml>=4.4.1
matplotlib<3.1 # 3.1+ requires python3.6, but we have 3.5 in cvat
Expand All @@ -8,4 +9,3 @@ pycocotools>=2.0.0
PyYAML>=5.1.1
scikit-image>=0.15.0
tensorboardX>=1.8
defusedxml>=0.6.0
4 changes: 2 additions & 2 deletions datumaro/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ def find_version(file_path=None):
],
python_requires='>=3.5',
install_requires=[
'defusedxml',
'GitPython',
'lxml',
'matplotlib',
'numpy',
'opencv-python',
'Pillow',
'PyYAML',
'pycocotools',
'PyYAML',
'scikit-image',
'tensorboardX',
'defusedxml',
],
extras_require={
'tf': ['tensorflow'],
Expand Down

0 comments on commit a65072a

Please sign in to comment.