mxochicale / scikit-surgery-sphere-fitting-test

Other
0 stars 0 forks source link

Adding a User Interface #2

Open mxochicale opened 2 years ago

mxochicale commented 2 years ago

https://scikit-surgerytutorial02.readthedocs.io/en/latest/07_UserInterface.html

mxochicale commented 2 years ago
(scikit-surgery-VE) miguel@smartliveri4i-Alienware-13-R3:~/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting$ tox

...

py37 run-test: commands[1] | coverage run -a --source ./scikit-surgery-sphere-fitting -m pytest -v -s ./tests/
======================================================== test session starts ========================================================
platform linux -- Python 3.7.13, pytest-7.1.3, pluggy-1.0.0 -- /home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting/.tox/py37/bin/python
cachedir: .tox/py37/.pytest_cache
rootdir: /home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting
plugins: pyfakefs-5.0.0
collected 2 items / 1 error                                                                                                         

============================================================== ERRORS ===============================================================
____________________________________ ERROR collecting tests/test_sksurgeryspherefitting_demo.py _____________________________________
ImportError while importing test module '/home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting/tests/test_sksurgeryspherefitting_demo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../anaconda3/envs/scikit-surgery-VE/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_sksurgeryspherefitting_demo.py:5: in <module>
    from sksurgeryspherefitting.ui.sksurgeryspherefitting_demo import run_demo
sksurgeryspherefitting.py:5: in <module>
    from sksurgeryspherefitting.ui.sksurgeryspherefitting_command_line import main
E   ModuleNotFoundError: No module named 'sksurgeryspherefitting.ui'; 'sksurgeryspherefitting' is not a package
====================================================== short test summary info ======================================================
ERROR tests/test_sksurgeryspherefitting_demo.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================= 1 error in 0.34s ==========================================================

trying to find answers

mxochicale commented 2 years ago

Logs from previous commit:

(scikit-surgery-VE) miguel@smartliveri4i-Alienware-13-R3:~/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting$ tox
py37 installed: aiohttp==3.8.3,aiosignal==1.2.0,alabaster==0.7.12,altgraph==0.17.3,astroid==2.12.11,async-timeout==4.0.2,asynctest==0.13.0,attrs==22.1.0,Babel==2.10.3,backcall==0.2.0,beautifulsoup4==4.11.1,bleach==5.0.1,certifi==2022.9.24,charset-normalizer==2.1.1,coverage==6.5.0,cycler==0.11.0,debugpy==1.6.3,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.6,docutils==0.17.1,entrypoints==0.4,fastjsonschema==2.16.2,filelock==3.8.0,fonttools==4.37.4,frozenlist==1.3.1,idna==3.4,imagesize==1.4.1,importlib-metadata==5.0.0,importlib-resources==5.10.0,iniconfig==1.1.1,ipykernel==6.16.0,ipython==7.34.0,isort==5.10.1,jedi==0.18.1,Jinja2==3.1.2,jsonschema==4.16.0,jupyter-core==4.11.1,jupyter_client==7.4.2,jupyterlab-pygments==0.2.2,kiwisolver==1.4.4,lazy-object-proxy==1.7.1,MarkupSafe==2.1.1,matplotlib==3.5.3,matplotlib-inline==0.1.6,mccabe==0.7.0,mistune==2.0.4,mock==4.0.3,multidict==6.0.2,nbclient==0.7.0,nbconvert==7.2.1,nbformat==5.7.0,nbsphinx==0.8.9,nest-asyncio==1.5.6,numpy==1.21.6,opencv-contrib-python-headless==4.6.0.66,packaging==21.3,pandocfilters==1.5.0,parameterized==0.8.1,parso==0.8.3,pexpect==4.8.0,pickleshare==0.7.5,Pillow==9.2.0,pkgutil_resolve_name==1.3.10,platformdirs==2.5.2,pluggy==1.0.0,prompt-toolkit==3.0.31,psutil==5.9.2,ptyprocess==0.7.0,py==1.11.0,pyfakefs==5.0.0,Pygments==2.13.0,pyinstaller==5.5,pyinstaller-hooks-contrib==2022.10,pylint==2.15.4,pyparsing==3.0.9,pyrsistent==0.18.1,PySide2==5.14.2.3,pytest==7.1.3,python-dateutil==2.8.2,pytz==2022.4,pyzmq==24.0.1,requests==2.28.1,scikit-surgerycore==0.6.10,scikit-surgeryimage==0.10.1,scikit-surgeryvtk==1.0.6,scipy==1.7.3,shiboken2==5.14.2.3,six==1.16.0,snowballstemmer==2.2.0,soupsieve==2.3.2.post1,Sphinx==5.3.0,sphinx-rtd-theme==1.0.0,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.0,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,tinycss2==1.1.1,tomli==2.0.1,tomlkit==0.11.5,tornado==6.2,tox==3.26.0,traitlets==5.4.0,typed-ast==1.5.4,typing_extensions==4.4.0,urllib3==1.26.12,virtualenv==20.16.5,vtk==9.1.0,wcwidth==0.2.5,webencodings==0.5.1,wrapt==1.14.1,wslink==1.8.4,yarl==1.8.1,zipp==3.9.0
py37 run-test-pre: PYTHONHASHSEED='2722991370'
py37 run-test-pre: commands[0] | ipython kernel install --user --name=scikit-surgery-sphere-fitting
Installed kernelspec scikit-surgery-sphere-fitting in /home/miguel/.local/share/jupyter/kernels/scikit-surgery-sphere-fitting
py37 run-test: commands[0] | coverage erase
py37 run-test: commands[1] | coverage run -a --source ./scikit-surgery-sphere-fitting -m pytest -v -s ./tests/
======================================================== test session starts ========================================================
platform linux -- Python 3.7.13, pytest-7.1.3, pluggy-1.0.0 -- /home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting/.tox/py37/bin/python
cachedir: .tox/py37/.pytest_cache
rootdir: /home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting
plugins: pyfakefs-5.0.0
collected 3 items                                                                                                                   

tests/test_requirements.py::test_requirements_vs_setup PASSED
tests/test_sksurgeryspherefitting.py::test_fit_sphere_least_squares PASSED
tests/test_sksurgeryspherefitting_demo.py::test_fit_sphere_least_squares_demo Result is (array([136.571217  , 151.97335771, -95.51789211,   8.11853981]), 2)
PASSED

========================================================= 3 passed in 0.55s =========================================================
/home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting/.tox/py37/lib/python3.7/site-packages/coverage/inorout.py:519: CoverageWarning: Module ./scikit-surgery-sphere-fitting was never imported. (module-not-imported)
  self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
/home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting/.tox/py37/lib/python3.7/site-packages/coverage/control.py:801: CoverageWarning: No data was collected. (no-data-collected)
  self._warn("No data was collected.", slug="no-data-collected")
py37 run-test: commands[2] | coverage report -m
No data to report.
ERROR: InvocationError for command /home/miguel/repositories/SciKit-Surgery/scikit-surgery-sphere-fitting/.tox/py37/bin/coverage report -m (exited with code 1)