Define interfaces to processing units
In order to bring together everybody's work we need to define interfaces. These interfaces will provide the entry points to your codes and will be essential when we bring together all our individual coding efforts. These interfaces are methods which will abstract all the complexity of your code. @ds, @fd, @prehn, @nicgar and me discussed what a first abstraction could look like.
We found that the following abstract function could be a good starting point at least for the codes of @nicgar and @prehn. If you can also work based on a cell_id
I suggest that you implement a similar interface. If this does not suit your problem, let's discuss below what an interface could look like in your case.
This could be a starting point:
def cell_changed(cell_id):
# Do your computation
return result
- This method needs to be implemented and documented
- This method also needs to be tested (we can setup tests together). This is important because others will rely on that method.
- It will process data based on a cell_id and may return a result
- If your code entrypoint needs more input parameters in the method call (called the 'signature' of a function) try to stick to the bare minimum for this first attempt to define a common interface.
- If something bad or unexpected happens that will end your computation, raise an exception (checkout this tutorial on exceptions).
If everybody has implemented an interface to their codes, document these entrypoints. This can be done e.g. in the README.md of your repository, or, even better in a dedicated 'docs' folder.
When you have a (probably oversimplifying) interface drop a message in this issue so we can start interfacing your code and building processing pipelines. In case of questions let me know so I can extend this issue.