Skip to content

Commit

Permalink
Merge branch 'master' of github.com:DDMAL/Rodan
Browse files Browse the repository at this point in the history
Conflicts:
	rodan/jobs/neon/module_loader.py
  • Loading branch information
ahankinson committed May 17, 2014
2 parents ac02dd7 + 3753bb0 commit 488241a
Show file tree
Hide file tree
Showing 40 changed files with 326 additions and 177 deletions.
2 changes: 1 addition & 1 deletion client
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
77 changes: 31 additions & 46 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,54 +1,39 @@
Django==1.5.1
Fabric==1.6.0
Markdown==2.3.1
PIL==1.1.7
PyYAML==3.10
South==0.7.6
Spawning==0.9.7
Werkzeug==0.8.3
amqp==1.0.10
Django==1.7b3
Pillow==2.4.0
Werkzeug==0.9.4
amqp==1.4.5
amqplib==1.0.2
anyjson==0.3.3
background-estimation==2.2.0pre2
billiard==2.7.3.23
border-removal==2.2.0pre2
celery==3.0.17
distribute==0.6.35
django-celery==3.0.17
django-celery-transactions==0.1.3
django-extensions==1.1.1
backports.ssl-match-hostname==3.4.0.2
billiard==3.3.0.17
celery==3.1.11
django-extensions==1.3.5
django-filter==0.7
django-guardian==1.1.0.beta
django-picklefield==0.3.0
django-uuidfield==0.4.0
djangorestframework==2.3.6
eventlet==0.12.1
flower==0.4.3
django-guardian==1.2.0
django-picklefield==0.3.1
django-uuidfield==0.5.0
djangorestframework==2.3.13
ecdsa==0.11
eventlet==0.14.0
flower==0.6.0
## FIXME: could not find svn URL in dependency_links for this package:
flup==1.0.3.dev-20110405
gamera==3.4.0
greenlet==0.4.0
ipython==0.13.1
jsonfield==0.9.13
kombu==2.5.8
lxml==3.2.1
lyric-extraction==2.2.0pre2
greenlet==0.4.2
ipython==2.0.0
jsonfield==0.9.20
kombu==3.0.16
lxml==3.3.5
mimeparse==0.1.3
musicstaves==1.3.8
paramiko==1.10.0
psycopg2==2.4.6
py==1.4.13
pycrypto==2.6
pyparsing==1.5.6
pypng==0.0.15
pytest==2.3.4
python-dateutil==2.1
pytz==2013b
paramiko==1.13.0
psycopg2==2.5.2
pybagit==1.5.1
pycrypto==2.6.1
pyparsing==2.0.2
pypng==0.0.16
python-dateutil==2.2
pytz==2014.2
readline==6.2.4.1
rodan-plugins==3.0.1
six==1.3.0
solrpy==0.9.5
ssh==1.8.0
staffline-removal==2.2.0pre2
tornado==3.0
six==1.6.1
solrpy==0.9.6
tornado==3.2.1
wsgiref==0.1.2
5 changes: 5 additions & 0 deletions rodan/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import absolute_import

# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
18 changes: 0 additions & 18 deletions rodan/admin/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
from rodan.models.runjob import RunJob
from rodan.models.job import Job
from rodan.models.result import Result
from rodan.models.classifier import Classifier
from rodan.models.pageglyphs import PageGlyphs
from rodan.models.resultspackage import ResultsPackage
from rodan.models.classifiersetting import ClassifierSetting

# from rodan.models.rodanuser import RodanUser

Expand Down Expand Up @@ -51,22 +48,10 @@ class WorkflowRunAdmin(admin.ModelAdmin):
list_display = ('workflow', 'run', 'created')


class ClassifierAdmin(admin.ModelAdmin):
list_display = ('name',)


class PageGlyphsAdmin(admin.ModelAdmin):
list_display = ('uuid', 'classifier')


class ResultsPackageAdmin(admin.ModelAdmin):
list_display = ('uuid', 'workflow_run', 'created')


class ClassifierSettingAdmin(admin.ModelAdmin):
list_display = ('name', 'uuid', 'fitness', 'producer', 'created')


# class UserProfileInline(admin.StackedInline):
# model = RodanUser
# can_delete = False
Expand All @@ -88,7 +73,4 @@ class ClassifierSettingAdmin(admin.ModelAdmin):
admin.site.register(Job, JobAdmin)
admin.site.register(WorkflowJob, WorkflowJobAdmin)
admin.site.register(Result)
admin.site.register(Classifier, ClassifierAdmin)
admin.site.register(PageGlyphs, PageGlyphsAdmin)
admin.site.register(ResultsPackage, ResultsPackageAdmin)
admin.site.register(ClassifierSetting, ClassifierSettingAdmin)
15 changes: 15 additions & 0 deletions rodan/celery.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from __future__ import absolute_import
import os
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rodan.settings')
import django
django.setup()
from django.conf import settings
from celery import Celery

app = Celery('rodan')

# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
48 changes: 24 additions & 24 deletions rodan/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,129 +25,129 @@
in the `helpers` directory, since this will automatically offload all thumbnailing to Celery as well.
"""

print "Loading Rodan Jobs"
print("Loading Rodan Jobs")

try:
from rodan.jobs.gamera import binarization
binarization.load_module()
except ImportError as e:
print "Trouble loading the Gamera binarization plugins. Is Gamera installed?"
print("Trouble loading the Gamera binarization plugins. Is Gamera installed?")

try:
from rodan.jobs.gamera import threshold
threshold.load_module()
except ImportError as e:
print "Trouble loading the Gamera threshold plugins. Is Gamera installed?"
print("Trouble loading the Gamera threshold plugins. Is Gamera installed?")

try:
from rodan.jobs.gamera import image_conversion
image_conversion.load_module()
except ImportError as e:
print "Trouble loading the Gamera image_conversion plugins. Is Gamera installed?"
print("Trouble loading the Gamera image_conversion plugins. Is Gamera installed?")

try:
from rodan.jobs.gamera import transformation
transformation.load_module()
except ImportError as e:
print "Trouble loading the Gamera transformation plugins. Is Gamera installed?"
print("Trouble loading the Gamera transformation plugins. Is Gamera installed?")

try:
from rodan.jobs.gamera.toolkits import rodan_plugins
rodan_plugins.load_module()
except ImportError as e:
print "The Rodan Plugins have not been installed. Skipping."
print("The Rodan Plugins have not been installed. Skipping.")

try:
from rodan.jobs.gamera.toolkits import border_removal
border_removal.load_module()
except ImportError as e:
print "No Border Removal Toolkit Installed. Skipping."
print("No Border Removal Toolkit Installed. Skipping.")

try:
from rodan.jobs.gamera.toolkits import staff_removal
staff_removal.load_module()
except ImportError as e:
print "No Staff Removal Toolkit Installed. Skipping."
print("No Staff Removal Toolkit Installed. Skipping.")

try:
from rodan.jobs.gamera.toolkits import background_estimation
background_estimation.load_module()
except ImportError as e:
print "No Background Estimation Toolkit Installed. Skipping."
print("No Background Estimation Toolkit Installed. Skipping.")

try:
from rodan.jobs.gamera.toolkits import lyric_extraction
lyric_extraction.load_module()
except ImportError as e:
print "No Lyric Extraction Toolkit Installed. Skipping."
print("No Lyric Extraction Toolkit Installed. Skipping.")

try:
from rodan.jobs.gamera.toolkits import musicstaves
musicstaves.load_module()
except ImportError as e:
print "No Music Staves Toolkit Installed. Skipping."
print("No Music Staves Toolkit Installed. Skipping.")

##########

try:
from rodan.jobs.diva import to_jpeg2000
to_jpeg2000.load_module()
except ImportError as e:
print "No Diva JPEG2000 converter Installed. Skipping. ", e
print("No Diva JPEG2000 converter Installed. Skipping. {0}".format(e))

try:
from rodan.jobs.gamera.custom.poly_mask import module_loader
module_loader.load_module()
except ImportError as e:
print "Custom Poly Mask job not installed. Skipping", e
print("Custom Poly Mask job not installed. Skipping".format(e))

try:
from rodan.jobs.gamera.custom.border_removal import module_loader
module_loader.load_module()
except ImportError as e:
print "Custom Border Removal job not installed. Skipping", e
print("Custom Border Removal job not installed. Skipping. {0}".format(e))

try:
from rodan.jobs.gamera.custom.segmentation import module_loader
module_loader.load_module()
except ImportError as e:
print "Custom Segmentation job not installed. Skipping", e
print("Custom Segmentation job not installed. Skipping. {0}".format(e))

try:
from rodan.jobs.gamera.custom.neume_classification import module_loader
module_loader.load_module()
except ImportError as e:
print "Custom Classification job not installed. Skipping", e
print("Custom Classification job not installed. Skipping. {0}".format(e))

try:
from rodan.jobs.gamera.custom.staff_removal import module_loader
module_loader.load_module()
except ImportError as e:
print "Custom RT Staff Removal job not installed. Skipping", e
print("Custom RT Staff Removal job not installed. Skipping. {0}".format(e))

try:
from rodan.jobs.gamera.custom.pitch_finding import module_loader
module_loader.load_module()
except ImportError as e:
print "Custom Pitch Finding job not installed. Skipping", e
print("Custom Pitch Finding job not installed. Skipping. {0}".format(e))

try:
from rodan.jobs.neon import module_loader
module_loader.load_module()
except ImportError as e:
print "Custom Pitch Correction job not installed. Skipping", e
print("Custom Pitch Correction job not installed. Skipping. {0}".format(e))


## Periodic Tasks
try:
from rodan.jobs.periodic_tasks.classifier_ga_optimization import OptimizeAllClassifiersTask
from rodan.jobs.gamera.custom.pixel_segment import module_loader
module_loader.load_module()
except ImportError as e:
print "Classifier optimization periodic task not installed. Skipping", e
print("Custom Pixel Segment job not installed. Skipping. {0}".format(e))


#Development
try:
from rodan.jobs.util.devdummyjobs import load_wfjobuuid
load_wfjobuuid()
except ImportError as e:
print "DEV: The dummy job could not be loaded properly. Skipping"
print("DEV: The dummy job could not be loaded properly. Skipping")
print e
2 changes: 1 addition & 1 deletion rodan/jobs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from rodan.models.runjob import RunJob, RunJobStatus
from rodan.jobs.util import taskutil

class RodanJob(Task):

class RodanJob(Task):
def run_task(self, result_id, runjob_id, *args, **kwargs):
"""
This is where all the execution code of a job goes.
Expand Down
4 changes: 2 additions & 2 deletions rodan/jobs/gamera/custom/border_removal/celery_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from rodan.jobs.gamera import argconvert
from gamera.core import init_gamera
from gamera.toolkits.border_removal.plugins.border_removal import border_removal
import Image
import ImageDraw
from PIL import Image
from PIL import ImageDraw
from gamera.plugins.pil_io import from_pil


Expand Down
Empty file.
Loading

0 comments on commit 488241a

Please sign in to comment.