Skip to content

[JOSS REVIEW] tests no_fpga failing #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
askuric opened this issue Oct 2, 2022 · 3 comments
Closed

[JOSS REVIEW] tests no_fpga failing #22

askuric opened this issue Oct 2, 2022 · 3 comments
Assignees

Comments

@askuric
Copy link

askuric commented Oct 2, 2022

Describe the bug
I'm testing the installation of the pyripherals pip package. I've followed the instalation guidelines, and installed it from pip. However since I do not have FPGA to test it with and I'm working on linux, I cannot install the FronPannel API. So the first test of

from pyripherals.utils import create_yaml
create_yaml()

was successful.

However when I try to run the tests, the line python -m pytest -m no_fpgagives this error:

================================================================================== test session starts ==================================================================================
platform linux -- Python 3.10.4, pytest-7.1.3, pluggy-1.0.0
rootdir: ../joss/pyripherals, configfile: pyproject.toml
collected 1339 items / 1 error / 515 deselected / 824 selected                                                                                                                          

======================================================================================== ERRORS =========================================================================================
_________________________________________________________________ ERROR collecting python/tests/unit_tests/i2c_test.py __________________________________________________________________
python/tests/unit_tests/i2c_test.py:20: in <module>
    message_eps = Endpoint.get_chip_endpoints('I2CTEST')
../../python3.10/site-packages/pyripherals/core.py:335: in get_chip_endpoints
    Endpoint.update_endpoints_from_defines()
../../python3.10/site-packages/pyripherals/core.py:159: in update_endpoints_from_defines
    with open(ep_defines_path, 'r') as file:
E   TypeError: expected str, bytes or os.PathLike object, not NoneType
================================================================================ short test summary info ================================================================================
ERROR python/tests/unit_tests/i2c_test.py - TypeError: expected str, bytes or os.PathLike object, not NoneType
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=========================================================================== 515 deselected, 1 error in 1.51s ============================================================================

I have cloned your repository and I have the same behavior for the master and v0.0.2 branch.

I am not sure if this is due to not having FronPannel API, or maybe Linux OS or something else.

@lucask07
Copy link
Collaborator

lucask07 commented Oct 6, 2022

Hi @askuric
Could you post your YAML configuration file (described here)? The error output suggests that ep_defines_path is None.

You are correct that we have not been able to test with Linux OS. But we have verified with both Windows and MAC OS.

My MAC configuration file is at ~/.pyripherals/config.yaml

endpoint_max_width: 32
ep_defines_path: /Users/koer2434/Documents/covg_fpga/fpga_XEM7310/fpga_XEM7310.srcs/sources_1/ep_defines.v
fpga_bitfile_path: /Users/koer2434/Documents/covg_fpga/fpga_XEM7310/fpga_XEM7310.runs/impl_1/top_level_module.bit
frontpanel_path: /Users/koer2434/Documents/frontpanel_5p26
registers_path: /Users/koer2434/Documents/covg_fpga/python/Registers.xlsx

@untzag
Copy link

untzag commented Oct 6, 2022

Hi @lucask07, I have the same issue as @askuric. My auto-generated YAML is as follows:

endpoint_max_width: 32
ep_defines_path: null
fpga_bitfile_path: null
frontpanel_path: C:/Program Files/Opal Kelly/FrontPanelUSB
registers_path: null

@untzag
Copy link

untzag commented Oct 6, 2022

I guess we are in a somewhat strange place, we would like to know the minimal path to run tests without hardware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants