Skip to content

Commit

Permalink
Merge branch 'master' into 262-improve-helper-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Feb 20, 2013
2 parents cd6c892 + 90a6ef2 commit 4b86bb2
Show file tree
Hide file tree
Showing 328 changed files with 51,503 additions and 12,084 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Expand Up @@ -6,8 +6,6 @@ syntax: glob
.DS_Store
ckan.egg-info/*
sandbox/*
theme/*
theme
dist

# pylons
Expand All @@ -28,9 +26,6 @@ fl_notes.txt
.noseids
*~

# local symlinks
ckan/public/scripts/ckanjs.js

# custom style
ckan/public/base/less/custom.less

Expand Down
34 changes: 34 additions & 0 deletions .travis.yml
@@ -0,0 +1,34 @@
language: python
python:
- "2.7"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq solr-jetty
install:
- "pip install -r pip-requirements.txt --use-mirrors"
- "pip install -r pip-requirements-test.txt --use-mirrors"
before_script:
- psql -c 'CREATE DATABASE ckantest;' -U postgres
- psql -c 'CREATE DATABASE datastore;' -U postgres
- psql -c 'CREATE USER readonlyuser;' -U postgres
- python setup.py develop
- paster make-config ckan development.ini --no-interactive
- sed -i -e 's/.*solr_url.*/solr_url = http:\/\/127.0.0.1:8983\/solr/' development.ini
- sed -i -e 's/.*ckan\.site_id.*/ckan.site_id = travis_ci/' development.ini
- sed -i -e 's/^sqlalchemy.url.*/sqlalchemy.url = postgresql:\/\/postgres@localhost\/ckantest/' development.ini
- sed -i -e 's/.*datastore.write_url.*/ckan.datastore.write_url = postgresql:\/\/postgres@localhost\/datastore/' development.ini
- sed -i -e 's/.*datastore.read_url.*/ckan.datastore.read_url = postgresql:\/\/readonlyuser@localhost\/datastore/' development.ini
- cat development.ini
- echo -e "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty
- sudo cp ckan/config/solr/schema-2.0.xml /etc/solr/conf/schema.xml
- sudo service jetty restart
- paster --plugin=ckan db init
- sed -i -e 's/ -W//g' ckanext/datastore/bin/datastore_setup.py
- paster datastore set-permissions postgres
script: "nosetests --ckan ckan && nosetests --ckan --with-pylons=test-core.ini --nologcapture --cover-package=ckanext.datastore ckanext/datastore/tests -x"
notifications:
irc:
channels:
- "irc.freenode.org#ckan"
template:
- "%{repository} (%{branch} - %{commit}) [%{build_url}] %{author}: %{message}"
109 changes: 87 additions & 22 deletions doc/contributing.rst → CONTRIBUTING.rst
@@ -1,6 +1,14 @@
==============================
How to Contribute Code to CKAN
==============================
====================
Contributing to CKAN
====================

.. _CKAN repo on GitHub: https://github.com/okfn/ckan
.. _CKAN issue tracker: https://github.com/okfn/ckan/issues
.. _docs.ckan.org: http://docs.ckan.org
.. _Contributing to CKAN's Documentation: https://github.com/okfn/ckan/blob/master/CONTRIBUTING.rst#contributing-to-ckans-documentation

(This section is about contributing code, if you want to contribute
documentation see `Contributing to CKAN's Documentation`_.)

CKAN is a free software project and code contributions are welcome. To
contribute code to CKAN you should fork CKAN to your own GitHub account, push
Expand All @@ -11,8 +19,6 @@ branch on the central CKAN repo. We'll go through each step in detail below...
Fork CKAN on GitHub
-------------------

.. _CKAN repo on GitHub: https://github.com/okfn/ckan
.. _CKAN issue tracker: http://trac.ckan.org

If you don't have access to the central `CKAN repo on GitHub`_ you should sign
up for a free account on `GitHub.com <https://github.com/>`_ and
Expand Down Expand Up @@ -69,6 +75,7 @@ Here is an example CKAN commit message::

