Skip to content

Models: Fail if submodule not installed #57

Open

Description

@fleimgruber

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.

Activity

  1. fleimgruber commented on Sep 11, 2018

    @fleimgruber
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions