Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
conda
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
conda
Commits
d911bfa5
Commit
d911bfa5
authored
Jan 25, 2021
by
Vincent POLLET
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for package integrity
parent
4e3fd1f8
Pipeline
#47335
passed with stage
in 10 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
conda/opencv/run_test.py
conda/opencv/run_test.py
+30
-0
No files found.
conda/opencv/run_test.py
0 → 100644
View file @
d911bfa5
import
sys
# couple of imports to see if packages are working
import
cv2
import
pkg_resources
def
test_pytorch
():
import
cv2
print
(
"opencv version: "
,
cv2
.
__version__
)
def
_check_package
(
name
,
pyname
=
None
):
"""Checks if a Python package can be `require()`'d"""
pyname
=
pyname
or
name
print
(
f"Checking Python setuptools integrity for
{
name
}
(pyname:
{
pyname
}
)"
)
pkg_resources
.
require
(
pyname
)
def
test_setuptools_integrity
():
_check_package
(
'pytorch'
,
'torch'
)
_check_package
(
'torchvision'
)
# test if pytorch installation is sane
test_pytorch
()
test_setuptools_integrity
()
\ No newline at end of file
Vincent POLLET
@vpollet
mentioned in commit
bffb49f4
·
Jan 26, 2021
mentioned in commit
bffb49f4
mentioned in commit bffb49f4ab13f7f0de5440140531d12cc02bf045
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment