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

Models: Fail if submodule not installed #57

Open
fleimgruber opened this issue Sep 5, 2018 · 1 comment
Open

Models: Fail if submodule not installed #57

fleimgruber opened this issue Sep 5, 2018 · 1 comment

Comments

@fleimgruber
Copy link

Expected behaviour
A git clone should work out of the box or error / warn if dependencies are missing.

Actual behaviour
Git clone is installed correctly in develop mode. Module can be imported, client can be instantiated, but has the attributes client.model_1, client.model_111, ... instead of the expected client.common, client.inverter, ...

Steps to reproduce

git clone https://github.com/sunspec/pysunspec
pip install -e pysunspec

and then try an example such as https://pysunspec.readthedocs.io/en/latest/pysunspec.html#interacting-with-a-sunspec-device.

Suggested fix
Error out or warn the user / developer that the model definitions could not be found.

Notes
The README states that the clone should have --recursive for the git submodules, but that may be overlooked in development, customized or automated installations. This is to warn / fail early in case of an inconsistent and non-functioning installation.

@fleimgruber
Copy link
Author

I had a closer look and it seems that the branch

is not followed because model_type_get(1) does not throw any exception.

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

1 participant