Skip to content

Commit

Permalink
Merge branch 'master' of github.com:okfn/ckan into 964-500-Server-Err…
Browse files Browse the repository at this point in the history
…or-on-non-string-extra-value

Conflicts:
	ckan/tests/functional/api/model/test_package.py
  • Loading branch information
Sean Hammond committed Jul 17, 2013
2 parents 4179938 + f91e7e6 commit 2815391
Show file tree
Hide file tree
Showing 320 changed files with 42,855 additions and 24,130 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "doc/_themes/sphinx-theme-okfn"]
path = doc/_themes/sphinx-theme-okfn
url = git://github.com/okfn/sphinx-theme-okfn.git
url = https://github.com/okfn/sphinx-theme-okfn.git
1 change: 1 addition & 0 deletions .pipignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ckan
32 changes: 30 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
.. _changelog:
.. This tocdepth stops Sphinx from putting every subsection title in this file
into the master table of contents.
:tocdepth: 1

---------
Changelog
---------

v2.2
====

API changes and deprecations:

* The edit() and after_update() methods of IPackageController plugins are now
called when updating a resource using the web frontend or the
resource_update API action [#1052]

v2.0.1 2013-06-11
=================

Bug fixes:
* Use IDatasetForm schema for resource_update (#897)
* Fixes for CKAN being run on a non-root URL (#948, #913)
* Fix resource edit errors losing info (#580)
* Fix Czech translation (#900)
* Allow JSON filters for datastore_search on GET requests (#917)
* Install vdm from the Python Package Index (#764)
* Allow extra parameters on Solr queries (#739)
* Create site user at startup if it does not exist (#952)
* Fix modal popups positioning (#828)
* Fix wrong redirect on dataset form on IE (#963)


v2.0 2013-05-10
===============

Expand Down Expand Up @@ -404,7 +432,7 @@ v1.5 2011-11-07
Major:
* New visual theme (#1108)
* Package & Resource edit overhaul (#1294/#1348/#1351/#1368/#1296)
* JS and CSS reorganisation (#1282, #1349, #1380)
* JS and CSS reorganization (#1282, #1349, #1380)
* Apache Solr used for search in core instead of Postgres (#1275, #1361, #1365)
* Authorization system now embedded in the logic layer (#1253)
* Captcha added for user registration (#1307, #1431)
Expand Down
77 changes: 12 additions & 65 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,77 +126,24 @@ Frontend Development Guidelines
Writing Documentation
---------------------

**Note**: Getting started with contributing to `docs.ckan.org`_ is a little
complicated. An easier way to contribute documentation to CKAN is to sign up
for a free GitHub account and simply edit the `CKAN Wiki
<https://github.com/okfn/ckan/wiki>`_. Docs started on the wiki can make it
onto `docs.ckan.org`_ later.

**Tip**: Use the |restructuredtext| markup format when creating a wiki page,
since |restructuredtext| is the format that docs.ckan.org uses, this will make
moving the documentation from the wiki into docs.ckan.org later easier.

The CKAN documentation at `docs.ckan.org`_ is created using `Sphinx
<http://sphinx-doc.org/>`_. The source files are in `the doc directory of the
CKAN git repo <https://github.com/okfn/ckan/tree/master/doc>`_. The following
sections will walk you through the process of making changes to these
documentation files, and submitting your work to the CKAN project.

1. Install CKAN into a Virtualenv
=================================

Create a `Python virtual environment <http://pypi.python.org/pypi/virtualenv>`_
(virtualenv), activate it, install CKAN into the virtual environment, and
install the dependencies necessary for building CKAN. In this example we'll
create a virtualenv in a folder called ``pyenv``. Run these commands in a
terminal::

virtualenv --no-site-packages pyenv
. pyenv/bin/activate
pip install -e 'git+https://github.com/okfn/ckan.git#egg=ckan'
pip install -r pyenv/src/ckan/pip-requirements-docs.txt


2. Fetch CKAN's Git Submodules
==============================

CKAN's custom Sphinx theme is a kept in a git *submodule*, so before you can
build the docs you have to run these commands in a terminal to download the
submodule::

cd pyenv/src/ckan
git submodule init
git submodule update
The quickest and easiest way to contribute documentation to CKAN is to sign up
for a free GitHub account and simply edit the `CKAN Wiki <https://github.com/okfn/ckan/wiki>`_.
Docs started on the wiki can make it onto `docs.ckan.org`_ later.

**Note**: you may occassionally have to run ``git submodule update`` again,
when someone updates the theme, but this doesn't happen often.


3. Build the Docs
=================

You should now be able to build the CKAN documentation locally. Make sure your
virtual environment is activated, and then run this command::

python setup.py build_sphinx

Now you can open the built HTML files in
``pyenv/src/ckan/build/sphinx/html``, e.g.::

firefox pyenv/src/ckan/build/sphinx/html/index.html
**Tip**: Use the reStructuredText markup format when creating a wiki page,
since reStructuredText is the format that docs.ckan.org uses, this will make
moving the documentation from the wiki into docs.ckan.org later easier.

For how to contribute to the offical CKAN documentation at docs.ckan.org, see
the `documentation guidelines <http://docs.ckan.org/en/latest/documentation-guidelines.html>`_.

4. Edit the reStructuredText Files
==================================
.. toctree::
:hidden:

To make changes to the documentation, use a text editor to edit the ``.rst``
files in ``pyenv/src/ckan/doc/``. Save your changes and then build the docs
again (``python setup.py build_sphinx``) and open the HTML files in a web
browser to preview your changes.
documentation-guidelines

Once your docs are ready to submit to the CKAN project, follow the steps in
`Making a Pull Request`_.

.. _making a pull request:

---------------------
Making a Pull Request
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Note
====

CKAN is sometimes packaged directly with other software (listed in
pip-requirements.txt, pip-requirements-test.txt and pip-requirements-docs.txt).
requirements.txt and dev-requirements.txt).
In these cases, we are required to list the licenses of the packaged softare
too. They are all AGPL compatible and read as follows in the next sections.

Expand Down
1 change: 1 addition & 0 deletions bin/ckan_edit_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def canada_extras():
'Level of Government':'level_of_government',
}
license_mapping = {
# CS: bad_spelling ignore
'http://geogratis.ca/geogratis/en/licence.jsp':'geogratis',
'Crown Copyright':'canada-crown',
}
Expand Down
3 changes: 1 addition & 2 deletions bin/travis-build
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ sudo -u postgres psql -c "CREATE USER datastore_default WITH PASSWORD 'pass';"
sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;'
sudo -u postgres psql -c 'CREATE DATABASE datastore_test WITH OWNER ckan_default;'

pip install -r pip-requirements.txt --use-mirrors
pip install -r pip-requirements-test.txt --use-mirrors
pip install -r requirements.txt -r dev-requirements.txt --use-mirrors

python setup.py develop

Expand Down
2 changes: 1 addition & 1 deletion ckan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '2.1a'
__version__ = '2.2a'

__description__ = 'Comprehensive Knowledge Archive Network (CKAN) Software'
__long_description__ = \
Expand Down
2 changes: 1 addition & 1 deletion ckan/config/deployment.ini_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ckan.preview.loadable = html htm rdf+xml owl+xml xml n3 n-triples turtle plain a
ckan.locale_default = en
ckan.locale_order = en pt_BR ja it cs_CZ ca es fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv
ckan.locales_offered =
ckan.locales_filtered_out =
ckan.locales_filtered_out = en_GB


## Feeds Settings
Expand Down
8 changes: 8 additions & 0 deletions ckan/config/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import ckan.lib.helpers as h
import ckan.lib.app_globals as app_globals
import ckan.lib.jinja_extensions as jinja_extensions
import ckan.logic as logic

from ckan.common import _, ungettext

Expand Down Expand Up @@ -348,3 +349,10 @@ def genshi_lookup_attr(cls, obj, key):

for plugin in p.PluginImplementations(p.IConfigurable):
plugin.configure(config)

# 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.
pass
13 changes: 11 additions & 2 deletions ckan/config/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ def make_map():
requirements=dict(action='|'.join([
'edit',
'delete',
'members',
'member_new',
'member_delete',
'history',
Expand All @@ -291,6 +290,10 @@ def make_map():
])))
m.connect('group_about', '/group/about/{id}', action='about',
ckan_icon='info-sign'),
m.connect('group_edit', '/group/edit/{id}', action='edit',
ckan_icon='edit')
m.connect('group_members', '/group/members/{id}', action='members',
ckan_icon='group'),
m.connect('group_activity', '/group/activity/{id}/{offset}',
action='activity', ckan_icon='time'),
m.connect('group_read', '/group/{id}', action='read',
Expand Down Expand Up @@ -343,9 +346,15 @@ def make_map():
m.connect('/user/activity/{id}/{offset}', action='activity')
m.connect('user_activity_stream', '/user/activity/{id}',
action='activity', ckan_icon='time')
m.connect('/dashboard/{offset}', action='dashboard')
m.connect('user_dashboard', '/dashboard', action='dashboard',
ckan_icon='list')
m.connect('user_dashboard_datasets', '/dashboard/datasets',
action='dashboard_datasets', ckan_icon='sitemap')
m.connect('user_dashboard_groups', '/dashboard/groups',
action='dashboard_groups', ckan_icon='group')
m.connect('user_dashboard_organizations', '/dashboard/organizations',
action='dashboard_organizations', ckan_icon='building')
m.connect('/dashboard/{offset}', action='dashboard')
m.connect('user_follow', '/user/follow/{id}', action='follow')
m.connect('/user/unfollow/{id}', action='unfollow')
m.connect('user_followers', '/user/followers/{id:.*}',
Expand Down

0 comments on commit 2815391

Please sign in to comment.