Skip to content

Commit

Permalink
Merge branch 'master' into 1188-fix-org-list-dataset-form
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 12, 2013
2 parents 62fba12 + 6fbd43b commit fc20a45
Show file tree
Hide file tree
Showing 149 changed files with 5,261 additions and 1,294 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Expand Up @@ -12,7 +12,9 @@ v2.2

API changes and deprecations:


* The Solr schema file is now always named ``schema.xml`` regardless of the
CKAN version. Old schema files have been kept for backwards compatibility
but users are encouraged to point to the new unified one.
* The `ckan.api_url` has been completely removed and it can no longer be used
* The edit() and after_update() methods of IPackageController plugins are now
called when updating a resource using the web frontend or the
Expand Down
10 changes: 7 additions & 3 deletions MANIFEST.in
Expand Up @@ -5,9 +5,13 @@ recursive-include ckan/config *.xml
recursive-include ckan/i18n *
recursive-include ckan/templates *
recursive-include ckan *.ini
recursive-include ckanext/**/public *
recursive-include ckanext/**/templates *
recursive-include ckanext/**/i18n *

recursive-include ckanext/*/i18n *
recursive-include ckanext/*/public *
recursive-include ckanext/*/templates *
recursive-include ckanext/*/theme/public *
recursive-include ckanext/*/theme/templates *

prune .git
include CHANGELOG.txt
include ckan/migration/migrate.cfg
Expand Down
3 changes: 1 addition & 2 deletions bin/travis-run-tests
Expand Up @@ -2,8 +2,7 @@

# Configure Solr
echo "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty
# FIXME the solr schema cannot be hardcoded as it is dependent on the ckan version
sudo cp ckan/config/solr/schema-2.0.xml /etc/solr/conf/schema.xml
sudo cp ckan/config/solr/schema.xml /etc/solr/conf/schema.xml
sudo service jetty restart

# Run mocha front-end tests
Expand Down
26 changes: 4 additions & 22 deletions ckan/config/deployment.ini_tmpl
Expand Up @@ -67,6 +67,7 @@ ckan.auth.user_delete_groups = true
ckan.auth.user_delete_organizations = true
ckan.auth.create_user_via_api = false
ckan.auth.create_user_via_web = true
ckan.auth.roles_that_cascade_to_sub_groups = admin


## Search Settings
Expand Down Expand Up @@ -121,28 +122,9 @@ ckan.feeds.author_link =

## Storage Settings

# Local file storage:
#ofs.impl = pairtree
#ofs.storage_dir = /var/lib/ckan/default

# Google cloud storage:
#ofs.impl = google
#ofs.gs_access_key_id =
#ofs.gs_secret_access_key =

# S3 cloud storage:
#ofs.impl = s3
#ofs.aws_access_key_id = ....
#ofs.aws_secret_access_key = ....

# 'Bucket' to use for file storage
#ckan.storage.bucket = default

# Prefix for uploaded files (only used for pairtree)
#ckan.storage.key_prefix = file/

# The maximum content size, in bytes, for uploads
#ckan.storage.max_content_length = 50000000
#ckan.storage_path = /var/lib/ckan
#ckan.max_resource_size = 10
#ckan.max_image_size = 2

## Datapusher settings

Expand Down
6 changes: 4 additions & 2 deletions ckan/config/environment.py
Expand Up @@ -367,8 +367,10 @@ def template_loaded(template):
# Here we create the site user if they are not already in the database
try:
logic.get_action('get_site_user')({'ignore_auth': True}, None)
except sqlalchemy.exc.ProgrammingError:
# The database is not initialised. This is a bit dirty.
except (sqlalchemy.exc.ProgrammingError, sqlalchemy.exc.OperationalError):
# (ProgrammingError for Postgres, OperationalError for SQLite)
# The database is not initialised. This is a bit dirty. This occurs
# when running tests.
pass
except sqlalchemy.exc.InternalError:
# The database is not initialised. Travis hits this
Expand Down
5 changes: 5 additions & 0 deletions ckan/config/routing.py
Expand Up @@ -229,6 +229,7 @@ def make_map():
'history_ajax',
'follow',
'activity',
'groups',
'unfollow',
'delete',
'api_data',
Expand All @@ -240,6 +241,8 @@ def make_map():
m.connect('dataset_activity', '/dataset/activity/{id}',
action='activity', ckan_icon='time')
m.connect('/dataset/activity/{id}/{offset}', action='activity')
m.connect('dataset_groups', '/dataset/groups/{id}',
action='groups', ckan_icon='group')
m.connect('/dataset/{id}.{format}', action='read')
m.connect('dataset_resources', '/dataset/resources/{id}',
action='resources', ckan_icon='reorder')
Expand All @@ -253,6 +256,8 @@ def make_map():
action='resource_edit', ckan_icon='edit')
m.connect('/dataset/{id}/resource/{resource_id}/download',
action='resource_download')
m.connect('/dataset/{id}/resource/{resource_id}/download/{filename}',
action='resource_download')
m.connect('/dataset/{id}/resource/{resource_id}/embed',
action='resource_embedded_dataviewer')
m.connect('/dataset/{id}/resource/{resource_id}/viewer',
Expand Down
29 changes: 0 additions & 29 deletions ckan/config/solr/CHANGELOG.txt

This file was deleted.

36 changes: 9 additions & 27 deletions ckan/config/solr/README.txt
@@ -1,30 +1,12 @@
CKAN SOLR schemas
=================
CKAN Solr schema
================

This folder contains the latest and previous versions of the SOLR XML
schema files used by CKAN. These can be use on the SOLR server to
override the default SOLR schema. Please note that not all schemas are
backwards compatible with old CKAN versions. Check the CHANGELOG.txt file
in this same folder to check which version of the schema should you use
depending on the CKAN version you are using.
This folder contains the Solr schema file used by CKAN (schema.xml).

Developers, when pushing changes to the SOLR schema:
Starting from 2.2 this is the only file that should be used by users and
modified by devs. The rest of files (schema-{version}.xml) are kept for
backwards compatibility purposes and should not be used, as they might be
removed in future versions.

* Note that updates on the schema are only release based, i.e. all changes
in the schema between releases will be part of the same new version of
the schema.

* Name the new version of the file using the following convention::

schema-<version>.xml

* Update the `version` attribute of the `schema` tag in the new file::

<schema name="ckan" version="<version>">

* Update the SUPPORTED_SCHEMA_VERSIONS list in `ckan/lib/search/__init__.py`
Consider if the changes introduced are or are not compatible with
previous schema versions.

* Update the CHANGELOG.txt file with the new version, the CKAN version
required and changes made to the schema.
When upgrading CKAN, always check the CHANGELOG on each release to see if
you need to update the schema file and reindex your datasets.
8 changes: 8 additions & 0 deletions ckan/config/solr/schema-1.2.xml
@@ -1,4 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
THIS FILE IS DEPRECATED
Starting from CKAN 2.2 the Solr schema file that should be used is
`schema.xml`.
This file is maintained for backwards compatibility purposes but might
be removed in future vesions.
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Expand Down
8 changes: 8 additions & 0 deletions ckan/config/solr/schema-1.3.xml
@@ -1,4 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
THIS FILE IS DEPRECATED
Starting from CKAN 2.2 the Solr schema file that should be used is
`schema.xml`.
This file is maintained for backwards compatibility purposes but might
be removed in future vesions.
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Expand Down
8 changes: 8 additions & 0 deletions ckan/config/solr/schema-1.4.xml
@@ -1,4 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
THIS FILE IS DEPRECATED
Starting from CKAN 2.2 the Solr schema file that should be used is
`schema.xml`.
This file is maintained for backwards compatibility purposes but might
be removed in future vesions.
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Expand Down
8 changes: 8 additions & 0 deletions ckan/config/solr/schema-2.0.xml
@@ -1,4 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
THIS FILE IS DEPRECATED
Starting from CKAN 2.2 the Solr schema file that should be used is
`schema.xml`.
This file is maintained for backwards compatibility purposes but might
be removed in future vesions.
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
Expand Down

0 comments on commit fc20a45

Please sign in to comment.