Merge lp:~elachuni/ubuntu-webcatalog/configglue-1.0 into lp:ubuntu-webcatalog

Proposed by Anthony Lenton
Status: Merged
Approved by: Anthony Lenton
Approved revision: 95
Merged at revision: 105
Proposed branch: lp:~elachuni/ubuntu-webcatalog/configglue-1.0
Merge into: lp:ubuntu-webcatalog
Diff against target: 230 lines (+88/-84)
4 files modified
django_project/config/main.cfg (+21/-4)
django_project/settings.py (+5/-13)
setup.py (+2/-2)
src/webcatalog/schema.py (+60/-65)
To merge this branch: bzr merge lp:~elachuni/ubuntu-webcatalog/configglue-1.0
Reviewer Review Type Date Requested Status
Danny Tamez (community) Approve
Review via email: mp+99612@code.launchpad.net

Commit message

Migrated to configglue 1.0.

Description of the change

The last of our services that is missing to migrate to configglue 1.0.
The changes in this branch are along the same lines as thos applied for rnr-server on
https://code.launchpad.net/~elachuni/rnr-server/configglue-1.0/+merge/99427
or ubuntu-recommender on
https://code.launchpad.net/~elachuni/ubuntu-recommender/latest-configglue/+merge/95081

To post a comment you must log in.
Revision history for this message
Danny Tamez (zematynnad) wrote :

Looks great Anthony.

review: Approve
Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

Attempt to merge into lp:ubuntu-webcatalog failed due to conflicts:

