metawards / MetaWards

MetaWards disease metapopulation analysis and modelling software. Professional geographical SIR model with a flexible plugin architecture to support complex scenario modelling
https://metawards.org
GNU General Public License v3.0
13 stars 6 forks source link

[BUG] - Type hints cause name errors in custom plugin system #142

Closed fentonscode closed 4 years ago

fentonscode commented 4 years ago

Describe the bug This has recently appeared since 1.0.0 - it appears that type hints from the metawards package are used e.g.: network: metawards.Network cause the custom plugin import routines to fail on my system.

Environment:

chryswoods commented 4 years ago

Thanks @fentonscode. I've taken a look and I can't reproduce this problem. I've created a new branch in which I added test_plugins.py. This test loads up one of each type of plugin and checks that they all work. I added type hints to the plugins. I tested by running on Windows 10 myself, and also just now have merged this with devel which has run this through the CI.

Could you run tests/test_plugins.py on your machine. Does it work? If it doesn't, then can you try a fresh install?

If it does work, then that suggests the error is with the plugin you are trying to load. Could you post the code for the plugin, or more detail about the error?

Thanks :-)

chryswoods commented 4 years ago

I am going to close this as it has been inactive and I am preparing the 1.4 release. Please feel free to reopen if this is still a problem and test_plugins.py is not working for you. This code is now in the devel branch, and will soon be in 1.4.