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
Decouple job and mixins #624
Conversation
Now all of the calculators can start retrieving parameters self.job, instead of self. This is a good first step towards decouple the job and the calculator.
…rom the mixin/calculators Things are really messy right now I'll need at least 2 more branches: 1 for cleanup and 1 for implementing proper calculator structure
pylint pick Running pylint on larsbutler/decouple-job-and-mixins.. !! larsbutler/decouple-job-and-mixins adds 30 pylint issues.. ``--- /tmp/pl.a 2012-01-04 17:39:02.000000000 +0100
pep8 pick Running pep8 on larsbutler/decouple-job-and-mixins..
|
Changes have to be done accordingly to celeryconfig.py
|
I'm going to ignore the pep8 warnings in openquake/output/template.py; it's just a bunch of text for an html template (it's not code). Is that okay with you? |
yep |
Cool. Regarding the celeryd import issue, I'm not able to reproduce this error.. but I see the problem. Celery is importing stuff that isn't there anymore so I will update the config. I'll submit an update in just a second. |
Lars, maybe you have an old celeryconfig.pyc or tasks.pyc ? try:
|
This reverts commit aad949c.
More pylint fun: |
pep8:
|
pyflakes:
|
Also:
|
Typo in openquake/hazard/init.py
|
LGTM |
[r=al-maisan] [f=908148] Decouple job and mixins
Implements the Shahjouei & Pezeshk (2016) GMM
This branch addresses: https://bugs.launchpad.net/openquake/+bug/908148
The major change here is that calculator Mixin classes must be instantiated with a Job object. The Job and the Mixin are no longer mashed together at runtime into a Frankenobject; instead, we use a silly little pattern called 'composition'.
There is still a bit of a mess here; the mixins still exist and some things are not quite how we would like them to be. This branch, however, is a big step towards our goal.
For a few of the next steps in Operation: Destroy the Mixins, see:
https://bugs.launchpad.net/openquake/+bug/909663
https://bugs.launchpad.net/openquake/+bug/907243
https://github.com/gem/openquake/pull/622 and https://github.com/gem/openquake/pull/623 should land first.