Commit 2a719148 authored by Stephen Thompson's avatar Stephen Thompson

Issue #6 capped pyside version to match surgeryutils

parent 4b6da1d5
Pipeline #3978 passed with stages
in 8 minutes and 8 seconds
......@@ -3,7 +3,7 @@
# confused with the software requirements, which are listed in
# doc/requirements.rst
numpy>=1.11
PySide2
PySide2<=5.13.1
vtk
scikit-surgeryvtk>=0.9.0
scikit-surgeryimage>=0.6.0
......
......@@ -53,7 +53,7 @@ setup(
install_requires=[
'numpy>=1.11',
'vtk',
'PySide2',
'PySide2<=5.13.1',
'scikit-surgeryvtk>=0.9.0',
'scikit-surgeryimage>=0.6.0',
'scikit-surgerycore',
......
# coding=utf-8
"""scikit-surgery-evaluation tests"""
# Pytest style
def test_requirements_vs_setup():
"""
Test that the requirements.txt matches setup.py
"""
# setup=open("setup.py","r")
# setuptxt = setup.read()
# setup.close()
with open("setup.py", "r") as file_to_read:
searchlines = file_to_read.readlines()
install_line = -1
for i, line in enumerate(searchlines):
if "install_requires" in line:
install_line = i
break
end_line = -1
for i, line in enumerate(searchlines[install_line:]):
if "]" in line:
end_line = install_line + i
break
setup_reqs = []
for line in searchlines[install_line + 1: end_line]:
req = line.replace(',', '').replace("'", "")
req = req.replace(' ', '').replace('\n', '')
setup_reqs.append(req)
with open("requirements.txt", "r") as file_to_read:
searchlines = file_to_read.readlines()
reqs = []
for line in searchlines:
if "#" not in line:
reqs.append(line.replace('\n', ''))
for setup_req in setup_reqs:
assert setup_req in reqs
for req in reqs:
assert req in setup_reqs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment