|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# Django settings for a speedcenter project. |
| 3 | +import os |
| 4 | +import os.path |
| 5 | +import sys |
| 6 | + |
| 7 | +sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) |
| 8 | + |
| 9 | +DEBUG = True |
| 10 | +TEMPLATE_DEBUG = DEBUG |
| 11 | + |
| 12 | +BASEDIR = os.path.dirname(__file__) |
| 13 | + |
| 14 | +#: The directory which should contain checked out source repositories: |
| 15 | +REPOSITORY_BASE_PATH = os.path.join(BASEDIR, "repos") |
| 16 | + |
| 17 | +ADMINS = ( |
| 18 | + # ('Your Name', 'your_email@domain.com'), |
| 19 | +) |
| 20 | + |
| 21 | +MANAGERS = ADMINS |
| 22 | +DATABASES = { |
| 23 | + 'default': { |
| 24 | + 'ENGINE': 'django.db.backends.sqlite3', |
| 25 | + 'NAME': os.path.join(BASEDIR, 'data.db'), |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +# Local time zone for this installation. Choices can be found here: |
| 30 | +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
| 31 | +# although not all choices may be available on all operating systems. |
| 32 | +# If running in a Windows environment this must be set to the same as your |
| 33 | +# system time zone. |
| 34 | +TIME_ZONE = 'America/Chicago' |
| 35 | + |
| 36 | +# Language code for this installation. All choices can be found here: |
| 37 | +# http://www.i18nguy.com/unicode/language-identifiers.html |
| 38 | +LANGUAGE_CODE = 'en-us' |
| 39 | + |
| 40 | +SITE_ID = 1 |
| 41 | + |
| 42 | +# If you set this to False, Django will make some optimizations so as not |
| 43 | +# to load the internationalization machinery. |
| 44 | +USE_I18N = False |
| 45 | + |
| 46 | +# Absolute path to the directory that holds media. |
| 47 | +# Example: "/home/media/media.lawrence.com/" |
| 48 | +MEDIA_ROOT = os.path.join(BASEDIR, "media") |
| 49 | + |
| 50 | +# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
| 51 | +# trailing slash if there is a path component (optional in other cases). |
| 52 | +# Examples: "http://media.lawrence.com", "http://example.com/media/" |
| 53 | +MEDIA_URL = '/media/' |
| 54 | + |
| 55 | +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
| 56 | +# trailing slash. |
| 57 | +# Examples: "http://foo.com/media/", "/media/". |
| 58 | +ADMIN_MEDIA_PREFIX = '/static/admin/' |
| 59 | + |
| 60 | +# Make this unique, and don't share it with anybody. |
| 61 | +SECRET_KEY = 'as%n_m#)^vee2pe91^^@c))sl7^c6t-9r8n)_69%)2yt+(la2&' |
| 62 | + |
| 63 | +# List of callables that know how to import templates from various sources. |
| 64 | +TEMPLATE_LOADERS = ( |
| 65 | + 'django.template.loaders.filesystem.Loader', |
| 66 | + 'django.template.loaders.app_directories.Loader', |
| 67 | + # 'django.template.loaders.eggs.load_template_source', |
| 68 | +) |
| 69 | + |
| 70 | +MIDDLEWARE_CLASSES = ( |
| 71 | + 'django.middleware.common.CommonMiddleware', |
| 72 | + 'django.contrib.sessions.middleware.SessionMiddleware', |
| 73 | + 'django.contrib.auth.middleware.AuthenticationMiddleware', |
| 74 | +) |
| 75 | + |
| 76 | +if DEBUG: |
| 77 | + import traceback |
| 78 | + import logging |
| 79 | + |
| 80 | + # Define a class that logs unhandled errors |
| 81 | + class LogUncatchedErrors: |
| 82 | + def process_exception(self, request, exception): |
| 83 | + logging.error("Unhandled Exception on request for %s\n%s" % |
| 84 | + (request.build_absolute_uri(), |
| 85 | + traceback.format_exc())) |
| 86 | + # And add it to the middleware classes |
| 87 | + MIDDLEWARE_CLASSES += ('settings.LogUncatchedErrors',) |
| 88 | + |
| 89 | + # set shown level of logging output to debug |
| 90 | + logging.basicConfig(level=logging.DEBUG) |
| 91 | + |
| 92 | + |
| 93 | +ROOT_URLCONF = 'example.urls' |
| 94 | + |
| 95 | +TEMPLATE_DIRS = ( |
| 96 | + os.path.join(os.path.dirname(__file__), 'templates'), |
| 97 | +) |
| 98 | + |
| 99 | +TEMPLATE_CONTEXT_PROCESSORS = ( |
| 100 | + 'django.contrib.auth.context_processors.auth', |
| 101 | + 'django.contrib.messages.context_processors.messages', |
| 102 | + 'django.core.context_processors.debug', |
| 103 | + 'django.core.context_processors.i18n', |
| 104 | + 'django.core.context_processors.media', |
| 105 | + 'django.core.context_processors.static', |
| 106 | + 'django.core.context_processors.request', |
| 107 | +) |
| 108 | + |
| 109 | +INSTALLED_APPS = ( |
| 110 | + 'django.contrib.auth', |
| 111 | + 'django.contrib.contenttypes', |
| 112 | + 'django.contrib.sessions', |
| 113 | + #'django.contrib.sites', |
| 114 | + 'django.contrib.admin', |
| 115 | + 'django.contrib.staticfiles', |
| 116 | + 'codespeed', |
| 117 | + 'south' |
| 118 | +) |
| 119 | + |
| 120 | +STATIC_URL = '/static/' |
| 121 | + |
| 122 | +STATIC_ROOT = os.path.join(BASEDIR, "sitestatic") |
| 123 | + |
| 124 | +# Codespeed settings that can be overwritten here. |
| 125 | +## General default options ## |
| 126 | +WEBSITE_NAME = "PyPy Speed Center" # This name will be used in the reports RSS feed |
| 127 | + |
| 128 | +#DEF_ENVIRONMENT = None #Name of the environment which should be selected as default |
| 129 | + |
| 130 | + |
| 131 | +DEF_BASELINE = {'executable': 'cpython', 'revision': '101'} # Which executable + revision should be default as a baseline |
| 132 | + # Given as the name of the executable and commitid of the revision |
| 133 | + # Example: defaultbaseline = {'executable': 'myexe', 'revision': '21'} |
| 134 | + |
| 135 | +#TREND = 10 # Default value for the depth of the trend |
| 136 | + # Used by reports for the latest runs and changes view |
| 137 | + |
| 138 | +# Threshold that determines when a performance change over the last result is significant |
| 139 | +CHANGE_THRESHOLD = 5.0 |
| 140 | + |
| 141 | +# Threshold that determines when a performance change |
| 142 | +# over a number of revisions is significant |
| 143 | +TREND_THRESHOLD = 6.0 |
| 144 | + |
| 145 | +## Changes view options ## |
| 146 | +#DEF_EXECUTABLE = None # Executable that should be chosen as default in the changes view |
| 147 | + # Given as the name of the executable. |
| 148 | + # Example: defaultexecutable = "myexe" |
| 149 | + |
| 150 | +## Timeline view options ## |
| 151 | +#DEF_BENCHMARK = "grid" # Default selected benchmark. Possible values: |
| 152 | + # "grid": will show the grid of plots |
| 153 | + # "show_none": will just show a text message |
| 154 | + # "mybench": will select benchmark "mybench" |
| 155 | + |
| 156 | +#TIMELINE_BRANCHES = True # NOTE: Only the default branch is currently shown |
| 157 | + # Get timeline results for specific branches |
| 158 | + # Set to False if you want timeline plots and results only for trunk. |
| 159 | + |
| 160 | +## Comparison view options ## |
| 161 | +#CHART_TYPE = 'normal bars' # The options are 'normal bars', 'stacked bars' and 'relative bars' |
| 162 | + |
| 163 | +NORMALIZATION = True # True will enable normalization as the default selection |
| 164 | + # in the Comparison view. The default normalization can be |
| 165 | + # chosen in the defaultbaseline setting |
| 166 | + |
| 167 | +#CHART_ORIENTATION = 'vertical' # 'vertical' or 'horizontal can be chosen as |
| 168 | + # default chart orientation |
| 169 | + |
| 170 | +COMP_EXECUTABLES = [('pypy-c-jit', 'L'), ('pypy-c', 'L')] # Which executable + revision should be checked as default |
| 171 | + # Given as a list of tuples containing the |
| 172 | + # name of an executable + commitid of a revision |
| 173 | + # An 'L' denotes the last revision |
| 174 | + # Example: |
| 175 | + # COMP_EXECUTABLES = [ |
| 176 | + # ('myexe', '21df2423ra'), |
| 177 | + # ('myexe', 'L'),] |
| 178 | + |
| 179 | +from .local_settings import * |
| 180 | + |
0 commit comments