text conflict in src/webcatalog/schema.py

Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'django_project/config/main.cfg'
--- django_project/config/main.cfg 2012-03-07 22:57:41 +0000
+++ django_project/config/main.cfg 2012-04-18 17:21:19 +0000
@@ -67,11 +67,28 @@
67name = webcatalog.db67name = webcatalog.db
6868
69[django_logging]69[django_logging]
70loggers = django_loggers
71version = 170version = 1
72disable_existing_loggers = False71disable_existing_loggers = True
7372handlers = django_logging_handlers
74[django_loggers]73loggers = django_logging_loggers
74root = django_logging_root
75
76[django_logging_root]
77level = WARNING
78
79[django_logging_loggers]
80django = django_logger
81
82[django_logger]
83handlers = null
84level = WARNING
85
86[django_logging_handlers]
87null = django_null_logging_handler
88
89[django_null_logging_handler]
90level = WARNING
91class = django.utils.log.NullHandler
7592
76[openid]93[openid]
77openid_sso_server_url = https://login.staging.ubuntu.com94openid_sso_server_url = https://login.staging.ubuntu.com
7895
=== modified file 'django_project/settings.py'
--- django_project/settings.py 2011-06-18 22:24:08 +0000
+++ django_project/settings.py 2012-04-18 17:21:19 +0000
@@ -2,23 +2,15 @@
22
3import os.path3import os.path
44
5from configglue.pyschema import SchemaConfigParser5from django_configglue.utils import configglue
6from django_configglue.utils import update_settings
7
8from webcatalog.schema import WebCatalogSchema6from webcatalog.schema import WebCatalogSchema
97
108
11# get absolute path for config files9# get absolute path for config files
12current_dir = os.path.dirname(os.path.abspath(__file__))10current_dir = os.path.dirname(os.path.abspath(__file__))
13config_files = map(lambda x: os.path.join(current_dir, x),11config_files = [path for path in map(lambda x: os.path.join(current_dir, x),
14 ['config/main.cfg', '../../local_config/local.cfg',12 ['config/main.cfg', '../../local_config/local.cfg',
15 'local.cfg'])13 'local.cfg'])
1614 if os.path.exists(path)]
17# parse config files15
18parser = SchemaConfigParser(WebCatalogSchema())16configglue(WebCatalogSchema, config_files, __name__)
19parser.read(config_files)
20update_settings(parser, locals())
21
22# keep parser reference
23__CONFIGGLUE_PARSER__ = parser
24
25\ No newline at end of file17\ No newline at end of file
2618
=== modified file 'setup.py'
--- setup.py 2012-04-17 04:44:33 +0000
+++ setup.py 2012-04-18 17:21:19 +0000
@@ -36,8 +36,8 @@
36 'django',36 'django',
37 'setuptools',37 'setuptools',
38 'south==0.7.3',38 'south==0.7.3',
39 'configglue==0.10',39 'configglue==1.0.1',
40 'django-configglue==0.4',40 'django-configglue==0.6.1',
41 'django-openid-auth==0.2',41 'django-openid-auth==0.2',
42 'django-piston==0.2.3',42 'django-piston==0.2.3',
43 'django-preflight',43 'django-preflight',
4444
=== modified file 'src/webcatalog/schema.py'
--- src/webcatalog/schema.py 2012-04-05 01:09:37 +0000
+++ src/webcatalog/schema.py 2012-04-18 17:21:19 +0000
@@ -17,80 +17,75 @@
1717
18"""configglue schema for the Apps Directory."""18"""configglue schema for the Apps Directory."""
1919
20from configglue.pyschema import ConfigSection20
21from configglue.pyschema.options import (21import django
22 BoolConfigOption,22from configglue import schema
23 DictConfigOption,
24 IntConfigOption,
25 LinesConfigOption,
26 StringConfigOption,
27 )
28from django_configglue.schema import schemas23from django_configglue.schema import schemas
2924
30DjangoSchema = schemas.get('1.3')25DjangoSchema = schemas.get(django.get_version())
3126
3227
33class WebCatalogSchema(DjangoSchema):28class WebCatalogSchema(DjangoSchema):
34 """Config options specific to the web catalog."""29 """Config options specific to the web catalog."""
35 # default section30 # default section
36 extra_pythonpath = LinesConfigOption(item=StringConfigOption())31 extra_pythonpath = schema.ListOption(item=schema.StringOption())
37 pgconnect_timeout = IntConfigOption(default=10)32 pgconnect_timeout = schema.IntOption(default=10)
38 should_serve_https = BoolConfigOption()33 should_serve_https = schema.BoolOption()
3934
40 oops = ConfigSection()35 class oops(schema.Section):
41 oops.oops_dir = StringConfigOption(help='Absolute path to the directory'36 oops_dir = schema.StringOption(help='Absolute path to the directory'
42 ' oops reports will be stored in')37 ' oops reports will be stored in')
4338
44 openid = ConfigSection()39 class openid(schema.Section):
45 openid.openid_sso_server_url = StringConfigOption()40 openid_sso_server_url = schema.StringOption()
46 openid.openid_create_users = BoolConfigOption()41 openid_create_users = schema.BoolOption()
47 openid.openid_update_details_from_sreg = BoolConfigOption()42 openid_update_details_from_sreg = schema.BoolOption()
48 openid.openid_launchpad_teams_mapping = DictConfigOption()43 openid_launchpad_teams_mapping = schema.DictOption()
49 openid.openid_sreg_extra_fields = LinesConfigOption(44 openid_sreg_extra_fields = schema.ListOption(
50 item=StringConfigOption())45 item=schema.StringOption())
51 openid.openid_launchpad_staff_teams = LinesConfigOption(46 openid_launchpad_staff_teams = schema.ListOption(
52 item=StringConfigOption())47 item=schema.StringOption())
5348
54 webcatalog = ConfigSection()49 class webcatalog(schema.Section):
55 webcatalog.serve_site_media = BoolConfigOption(default=True)50 serve_site_media = schema.BoolOption(default=True)
56 webcatalog.sca_api_url = StringConfigOption()51 sca_api_url = schema.StringOption()
57 webcatalog.disk_apt_cache_location = StringConfigOption()52 disk_apt_cache_location = schema.StringOption()
58 webcatalog.default_distro = StringConfigOption()53 default_distro = schema.StringOption()
59 webcatalog.page_batch_size = IntConfigOption(default=20)54 page_batch_size = schema.IntOption(default=20)
60 webcatalog.preload_api_service_roots = BoolConfigOption()55 preload_api_service_roots = schema.BoolOption()
61 webcatalog.oauth_data_store = StringConfigOption(56 oauth_data_store = schema.StringOption(
62 default='webcatalog.models.oauthtoken.DataStore')57 default='webcatalog.models.oauthtoken.DataStore')
63 webcatalog.convoy_root = StringConfigOption()58 convoy_root = schema.StringOption()
64 webcatalog.featured_apps = LinesConfigOption(item=StringConfigOption(),59 featured_apps = schema.ListOption(item=schema.StringOption(),
65 default=[])60 default=[])
66 webcatalog.number_top_rated_apps = IntConfigOption(default=18)61 number_top_rated_apps = schema.IntOption(default=8)
67 webcatalog.screenshots_base_url = StringConfigOption(62 screenshots_base_url = schema.StringOption(
68 default='http://screenshots.ubuntu.com/')63 default='http://screenshots.ubuntu.com/')
6964
70 google = ConfigSection()65 class google(schema.Section):
71 google.google_analytics_id = StringConfigOption()66 google_analytics_id = schema.StringOption()
72 google.secondary_google_analytics_id = StringConfigOption()67 secondary_google_analytics_id = schema.StringOption()
7368
74 logging = ConfigSection()69 class logging(schema.Section):
75 logging.webapp_logging_config = StringConfigOption()70 webapp_logging_config = schema.StringOption()
7671
77 # preflight72 # preflight
78 preflight = ConfigSection()73 class preflight(schema.Section):
79 preflight.preflight_base_template = StringConfigOption(74 preflight_base_template = schema.StringOption(
80 default="webcatalog/base.html")75 default="webcatalog/base.html")
8176
82 rnr = ConfigSection()77 class rnr(schema.Section):
83 rnr.rnr_service_root = StringConfigOption(78 rnr_service_root = schema.StringOption(
84 default="http://reviews.ubuntu.com/reviews/api/1.0")79 default="http://reviews.ubuntu.com/reviews/api/1.0")
85 rnr.reviews_cache_timeout = IntConfigOption(default=60 * 15)80 reviews_cache_timeout = schema.IntOption(default=60 * 15)
8681
87 sso_api = ConfigSection()82 class sso_api(schema.Section):
88 sso_api.sso_api_service_root = StringConfigOption()83 sso_api_service_root = schema.StringOption()
89 sso_api.sso_api_auth_username = StringConfigOption()84 sso_api_auth_username = schema.StringOption()
90 sso_api.sso_api_auth_password = StringConfigOption()85 sso_api_auth_password = schema.StringOption()
91 sso_api.sso_api_identity_prefix = StringConfigOption()86 sso_api_identity_prefix = schema.StringOption()
92 sso_api.sso_auth_mode_no_ubuntu_sso_plaintext_only = BoolConfigOption()87 sso_auth_mode_no_ubuntu_sso_plaintext_only = schema.BoolOption()
93 sso_api.token_cache_expiry_hours = IntConfigOption(default=4)88 token_cache_expiry_hours = schema.IntOption(default=4)
9489
95 email = ConfigSection()90 class email(schema.Section):
96 email.noreply_from_address = StringConfigOption()91 noreply_from_address = schema.StringOption()

Subscribers

People subscribed via source and target branches