Skip to content
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

Examples do not work out of the box (automatic test against pip required for check if new release of dependency is required) #23

Open
philipaxer opened this issue Jul 30, 2020 · 4 comments
Milestone

Comments

@philipaxer
Copy link

Hi,

a lot of the more elaborate examples do not work. This seems mostly because of API changes that were made in the past.

A baseline pip install hwtlib hwt as well as the latest git master clone will give the same issues.

For the StructReader, I see this error:

   from hwtLib.amba.datapump.intf import AxiRDatapumpIntf
ModuleNotFoundError: No module named 'hwtLib.amba.datapump'

For other examples there are other errors. But all i have traced back is linked to changed APIs (imports or function names).

This makes is really hard to understand some advanced concepts because there is not much documentation except the examples. I strongly recommed to add the examples to a regression suite so it does not break.

regards
Philip

@Nic30
Copy link
Owner

Nic30 commented Jul 30, 2020

Hi Philip,

as you mentioned, this is confusing,

everything is tested and it works in every commit on travis-ci as well on several other places.
Yet somehow it did happen that user did download package and it does not work at all.

Let me check the status of pip packages. The installation from repositories should work (small team is using it every day on multiple servers, including me right now)

pip3 install -r docs/requirements.hwt.txt
python3 setup.py install

However if there is something wrong in some package which you thing it is causing the issue, please feel free to notify me.

Now when I am thinking about it.
By example do you mean hwtLib/structManipulators/structReader.py ?
You do not need to actually install hwtLib but then you need to execute files using module path:

python3 -m hwtLib.structManipulators.structReader

instead of

python3 hwtLib/structManipulators/structReader.py

(just saying)
structReader.zip

@philipaxer
Copy link
Author

Hi Nic,

I usually copy paste from the examples and then modify it slightly to see what happens. This is why I dont run it in-place.

One thing which I also noticed is that HStruct_unpackt was moved to a different module and renamed but hwlib/amba/axis.py imports it.

Is there a place where I can ask general questions? I.e. like gitter or so?

regards
Philip

@Nic30
Copy link
Owner

Nic30 commented Jul 30, 2020

I created a gitter room 6883d73

There were some api updates, that explain why it does not work with pip version you mentioned. However that does not explain why git version does not work. I guess that is because you have everything already installed and nothing actually changes on install. Try using https://stackoverflow.com/questions/19548957/can-i-force-pip-to-reinstall-the-current-version or uninstall mentioned packages first.

(Note that I understand that I should release new packages in order to match a new API currently used in git)

@Nic30 Nic30 added this to the v2.9 milestone Nov 26, 2020
@Nic30 Nic30 changed the title Examples do not work out of the box Examples do not work out of the box (automatic test against pip required for check if new release of dependency is required) Nov 26, 2020
@Nic30
Copy link
Owner

Nic30 commented Nov 26, 2020

Will be activated on new release 9e929ba

@Nic30 Nic30 modified the milestones: v2.9, v3.0 Jul 2, 2021
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

2 participants