Skip to content

Commit

Permalink
Correct links to ckan repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel Babu committed Jan 29, 2014
1 parent fd1ec8f commit 41d639f
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ v2.0 2013-05-10
to GitHub issues. For example:

* #3020 is http://trac.ckan.org/ticket/3020
* #271 is https://github.com/okfn/ckan/issues/271
* #271 is https://github.com/ckan/ckan/issues/271

Some GitHub issues URLs will redirect to GitHub pull request pages.

Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CKAN: The Open Source Data Portal Software
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
datasets with a rich front-end, full API (for both data and catalog), visualization
tools and more. Read more at `ckan.org <http://ckan.org/>`_.
tools and more. Read more at `ckan.org <http://ckan.org/>`_.


Installation
Expand All @@ -36,14 +36,14 @@ searching first to see if there's already an issue for your bug).

.. _CKAN tag on Stack Overflow: http://stackoverflow.com/questions/tagged/ckan
.. _ckan-discuss: http://lists.okfn.org/mailman/listinfo/ckan-discuss
.. _GitHub Issues: https://github.com/okfn/ckan/issues
.. _GitHub Issues: https://github.com/ckan/ckan/issues


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

For contributing to CKAN or its documentation, see
`CONTRIBUTING <https://github.com/okfn/ckan/blob/master/CONTRIBUTING.rst>`_.
`CONTRIBUTING <https://github.com/ckan/ckan/blob/master/CONTRIBUTING.rst>`_.

If you want to talk about CKAN development say hi to the CKAN developers on the
`ckan-dev`_ mailing list or in the `#ckan`_ IRC channel on irc.freenode.net.
Expand All @@ -54,7 +54,7 @@ others, make a new page on the `CKAN wiki`_, and tell us about it on

.. _ckan-dev: http://lists.okfn.org/mailman/listinfo/ckan-dev
.. _#ckan: http://webchat.freenode.net/?channels=ckan
.. _CKAN Wiki: https://github.com/okfn/ckan/wiki
.. _CKAN Wiki: https://github.com/ckan/ckan/wiki


Copying and License
Expand Down
4 changes: 2 additions & 2 deletions doc/_templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</p>

<p>
<a href="https://github.com/okfn/ckan">Source</a>
<a href="https://github.com/ckan/ckan">Source</a>
&mdash;
<a href="https://github.com/okfn/ckan/issues">Issues</a>
<a href="https://github.com/ckan/ckan/issues">Issues</a>
&mdash;
<a href="http://lists.okfn.org/mailman/listinfo/ckan-dev">Mailing List</a>
&mdash;
Expand Down
64 changes: 32 additions & 32 deletions doc/background-tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To run the celery daemon you have two options:

Using this file as a template and copy to ``/etc/supservisor/conf.d``::

https://github.com/okfn/ckan/blob/master/ckan/config/celery-supervisor.conf
https://github.com/ckan/ckan/blob/master/ckan/config/celery-supervisor.conf

Alternatively, you can run::

Expand All @@ -65,9 +65,9 @@ Examples

Here are some existing real examples of writing CKAN tasks:

* https://github.com/okfn/ckanext-archiver
* https://github.com/okfn/ckanext-qa
* https://github.com/okfn/ckanext-datastorer
* https://github.com/ckan/ckanext-archiver
* https://github.com/ckan/ckanext-qa
* https://github.com/ckan/ckanext-datastorer

Setup
-----
Expand All @@ -77,9 +77,9 @@ you should add something resembling the following that points to a function in
a module. In this case the function is called task_imports in the
``ckanext.NAME.celery_import`` module::

