[ckan-changes] commit/ckanext-dgu: dread: [ons_importer]: Avoid problem with ckan groups by not using defunct ukgov any more.

Bitbucket commits-noreply at bitbucket.org
Tue Nov 8 12:28:56 UTC 2011


1 new commit in ckanext-dgu:


https://bitbucket.org/okfn/ckanext-dgu/changeset/4c348c6380c1/
changeset:   4c348c6380c1
user:        dread
date:        2011-11-08 13:28:42
summary:     [ons_importer]: Avoid problem with ckan groups by not using defunct ukgov any more.
affected #:  4 files

diff -r 73bc5ee5a066ddbee81cb17f547c59bb41ebf355 -r 4c348c6380c151b4e929f69453f93da1bd7f1642 ckanext/dgu/forms/formapi.py
--- a/ckanext/dgu/forms/formapi.py
+++ b/ckanext/dgu/forms/formapi.py
@@ -112,9 +112,9 @@
                 self._abort_not_authorized('User %r not authorized to create packages' % user.name)
 
             api_url = config.get('ckan.api_url', '/').rstrip('/')
-            c.package_create_slug_api_url = \
-                   api_url + h.url_for(controller='api',
-                                       action='create_slug')
+##            c.package_create_slug_api_url = \
+##                   api_url + h.url_for(controller='api',
+##                                       action='create_slug')
             # Get the fieldset.
             fieldset = self._get_package_fieldset()
             if request.method == 'GET':


diff -r 73bc5ee5a066ddbee81cb17f547c59bb41ebf355 -r 4c348c6380c151b4e929f69453f93da1bd7f1642 ckanext/dgu/ons/importer.py
--- a/ckanext/dgu/ons/importer.py
+++ b/ckanext/dgu/ons/importer.py
@@ -136,7 +136,7 @@
             'notes': notes,
             'license_id': self._crown_license_id,
             'tags': [], # post-filled
-            'groups': ['ukgov'],
+            'groups': [],
             'resources': resources,
             'extras': extras,
             }


diff -r 73bc5ee5a066ddbee81cb17f547c59bb41ebf355 -r 4c348c6380c151b4e929f69453f93da1bd7f1642 ckanext/dgu/tests/ons/test_ons_importer.py
--- a/ckanext/dgu/tests/ons/test_ons_importer.py
+++ b/ckanext/dgu/tests/ons/test_ons_importer.py
@@ -187,7 +187,7 @@
             ('notes', u"Monthly breakdown for government's net reserves, detailing gross reserves and gross liabilities.\n\nSource agency: HM Treasury\n\nLanguage: English\n\nAlternative title: UK Reserves"),
             ('license_id', u'uk-ogl'),
             ('tags', [u'assets', u'currency', u'economics-and-finance', u'economy', u'gold', u'government-receipts-and-expenditure', u'liabilities', u'public-sector-finance', u'reserves']),
