source: TI03-DataExtractor/branches/old_stuff/dx/config.py @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx/config.py@793
Revision 793, 6.7 KB checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

  • Property svn:executable set to *
Line 
1"""
2config.py
3=========
4
5Holds the main configuration details that must be set up in order
6for a version of dx to run on a new machine.
7
8Each option below is documented to guide the user through setting
9up the interface.
10
11All these global variables are used in various parts of the dx
12package. For consistency they are all CAPITALISED.
13
14"""
15
16# Import python modules
17import os   # used to combine paths in variables below
18
19# DEBUG:
20# Set to 1 if you want to be in DEBUG mode. This reports CGI errors
21# directly to the browser.
22DEBUG=1
23
24# RESTRICTED_DATA:
25# Do you want security on (1) or off (0)?
26# Note that there is no in-built security implementation in
27# dx, just a set of hooks under which your security system
28# can be called.
29RESTRICTED_DATA=0
30
31# PACKAGE_NAME:
32# This will appear as the main title displayed
33# on the web interface.
34PACKAGE_NAME="Data Extractor"
35
36# LOCAL_RULES:
37# Do you want local rules switched on or off (1 or 0)?
38# This will apply to any parts of the code where local
39# modifications have been made and wrapped in an if clause.
40LOCAL_RULES=0
41
42# REGISTRATION_PAGE:
43# For restricted datasets, this is the web page from which users
44# can find registration details.
45REGISTRATION_PAGE="http://badc.nerc.ac.uk/data/list_all_datasets.html?source=home"
46
47# REQUEST_SIZE_LIMIT:
48# A limit in the number of Megabytes for any user requests.
49REQUEST_SIZE_LIMIT=100
50
51# TIMING_SCALE_FACTOR:
52# Since every system will run at a different speed this scale
53# factor can be adjusted to improve the estimated duration of
54# requests.
55TIMING_SCALE_FACTOR=0.001
56
57# ADMIN_MAIL_ADDRESS:
58# The e-mail address of the adminstrator for this version. 
59ADMIN_MAIL_ADDRESS="badc@rl.ac.uk"
60
61# LOCAL_MAIL_HOST:
62# The outgoing mail box address for the host machine.
63# On many systems you can just use "localhost".
64LOCAL_MAIL_HOST="outbox.rl.ac.uk"
65
66# ADMIN_NOTIFICATION:
67# Set this to 1 if you want to be notified by e-mail when an error has
68# occurred.
69ADMIN_NOTIFICATION=0
70
71# CGI_NAME:
72# The full path of the main CGI script on your system.
73# "http://yourdomain/cgi-bin/dxui.py" is the most likely but
74# you are free to rename the files if you wish.
75CGI_NAME="http://localhost/cgi-bin/dxui-0.1.1.py"
76
77# LOCAL_CGI_NAME:
78# The local path of the CGI script on your system.
79# "/srv/www/cgi-bin/dxui.py" is likely on a SUSE system but
80# you are free to rename this as you wish.
81LOCAL_CGI_NAME="/srv/www/cgi-bin/dxui-0.1.1.py"
82
83# VISUALISOR_NAME:
84# The URL of the Visualisor package that the dx connects to
85# once files have been produced.
86VISUALISOR_NAME="/cgi-bin/splatui-0.1.1.py"
87
88# LOGO_DIR:
89# Location of logos for the header section, this should be a
90# full or relative URL and NOT a directory path on your machine.
91LOGO_DIR="/dx_extra/logos"
92
93# LEFT_LOGO:
94# Name of logo file for left hand side of header.
95LEFT_LOGO="dx_logo.jpg"
96
97# RIGHT_LOGO:
98# Name of logo file for right hand side of header.
99RIGHT_LOGO="dx_logo.jpg"
100
101# BASEDIR:
102# Full path to the main package location.
103# "/usr/local/dx" is recommended but you can change it as
104# you wish.
105BASEDIR="/usr/local/dx_wv"
106
107# OUTPUT_DIR
108# The full path on the local machine of the output directory.
109OUTPUT_DIR="/srv/www/htdocs/output"
110
111# HTTP_OUTPUT_DIR:
112# The URL address of the OUTPUT_DIR
113HTTP_OUTPUT_DIR="http://localhost/output"
114
115# USER_HOMEDIR:
116# Required home directory for CDAT to run.
117# NOTE: This may not be needed for non-graphical applications.
118# However, if you do need it you must copy/create a
119# PCMDI_GRAPHICS sub-directory within this directory in order
120# for CDAT to run.
121USER_HOMEDIR="/var/lib/wwwrun"
122
123# REQUEST_DIR:
124# Location of persistent request objects saved during a dx session.
125# These are saved as Python module
126REQUEST_DIR=os.path.join(BASEDIR, "requests")
127
128# HTML_DIR:
129# Location of the HTML header and footer files in the dx
130HTML_DIR=os.path.join(BASEDIR, "html")
131
132# EXTRAS_DIR:
133# Location of the map_applet and css file directories
134EXTRAS_DIR="/dx_extra"
135
136# MAP_APPLET:
137# URL of map applet HTML page
138MAP_APPLET="/dx_extra/LiveMap_30/extractorMap.html"
139
140# OUTPUT_FILE_USER:
141# Unix owner (user) for output files
142OUTPUT_FILE_USER="wwwrun"
143
144# OUTPUT_FORMATS:
145# List of available output formats.
146OUTPUT_FORMATS=["NetCDF"]
147
148# OUTPUT_FILE_GROUP:
149# Unix group for output files
150OUTPUT_FILE_GROUP="users"
151
152# OUTPUT_DIR_PERMISSION:
153# Unix permission for access to output directories
154OUTPUT_DIR_PERMISSION=0750
155
156# OUTPUT_FILE_PERMISSION:
157# Unix permission for access to output files
158OUTPUT_FILE_PERMISSION=0640
159
160# LOCAL_PYTHONPATH:
161# Python list of required directories that need to be added
162# to the PYTHONPATH environment variable to access all parts of
163# CDAT and NUMERIC packages.
164LOCAL_PYTHONPATH=['/usr/local/badcdat/lib', '/usr/local/badcdat/lib/python', '/home/tornado/internal/badc/software/pythonlib/badc', '/usr/local/cdat/lib/python2.3', '/usr/local/cdat/lib/python2.3/site-packages', '/usr/local/cdat/lib/python2.3/site-packages/Numeric']
165
166# CDAT_BIN_PATH:
167# The bin directory that holds the cdat executable on your system.
168CDAT_BIN_PATH="/usr/local/cdat/bin"
169
170# MESSAGE_TO_USERS:
171# A message that will be written at the top of all web pages underneath
172# the main header.
173MESSAGE_TO_USERS="""This is a test version of the %s so it may contain bugs. Please contact <A HREF="mailto:%s">%s</A> if an error occurs so that we can improve this service.""" % (PACKAGE_NAME, ADMIN_MAIL_ADDRESS, ADMIN_MAIL_ADDRESS)
174
175# CF_METADATA_GLOBAL_ATTRIBUTES
176# Define a set of core Climate and Forecasts (CF) Metadata Standards
177# for NetCDF compliant global file attributes to put in all files.
178CF_METADATA_GLOBAL_ATTRIBUTES={"comments":"Created by test data extractor."}
179
180# DATASET_GROUPS:
181# Groupings of datasets. These tend to be logically grouped but may
182# reflect a group of datasets that share the same access control
183# conditions. This is a python dictionary with each key/value pair as:
184# {<id>:<security_group>}
185DATASET_GROUPS={"Test Data Group 1":None, "Test Data Group 2":None,
186                "Test Data Group 3":None}
187
188# DATASETS:
189# These are subsets of dataset groups and are typically a set of variables
190# defined against an identical domain. In CDAT terms there will typically
191# be one dataset per CDML file.
192# This is a python dictionary with each key as the dataset group id with
193# a tuple of tuples as the value. Each sub-tuple represents one dataset in
194# the format:
195# (<long_name>, <metadata_file>, <local_code>) ## <local_code> is not used!
196# Obviously at some point this will all be done in XML.
197DATASETS={"Test Data Group 1":(("Test Dataset 1", 
198                                os.path.join(BASEDIR, "testdata", "testdata1.xml"),
199                                "dataset1-unused-code"),),
200          "Test Data Group 2":(("Test Dataset 2", 
201                                os.path.join(BASEDIR, "testdata", "testdata2.xml"),
202                                "dataset2-unused-code"),),
203          "Test Data Group 3":(("Test Dataset 3", 
204                                os.path.join(BASEDIR, "testdata", "testdata3.xml"),
205                                "dataset3-unused-code"),)} 
206
Note: See TracBrowser for help on using the repository browser.