Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit c486d6bb authored by Janez K's avatar Janez K
Browse files

merge

parents a962c358 8de13914
# Global settings for mothra project.
import django.conf.global_settings as DEFAULT_SETTINGS
import os
PROJECT_DIR = os.path.dirname(__file__)
PUBLIC_DIR = os.path.join(PROJECT_DIR, 'public')
BACKUP_DIR = os.path.join(PROJECT_DIR, 'backup')
DEBUG = False
TEMPLATE_DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'UTC'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(PUBLIC_DIR, 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/media/'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(PUBLIC_DIR, 'static')
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_DIR, 'static'),
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware', # must be first
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware', # must be last
)
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_SECONDS = 10
CACHE_MIDDLEWARE_KEY_PREFIX = 'mothra'
ROOT_URLCONF = 'mothra.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'mothra.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_DIR, 'templates'),
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.request',
)
FIXTURE_DIRS = (
os.path.join(PROJECT_DIR, 'fixtures'),
)
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
try:
LOCAL_SETTINGS
except NameError:
try:
from local_settings import *
except ImportError:
pass
if USE_CONCURRENCY:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'south',
'workflows',
'workflows.latino',
'workflows.decision_support',
'workflows.bioinformatics',
'workflows.subgroup_discovery',
'workflows.nlp',
'workflows.ilp',
'website',
'signuplogin',
'django_extensions',
'django.contrib.humanize',
'orderable_inlines',
'djcelery',
)
else:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'south',
'workflows',
'workflows.latino',
'workflows.decision_support',
'workflows.bioinformatics',
'workflows.subgroup_discovery',
'workflows.nlp',
'workflows.ilp',
'workflows.base',
'website',
'signuplogin',
'django_extensions',
'django.contrib.humanize',
'orderable_inlines',
'streams',
)
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS
TEMPLATES_FOLDER = os.path.join(PROJECT_DIR, 'templates')
PROJECT_FOLDER = PROJECT_DIR
TEMPLATE_DIRS = (TEMPLATES_FOLDER,)
AUTH_PROFILE_MODULE = 'workflows.UserProfile'
LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/'
STATIC_DOC_ROOT = os.path.join(os.getcwd(), 'mothra/public/media')
# Global settings for mothra project.
import django.conf.global_settings as DEFAULT_SETTINGS
import os
PROJECT_DIR = os.path.dirname(__file__)
PUBLIC_DIR = os.path.join(PROJECT_DIR, 'public')
BACKUP_DIR = os.path.join(PROJECT_DIR, 'backup')
DEBUG = False
TEMPLATE_DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'UTC'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(PUBLIC_DIR, 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/media/'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(PUBLIC_DIR, 'static')
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_DIR, 'static'),
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware', # must be first
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware', # must be last
)
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_SECONDS = 10
CACHE_MIDDLEWARE_KEY_PREFIX = 'mothra'
ROOT_URLCONF = 'mothra.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'mothra.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_DIR, 'templates'),
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.request',
)
FIXTURE_DIRS = (
os.path.join(PROJECT_DIR, 'fixtures'),
)
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
try:
LOCAL_SETTINGS
except NameError:
try:
from local_settings import *
except ImportError:
pass
INSTALLED_APPS_DEFAULT = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'south',
'website',
'signuplogin',
'django_extensions',
'django.contrib.humanize',
'orderable_inlines',
'workflows',
)
INSTALLED_APPS_CONCUR = (
'djcelery',
) if USE_CONCURRENCY else (
'streams',
)
INSTALLED_APPS_WORKFLOWS_SUB = (
'workflows.base',
'workflows.latino',
'workflows.decision_support',
'workflows.bioinformatics',
'workflows.subgroup_discovery',
'workflows.nlp',
'workflows.nl_toolkit',
'workflows.ilp',
#WORKFLOWS_SUBAPP_PLACEHOLDER
)
INSTALLED_APPS = \
INSTALLED_APPS_DEFAULT +\
INSTALLED_APPS_CONCUR +\
INSTALLED_APPS_WORKFLOWS_SUB
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS
TEMPLATES_FOLDER = os.path.join(PROJECT_DIR, 'templates')
PROJECT_FOLDER = PROJECT_DIR
TEMPLATE_DIRS = (TEMPLATES_FOLDER,)
AUTH_PROFILE_MODULE = 'workflows.UserProfile'
LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/'
STATIC_DOC_ROOT = os.path.join(os.getcwd(), 'mothra/public/media')
\ No newline at end of file
[\n]
\ No newline at end of file
......@@ -5,6 +5,7 @@ Bioinformatics interaction viewes.
'''
from django.shortcuts import render
def insilico_search(request, input_dict, output_dict, widget):
#TODOl
return render(request, 'interactions/insilico_search.html', {'widget':widget})
def feature_selection(request, input_dict, output_dict, widget):
#TODO
return render(request, 'interactions/feature_selection.html', {'widget':widget})
......@@ -3,9 +3,25 @@ Bioinformatics library.
@author: Anze Vavpetic <anze.vavpetic@ijs.si>
'''
def insilico_search(input_dict):
#
# Visualization widgets:
#
def rank_plotter(input_dict):
return input_dict
def segs_rule_browser(input_dict):
return input_dict
#
# Interactions widgets:
#
def feature_selection_finished(postdata, input_dict, output_dict):
# TODO
return output_dict
def insilico_finished(input_dict):
#TODO
return input_dict
\ No newline at end of file
#
# Regular widgets:
#
def segs(input_dict):
# TODO
output_dict = {}
return output_dict
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -6,6 +6,6 @@ package_root = os.path.dirname(__file__)
package_statics = os.path.join(os.path.dirname(__file__), 'static', package_name)
package_bin = os.path.join(package_root, 'bin')
auto_update_db = True
auto_update_db = False
create_backups = True
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('',
url(r'^get-new-feature-selection-scores/widget(?P<widget_id>[0-9]+)/(?P<method>\w+)/$', 'workflows.bioinformatics.views.get_new_feature_selection_scores',
name='get new feature selection scores'),
)
\ No newline at end of file
# helperji, context stvari
from django.shortcuts import render, get_object_or_404, redirect
from django.http import Http404, HttpResponse
# modeli
from workflows.models import *
# auth fore
from django.contrib.auth.decorators import login_required
# Orange bioinformatics differential expression
# from orngBioinformatics.obiExpression import *
# SCORE_METHODS = [("fold change", ExpressionSignificance_FoldChange, twoTailTest, True),
# ("log2 fold change", ExpressionSignificance_Log2FoldChange, twoTailTest, True),
# ("t-test", ExpressionSignificance_TTest_T, twoTailTest, True),
# ("t-test p-value", ExpressionSignificance_TTest_PValue, oneTailTestLow, True),
# ("anova", ExpressionSignificance_ANOVA_F, oneTailTestHi, False),
# ("anova p-value", ExpressionSignificance_ANOVA_PValue, oneTailTestLow, False),
# ("signal to noise ratio", ExpressionSignificance_SignalToNoise, twoTailTest, True),
# ("info gain", ExpressionSignificance_Info, oneTailTestHi, True),
# ("chi-square", ExpressionSignificance_ChiSquare, oneTailTestHi, True),
# ("mann-whitney", ExpressionSignigicance_MannWhitneyu_U, oneTailTestLow, True),
# ("AREA (timeseries)", ExpressionSignificance_AREA, oneTailTestHi, False),
# ("FC (timeseries)", ExpressionSignificance_FCts, oneTailTestHi, False)]
@login_required
def get_new_feature_selection_scores(request, widget_id, method = 0):
w = get_object_or_404(Widget, pk=widget_id)
if w.workflow.user == request.user:
data = w.inputs.all()[0]
_, score_method, _, twotailtest = SCORE_METHODS[method]
return HttpResponse(data, mimetype='text/json')
else:
return HttpResponse(status=400)
'''
Bioinformatics visualization viewes.
@author: Anze Vavpetic <anze.vavpetic@ijs.si>
'''
from django.shortcuts import render
def rank_plotter(request, input_dict, output_dict, widget):
#TODO
return render(request, 'interactions/rank_plotter.html', {'widget':widget})
def segs_rule_browser(request, input_dict, output_dict, widget):
#TODO
return render(request, 'interactions/segs_rule_browser.html', {'widget':widget})
[
{
"pk": 51,
"model": "workflows.category",
"fields": {
"uid": "",
"parent": null,
"workflow": null,
"user": null,
"order": 1,
"name": "Decision Support"
}
},
{
"pk": 291,
"model": "workflows.abstractwidget",
"fields": {
"category": 51,
"treeview_image": "",
"name": "Decision support visualization",
"is_streaming": false,
"uid": "",
"interaction_view": "",
"image": "",
"package": "decision_support",
"static_image": "",
"post_interact_action": "",
"user": null,
"visualization_view": "ds_charts_viewer",
"action": "ds_charts",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"has_progress_bar": false,
"order": 1,
"description": ""
}
},
{
"pk": 979,
"model": "workflows.abstractinput",
"fields": {
"widget": 291,
"name": "DS Model",
"short_name": "mdl",
"uid": "",
"default": "",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "model",
"parameter": false,
"order": 1,
"description": "Decision Support model"
}
},
{
"pk": 228,
"model": "workflows.abstractwidget",
"fields": {
"category": 51,
"treeview_image": "",