-            ('groups', ['ukgov']),
+            ('groups', []),
             ('resources', [OrderedDict([
                 ('url', u'http://www.hm-treasury.gov.uk/national_statistics.htm'),
                 ('description', u'December 2009 | hub/id/119-36345'),


diff -r 73bc5ee5a066ddbee81cb17f547c59bb41ebf355 -r 4c348c6380c151b4e929f69453f93da1bd7f1642 ckanext/dgu/tests/ons/test_ons_loader.py
--- a/ckanext/dgu/tests/ons/test_ons_loader.py
+++ b/ckanext/dgu/tests/ons/test_ons_loader.py
@@ -138,7 +138,6 @@
         assert cereals.author == u'Department for Environment, Food and Rural Affairs', cereals.author
         assert custody.author == u'Ministry of Justice', custody.author
 
-#        assert model.Group.by_name(u'ukgov') in pkg1.groups
         for pkg in (pkg1, cereals, custody):
             assert pkg.extras['import_source'].startswith('ONS'), '%s %s' % (pkg.name, pkg.extras['import_source'])
 
@@ -271,7 +270,7 @@
              "notes": "This report reviews:\n\nWhat is subjective wellbeing and why should we measure it?\n\nHow subjective wellbeing is currently measured in the UK - what subjective wellbeing questions are already being asked on major social surveys in the UK\n\nThe potential uses of subjective wellbeing data collected via these surveys\n\n\nIt concludes that subjective wellbeing is a valid construct that can be measured reliably. This is the first output of ONS' work on subjective wellbeing.\n\nSource agency: Office for National Statistics\n\nDesignation: Supporting material\n\nLanguage: English\n\nAlternative title: Working Paper: Measuring Subjective Wellbeing in the UK",
              "license_id": "ukcrown-withrights",
              "tags": ["communities", "health-well-being-and-care", "people-and-places", "societal-wellbeing", "subjective-wellbeing-subjective-well-being-objective-measures-subjective-measures", "well-being"],
-             "groups": ["ukgov"],
+             "groups": [],
              "extras": {"geographic_coverage": "111100: United Kingdom (England, Scotland, Wales, Northern Ireland)", "geographical_granularity": "UK and GB", "external_reference": "ONSHUB", "temporal_granularity": "", "date_updated": "", "agency": "Office for National Statistics", "precision": "", "temporal_coverage_to": "", "temporal_coverage_from": "", "national_statistic": "no", "import_source": "ONS-ons_data_7_days_to_2010-09-17", "department": 'UK Statistics Authority', "update_frequency": "", "date_released": "2010-09-14", "categories": "People and Places"},
              "resources": [{"url": "http://www.ons.gov.uk/about-statistics/measuring-equality/wellbeing/news-and-events/index.html", "format": "", "description": "2010 | hub/id/77-31166", }],
              }
@@ -327,7 +326,7 @@
             "notes": "Weekly death figures provide provisional counts of the number of deaths registered in England and Wales in the latest four weeks for which data are available up to the end of 2009. From week one 2010 the latest eight weeks for which data are available will be published.\n\nSource agency: Office for National Statistics\n\nDesignation: National Statistics\n\nLanguage: English\n\nAlternative title: Weekly deaths",
             "license_id": "ukcrown-withrights",
             "tags": ["death", "deaths", "life-events", "life-in-the-community", "mortality-rates", "population", "weekly-deaths"],
-            "groups": ["ukgov"], "extras": {
+            "groups": [], "extras": {
                 "geographic_coverage": "101000: England, Wales",
                 "geographical_granularity": "Country",
                 "external_reference": "ONSHUB",
@@ -381,7 +380,7 @@
             "notes": "The National Child Measurement Programme weighs and measures primary school children.\r\nThis publication was formerly announced as \"National Child Measurement Programme - Statistics on Child Obesity 2008-09\" but the title has been amended to reflect suggestions from the UKSA Assessments Board.\r\nSource agency: Information Centre for Health and Social Care\r\nDesignation: National Statistics\r\nLanguage: English\r\nAlternative title: National Child Measurement Programme",
             "license_id": "uk-ogl",
             "tags": ["health", "health-and-social-care", "health-of-the-population", "lifestyles-and-behaviours", "nhs", "well-being-and-care"],
-            "groups": ["ukgov"],
+            "groups": [],
             "extras": {
                 "geographic_coverage": "100000: England",
                 "geographical_granularity": "Country",
@@ -447,7 +446,7 @@
             "notes": "Epidemiological analyses of Mandatory surveillance data on MRSA bacteraemia and C. difficile infection covering at least nine quarters\r\nSource agency: Health Protection Agency\r\nDesignation: Official Statistics not designated as National Statistics\r\nLanguage: English\r\nAlternative title: Quarterly Epi Commentary",
             "license_id": "uk-ogl",
             "tags": ["conditions-and-diseases", "health", "health-and-social-care", "health-of-the-population", "nhs-trust-hcai-pct-mrsa-mrsa-bacteraemia-c-difficile-c-diff-clostridium-difficile-healthcare-associa", "well-being-and-care"],
-            "groups": ["ukgov"],
+            "groups": [],
             "extras": {
                 "geographic_coverage": "100000: England",
                 "geographical_granularity": "Other",

Repository URL: https://bitbucket.org/okfn/ckanext-dgu/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list