Following feedback from markw (see #2406).


Keeping Up with master
----------------------

Expand Down Expand Up @@ -101,29 +108,87 @@ reviewer may ask you to make some changes to your code. Once the pull request
has passed the code review, the reviewer will merge your code into the master
branch and it will become part of CKAN!

.. note::
When submitting a pull request:

When submitting a pull request:

- Your branch should contain code for one feature or bug fix only,
see `Feature Branches`_.
- Your branch should contain new or changed tests for any new or changed
code, see :ref:`Testing`.
- Your branch should contain updates to the
`CHANGELOG file <https://github.com/okfn/ckan/blob/master/CHANGELOG.txt>`_
briefly summarising your code changes.
- Your branch should contain new or updated documentation for any new or
updated code, see :doc:`contributing-docs`.
- Your branch should be up to date with the master branch of the central
CKAN repo, see `Keeping Up with master`_.
- All the CKAN tests should pass on your branch, see :doc:`test`.
- Your branch should contain code for one feature or bug fix only,
see `Feature Branches`_.
- Your branch should contain new or changed tests for any new or changed
code.
- Your branch should contain updates to the
`CHANGELOG file <https://github.com/okfn/ckan/blob/master/CHANGELOG.txt>`_
briefly summarising your code changes.
- Your branch should contain new or updated documentation for any new or
updated code, see `Contributing to CKAN's Documentation`_.
- Your branch should be up to date with the master branch of the central
CKAN repo, see `Keeping Up with master`_.
- All the CKAN tests should pass on your branch, see
`Testing for Developers <http://docs.ckan.org/en/latest/test.html>`_.


Merging
-------

When merging a feature or bug branch into master:

- Make sure the tests pass, see :doc:`test`.
- Use the ``--no-ff`` option in the ``git merge`` command,
- Add an entry to the ``CHANGELOG`` file.


Coding Standards
----------------

When writing code for CKAN, try to follow our
`coding standards <http://docs.ckan.org/en/latest/#for-ckan-developers>`_.


====================================
Contributing to CKAN's Documentation
====================================

Note: getting started with contributing to `docs.ckan.org`_ is a little
complicated. An easier way to contribute documentation to CKAN is to
contribute to the `CKAN Wiki <https://github.com/okfn/ckan/wiki>`_. Docs
started on the wiki can make it onto `docs.ckan.org`_ later.

`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>`_.
To edit these docs:

1. If you haven't already, create a
`Python virtual environment <http://pypi.python.org/pypi/virtualenv>`_
(virtualenv), activate it and clone the CKAN git repo into it. In this
example we'll create a virtualenv in a folder called ``pyenv``::

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

2. Install the Python dependencies necessary for building the CKAN docs into
your virtualenv::

pip install -r pyenv/src/ckan/pip-requirements-docs.txt

3. Fetch the git submodule that contains CKAN's custom Sphinx theme::

cd pyenv/src/ckan
git submodule init
git submodule update

Note: you may occassionally have to run ``git submodule update`` again,
when someone updates the submodule.

4. Make changes to the documentation by using your text editor to edit the
``pyenv/src/ckan/doc/*.rst`` files.

5. Build the documentation locally, to preview your changes::

python setup.py build_sphinx

Now you can open the built HTML files in
``pyenv/src/ckan/build/sphinx/html`` to see your changes, e.g.:
``firefox pyenv/src/ckan/build/sphinx/html/index.html``.

6. Finally, when you're ready to submit your contributions to the CKAN
project, follow the same process as for contributing code, see
`Contributing to CKAN`_.

19 changes: 10 additions & 9 deletions README.rst
@@ -1,6 +1,10 @@
CKAN: The Open Source Data Portal Software
==========================================

.. image:: https://secure.travis-ci.org/okfn/ckan.png?branch=master
:target: http://travis-ci.org/okfn/ckan
:alt: Build Status

**CKAN is the world’s leading open-source data portal platform**.
CKAN makes it easy to publish, share and work with data. It's a data management
system that provides a powerful platform for cataloging, storing and accessing
Expand All @@ -18,20 +22,17 @@ Community
---------

* Developer mailing list: `ckan-dev@lists.okfn.org <http://lists.okfn.org/mailman/listinfo/ckan-dev>`_
* Developer IRC channel: #ckan on `irc.freenode.net <http://freenode.net/>`_
* Issue tracker: `trac.ckan.org <http://trac.ckan.org/>`_
* Developer IRC channel: `#ckan on irc.freenode.net <http://webchat.freenode.net/?channels=ckan>`_
* `Issue tracker <https://github.com/okfn/ckan/issues>`_
* `CKAN tag on StackOverflow <http://stackoverflow.com/questions/tagged/ckan>`_
* `Wiki <https://github.com/okfn/ckan/wiki>`_


Contributing to CKAN
--------------------

CKAN is a free software project and code contributions are welcome.
The `For CKAN Developers <http://docs.ckan.org/en/latest/index.html#for-ckan-developers>`_
section of the documentation explains how to contribute to CKAN or its documentation,
including our **coding standards**.

The `CKAN Wiki <https://github.com/okfn/ckan/wiki>`_ is also open fo contributions.
For contributing to CKAN or its documentation, see
`CONTRIBUTING <https://github.com/okfn/ckan/blob/master/CONTRIBUTING.rst>`_.


Copying and License
Expand All @@ -42,4 +43,4 @@ This material is copyright (c) 2006-2011 Open Knowledge Foundation.
It is open and licensed under the GNU Affero General Public License (AGPL) v3.0
whose full text may be found at:

http://www.fsf.org/licensing/licenses/agpl-3.0.html
http://www.fsf.org/licensing/licenses/agpl-3.0.html
4 changes: 2 additions & 2 deletions ckan/__init__.py
@@ -1,4 +1,4 @@
__version__ = '2.0a'
__version__ = '2.1a'

__description__ = 'Comprehensive Knowledge Archive Network (CKAN) Software'
__long_description__ = \
Expand All @@ -17,5 +17,5 @@
'''
__license__ = 'AGPL'

# The packaging system replies on this import, please do not remove it
# The packaging system relies on this import, please do not remove it
import sys; sys.path.insert(0, __path__[0])
11 changes: 6 additions & 5 deletions ckan/config/deployment.ini_tmpl
Expand Up @@ -52,7 +52,8 @@ app_instance_uuid = ${app_instance_uuid}
# List the names of CKAN extensions to activate.
# Note: This line is required to be here for packaging, even if it is empty.
# Note: Add ``pdf_preview`` to enable the resource preview for PDFs
# Add the resource_proxy plugin to enable resorce proxying and get around the same origin policy
# Add the ``resource_proxy`` plugin to enable resorce proxying and get around the same origin policy
# Add ``datastore`` to enable the CKAN DataStore extension
ckan.plugins = stats json_preview recline_preview

# If you'd like to fine-tune the individual locations of the cache data dirs
Expand All @@ -68,10 +69,10 @@ sqlalchemy.url = postgresql://ckanuser:pass@localhost/ckantest
#sqlalchemy.url = sqlite:///
#sqlalchemy.url = sqlite:///%(here)s/somedb.db

## Datastore
## Uncommment to set the datastore urls
#ckan.datastore.write_url = postgresql://ckanuser:pass@localhost/ckantest
#ckan.datastore.read_url = postgresql://readonlyuser:pass@localhost/ckantest
# Un-comment and specify the URLs for the DataStore database.
# * Postgres is required
#ckan.datastore.write_url = postgresql://ckanuser:pass@localhost/datastore
#ckan.datastore.read_url = postgresql://readonlyuser:pass@localhost/datastore

# repoze.who config
who.config_file = %(here)s/who.ini
Expand Down

0 comments on commit 4b86bb2

Please sign in to comment.