-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add DatabaseEmitter
implementation class
#33
Conversation
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.
@AlexPatrie this is fantastic, thank you! Did you get this to work as-is?
One comment -- the Emitter
base class is a type of Step
and gets added to the Composite
just like any other process would, so I think we need to add the schema
method for this to work. Steps/Processes have inputs that they read and then perform the emit in whatever form. Here is an example of how an emitter gets wired into the composite:
process-bigraph/process_bigraph/experiments/minimal_gillespie.py
Lines 212 to 223 in 14d32a1
'emitter': { | |
'_type': 'step', | |
'address': 'local:ram-emitter', | |
'config': { | |
'ports': { | |
'inputs': { | |
'mRNA': 'tree[float]', | |
'interval': 'float'}}}, | |
'wires': { | |
'inputs': { | |
'mRNA': ['mRNA'], | |
'interval': ['event', 'interval']}}}}} |
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.
Good to get all this in here, thanks @AlexPatrie! Will need to be adapted a bit for the new emitter structure (emitters are just steps now) but it's a good start.
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.
This looks good, let's get the core processes out to a separate repo and then this is good to merge. Thanks!
) | ||
|
||
|
||
class CopasiProcess(Process): |
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.
move to core-processes
What does this PR do?:
feat
: ports over and implementsDatabaseEmitter
class fromvivarium-core
, complete with all abstract methods in process-bigraphfeat
: adds utils functions toemitter.py
file interacting with aforementioned object.docs
: adds type annotations wherever possible, complete with doc string representationchore
: refactors testing directory and associated files complete with test model files.feat
: adds example processes toexperiments
library