-
Notifications
You must be signed in to change notification settings - Fork 188
Initial Django inspired component loading #719
Conversation
PS: Don't merge yet. If this was the intended idea then I'll also have to update the documentation to remove any |
I may not fully understand the implications, but I think simpler is better. If we could make one change to update the mainnet, testnet, privnet settings between "default" and "extended", I think that is okay, since a user is usually only using one instance at time. Either way, I think good documentation will allow for a user to operate the servers in the new way regardless of the implementation. |
Looks good! I think the only problem is that a user who installed from pip could not specify which plugin to use without editing the installed settings file. I think choice 2 would allow for that. As long as we have sensible defaults for when plugins aren't specified in |
into plugin_django_style * 'plugin_django_style' of https://github.com/ixje/neo-python: correct privnet bootstrap name to avoid confusion Allow a raw transaction to be built without an active blockchain db in the environment (#718)
This should be it, I didn't see any documentation that referenced the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@ixje Are you adding instructions in this PR on how to use the new setup? Or could you implement those instructions with #664? |
For the time being I'm not adding the instructions with this PR. We should document this at a point though. |
If you like, I can incorporate instructions into #664. |
- revert changes to bring to parody with CityOfZion#719
- update documentation for CityOfZion#712 and CityOfZion#719
What current issue(s) does this address, or what feature is it adding?
A different approach for loading plugins as suggested in #699, Django inspired
How did you solve this problem?
add a class loader
How did you make sure your solution works?
manually run
api_server.py
with Rest and RPC serversAre there any special changes in the code that we should be aware of?
Yes; the
RPC_SERVER
andREST_SERVER
variables are now stored at module level and not part of theSettingsHolder
class. The implication is that all networks (main/test/priv) use the same settings. The alternative is moving it into theSettingsHolder
which means we need to update allprotocol.xxx.json
files to include new keys to load from and otherwise have a sane default.What approach would be preferred here (requesting extra opinions 🙏 ): @metachris @jseagrave21 @ThomasLobker @dethos
choice 1: all networks have the same plugin loading settings
choice 2: all network can have individual plugin loading settings as defined in their
protocol.xxx.json
Please check the following, if applicable:
make lint
?make test
?CHANGELOG.rst
? (if not, please do)