entry_points = """
[ckan.celery_task]
tasks = ckanext.NAME.celery_import:task_imports
entry_points = """
[ckan.celery_task]
tasks = ckanext.NAME.celery_import:task_imports
"""

The function, in this case ``task_imports`` should be a function that returns
Expand All @@ -88,11 +88,11 @@ next section). In this case we will put all of our tasks in a file called
``tasks.py`` and so ``task_imports`` should be in a file called
``ckanext/NAME/celery_import.py``::

def task_imports():
return ['ckanext.NAME.tasks']
def task_imports():
return ['ckanext.NAME.tasks']

This returns an iterable of all of the places to look to find tasks, in this
example we are only putting them in one place.
example we are only putting them in one place.


Implementing the tasks
Expand All @@ -103,42 +103,42 @@ to use the decorators provided by celery. These decorators make it easy to just
define a function and then give it a name and make it accessible to celery.
Make sure you import celery from ckan.lib.celery_app::

from ckan.lib.celery_app import celery
from ckan.lib.celery_app import celery

Implement your function, specifying the arguments you wish it to take. For our
sample we will use a simple echo task that will print out its argument to the
console::

def echo( message ):
print message
def echo( message ):
print message

Next it is important to decorate your function with the celery task decorator.
You should give the task a name, which is used later on when calling the task::

@celery.task(name = "NAME.echofunction")
def echo( message ):
print message
@celery.task(name = "NAME.echofunction")
def echo( message ):
print message

That's it, your function is ready to be run asynchronously outside of the main
execution of the CKAN app. Next you should make sure you run ``python setup.py
develop`` in your extensions folder and then go to your CKAN installation
folder (normally pyenv/src/ckan/) to run the following command::

paster celeryd
paster celeryd

Once you have done this your task name ``NAME.echofunction`` should appear in
the list of tasks loaded. If it is there then you are all set and ready to go.
If not then you should try the following to try and resolve the problem:
If not then you should try the following to try and resolve the problem:

1. Make sure the entry point is defined correctly in your ``setup.py`` and that
you have executed ``python setup.py develop``
you have executed ``python setup.py develop``
2. Check that your task_imports function returns an iterable with valid module
names in
names in
3. Ensure that the decorator marks the functions (if there is more than one
decorator, make sure the celery.task is the first one - which means it will
execute last).
execute last).
4. If none of the above helps, go into #ckan on irc.freenode.net where there
should be people who can help you resolve your issue.
should be people who can help you resolve your issue.

Calling the task
----------------
Expand All @@ -147,12 +147,12 @@ Now that the task is defined, and has been loaded by celery it is ready to be
called. To call a background task you need to know only the name of the task,
and the arguments that it expects as well as providing it a task id.::

import uuid
from ckan.lib.celery_app import celery
celery.send_task("NAME.echofunction", args=["Hello World"], task_id=str(uuid.uuid4()))
import uuid
from ckan.lib.celery_app import celery
celery.send_task("NAME.echofunction", args=["Hello World"], task_id=str(uuid.uuid4()))

After executing this code you should see the message printed in the console
where you ran ``paster celeryd``.
where you ran ``paster celeryd``.


Retrying on errors
Expand All @@ -165,12 +165,12 @@ call to retry via the countdown parameter, and you can also specify the
exception that triggered the failure. For our example the call to retry would
look like the following - note that it calls the function name, not the task
name given in the decorator::
try:
... some work that may fail, http request?
except Exception, e:
# Retry again in 2 minutes
echo.retry(args=(message), exc=e, countdown=120, max_retries=10)

try:
... some work that may fail, http request?
except Exception, e:
# Retry again in 2 minutes
echo.retry(args=(message), exc=e, countdown=120, max_retries=10)

If you don't want to wait a period of time you can use the eta datetime
parameter to specify an explicit time to run the task (i.e. 9AM tomorrow)
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
.. |config_dir| replace:: |config_parent_dir|/default
.. |production.ini| replace:: |config_dir|/production.ini
.. |development.ini| replace:: |config_dir|/development.ini
.. |git_url| replace:: \https://github.com/okfn/ckan.git
.. |git_url| replace:: \https://github.com/ckan/ckan.git
.. |postgres| replace:: PostgreSQL
.. |database| replace:: ckan_default
.. |database_user| replace:: ckan_default
Expand Down Expand Up @@ -67,7 +67,7 @@
.. _Jinja2: http://jinja.pocoo.org/
.. _CKAN front page: http://127.0.0.1:5000
.. _bootstrap: http://getbootstrap.com/2.3.2/
.. _CKAN issue tracker: https://github.com/okfn/ckan/issues
.. _CKAN issue tracker: https://github.com/ckan/ckan/issues
'''

Expand Down
8 changes: 4 additions & 4 deletions doc/contributing/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Writing documentation
.. seealso::

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>`_.
for a free GitHub account and simply edit the `CKAN Wiki <https://github.com/ckan/ckan/wiki>`_.
Docs started on the wiki can make it onto `docs.ckan.org`_ later.
If you do want to contribute to `docs.ckan.org`_ directly, follow the
instructions on this page.
Expand Down Expand Up @@ -55,7 +55,7 @@ which in turn uses `Docutils <http://docutils.sourceforge.net/>`_
* `Sphinx Markup Constructs <http://sphinx-doc.org/markup/index.html>`_
is a full list of the markup that Sphinx adds on top of Docutils.

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

Expand All @@ -76,7 +76,7 @@ terminal:

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


Expand Down Expand Up @@ -190,7 +190,7 @@ page follows another, like in a book.
3. Style
--------

..
..
http://jacobian.org/writing/great-documentation/technical-style/
This section covers things like what tone to use, how to capitalize section
Expand Down
2 changes: 1 addition & 1 deletion doc/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributing to CKAN
====================

.. _CKAN repo on GitHub: https://github.com/okfn/ckan
.. _CKAN repo on GitHub: https://github.com/ckan/ckan
.. _docs.ckan.org: http://docs.ckan.org

CKAN is free open source software and contributions are welcome, whether
Expand Down
2 changes: 1 addition & 1 deletion doc/contributing/issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Reporting issues
If you've found a bug in CKAN, open a new issue on CKAN's `GitHub Issues`_ (try
searching first to see if there's already an issue for your bug).

.. _GitHub Issues: https://github.com/okfn/ckan/issues
.. _GitHub Issues: https://github.com/ckan/ckan/issues

If you can fix the bug yourself, please
:doc:`send a pull request <pull-requests>`!
Expand Down
2 changes: 1 addition & 1 deletion doc/data-viewer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ proxied, you need to replace the URL that is used to load the file. This can
be done using the function :func:`ckanext.resourceproxy.plugin.get_proxified_resource_url`.
To find out whether the resource proxy is enabled, check ``ckan.resource_proxy_enabled``
from the config. You can find a complete example in the
`CKAN source <https://github.com/okfn/ckan/blob/793c2607199f2204307c12f83925257cd8eadc5e/ckanext/jsonpreview/plugin.py>`_.
`CKAN source <https://github.com/ckan/ckan/blob/793c2607199f2204307c12f83925257cd8eadc5e/ckanext/jsonpreview/plugin.py>`_.

.. _embed-previews:

Expand Down
2 changes: 1 addition & 1 deletion doc/extensions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data previews for different file formats.
**External extensions** are CKAN extensions that don't come packaged with
CKAN, but must be downloaded and installed separately. A good place to find
external extensions is the
`list of extensions on the CKAN wiki <https://github.com/okfn/ckan/wiki/List-of-extensions>`_.
`list of extensions on the CKAN wiki <https://github.com/ckan/ckan/wiki/List-of-extensions>`_.
Again, follow each extension's own documentation to install, setup and use the
extension.

Expand Down
2 changes: 1 addition & 1 deletion doc/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ each feature or extension.
Beyond these core features, further features can be added to CKAN by
downloading and installing external extensions. A good place to find extensions
is the
`list of extensions on the CKAN wiki <https://github.com/okfn/ckan/wiki/List-of-extensions>`_.
`list of extensions on the CKAN wiki <https://github.com/ckan/ckan/wiki/List-of-extensions>`_.

.. toctree::
:maxdepth: 2
Expand Down
4 changes: 2 additions & 2 deletions doc/install-from-source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This section describes how to install CKAN from source. Although
CKAN from source works with other versions of Ubuntu and with other operating
systems (e.g. RedHat, Fedora, CentOS, OS X). If you install CKAN from source
on your own operating system, please share your experiences on our
`How to Install CKAN <https://github.com/okfn/ckan/wiki/How-to-Install-CKAN>`_
`How to Install CKAN <https://github.com/ckan/ckan/wiki/How-to-Install-CKAN>`_
wiki page.

From source is also the right installation method for developers who want to
Expand All @@ -26,7 +26,7 @@ required packages with this command::

If you're not using a Debian-based operating system, find the best way to
install the following packages on your operating system (see
our `How to Install CKAN <https://github.com/okfn/ckan/wiki/How-to-Install-CKAN>`_
our `How to Install CKAN <https://github.com/ckan/ckan/wiki/How-to-Install-CKAN>`_
wiki page for help):

===================== ===============================================
Expand Down
2 changes: 1 addition & 1 deletion doc/stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and graphs with statistics about your site, including:

.. seealso::

`ckanext-googleanalytics <https://github.com/okfn/ckanext-googleanalytics>`_
`ckanext-googleanalytics <https://github.com/ckan/ckanext-googleanalytics>`_
A CKAN extension that integrates Google Analytics into CKAN.


Expand Down
16 changes: 8 additions & 8 deletions doc/theming/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ Replacing a default template file
Every CKAN page is generated by rendering a particular template. For each
page of a CKAN site there's a corresponding template file. For example the
front page is generated from the
`ckan/templates/home/index.html <https://github.com/okfn/ckan/blob/master/ckan/templates/home/index.html>`_
`ckan/templates/home/index.html <https://github.com/ckan/ckan/blob/master/ckan/templates/home/index.html>`_
file, the ``/about`` page is generated from
`ckan/templates/home/about.html <https://github.com/okfn/ckan/blob/master/ckan/templates/home/about.html>`_,
`ckan/templates/home/about.html <https://github.com/ckan/ckan/blob/master/ckan/templates/home/about.html>`_,
the datasets page at ``/dataset`` is generated from
`ckan/templates/package/search.html <https://github.com/okfn/ckan/blob/master/ckan/templates/package/search.html>`_,
`ckan/templates/package/search.html <https://github.com/ckan/ckan/blob/master/ckan/templates/package/search.html>`_,
etc.

To customize pages, our plugin needs to register its own custom template
Expand Down Expand Up @@ -172,7 +172,7 @@ about the page.

To figure out which template file renders a particular part of the page you
have to inspect the
`source code of the template files <https://github.com/okfn/ckan/tree/master/ckan/templates>`_,
`source code of the template files <https://github.com/ckan/ckan/tree/master/ckan/templates>`_,
starting with the root file.

Now let's override ``home/index.html`` using our plugins' custom ``templates``
Expand Down Expand Up @@ -395,7 +395,7 @@ section of the page has been replaced, but the rest of the page remains intact.
Most template files in CKAN contain multiple blocks.
To find out what blocks a template has, and which block renders a particular
part of the page, you have to look at the
`source code of the default template files <https://github.com/okfn/ckan/tree/master/ckan/templates>`_.
`source code of the default template files <https://github.com/ckan/ckan/tree/master/ckan/templates>`_.


------------------------------------------------------
Expand Down Expand Up @@ -522,9 +522,9 @@ Template snippets
functions, can be called from any template file. To call a snippet, you use
another of CKAN's custom Jinja2 tags: ``{% snippet %}``. CKAN comes with a
selection of snippets, which you can find in the various ``snippets``
directories in `ckan/templates/ <https://github.com/okfn/ckan/tree/master/ckan/templates>`_,
such as `ckan/templates/snippets/ <https://github.com/okfn/ckan/tree/master/ckan/templates/snippets>`_
and `ckan/templates/package/snippets/ <https://github.com/okfn/ckan/tree/master/ckan/templates/package/snippets>`_.
directories in `ckan/templates/ <https://github.com/ckan/ckan/tree/master/ckan/templates>`_,
such as `ckan/templates/snippets/ <https://github.com/ckan/ckan/tree/master/ckan/templates/snippets>`_
and `ckan/templates/package/snippets/ <https://github.com/ckan/ckan/tree/master/ckan/templates/package/snippets>`_.
For a complete list of the default snippets available to templates, see
:doc:`template-snippets`.

Expand Down
2 changes: 1 addition & 1 deletion doc/tracking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CKAN can track visits to pages of your site and use this tracking data to:

.. seealso::

`ckanext-googleanalytics <https://github.com/okfn/ckanext-googleanalytics>`_
`ckanext-googleanalytics <https://github.com/ckan/ckanext-googleanalytics>`_
A CKAN extension that integrates Google Analytics into CKAN.


Expand Down

0 comments on commit 41d639f

Please sign in to comment.