-
Notifications
You must be signed in to change notification settings - Fork 50
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
Tests are failing with an exception #17
Comments
You must checkout the sunspec/models repository then things work better. In my fork I added it as a submodule (7e483f9). |
This error is not at all obvious, I just spent too much time tracking this down on my own, until thinking to take a look at the closed issues. I discovered the fix only after reverting to 1.0.6 and noticing the models directory. Why not just include the models directory in 1.0.7 to save people like me trouble? |
I am sorry this caused you to waste some time. The models are included with every release. The pysunspec-1.07.zip is the 1..0.7 release in the standard Python format. If you install the release in the standard way, the models are included. If you pull the source code directly, you will only get the source code. The models are in a separate repository because they are used in other places and are independent of any on the Python projects. |
As in 7e483f9, the models could be included as Git submodules. That would at least use the 'standard' Git tool for linking repositories. That said, many people would still likely miss it (myself included). Seems to me that it would be reasonable to have an explicit check for that directory which raises an exception when it is not found and provides both a direct message as to what is wrong ('Models are not available in standard location') as well as instructions to correct the issue ('Checkout http://github.com/sunspec/models into the ... directory'). Or, Git submodules instructions, if that is how they will be acquired. Libraries and applications also often allow for environment variables to specify non-standard locations for 'external' resources. Another approach focusing on the Python side would be to integrate fetching of the modules into If models isn't going to become a Git submodule I would recommend it exist outside of the checked-out pysunspec Git repository rather than as a subdirectory. I personally find nested unrelated repositories confusing. |
Are the tests passing for other people? They fail with an exception for me. I'll work this out but figured it would be worth checking here.
Or, with an
except
removed to see the original trace:The text was updated successfully, but these errors were encountered: