diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5c0cd1c4287..1d771ea657d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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. diff --git a/README.rst b/README.rst index 9c810209231..5dba9e44624 100644 --- a/README.rst +++ b/README.rst @@ -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 `_. +tools and more. Read more at `ckan.org `_. Installation @@ -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 `_. +`CONTRIBUTING `_. 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. @@ -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 diff --git a/doc/_templates/footer.html b/doc/_templates/footer.html index 50ce0fa2283..49661c54d0b 100644 --- a/doc/_templates/footer.html +++ b/doc/_templates/footer.html @@ -7,9 +7,9 @@

-Source +Source — -Issues +IssuesMailing List — diff --git a/doc/background-tasks.rst b/doc/background-tasks.rst index b2ff80e8d87..739287d37c8 100644 --- a/doc/background-tasks.rst +++ b/doc/background-tasks.rst @@ -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:: @@ -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 ----- @@ -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 @@ -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 @@ -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 ---------------- @@ -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 @@ -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) diff --git a/doc/conf.py b/doc/conf.py index 56d96c86d91..5cebc4df47c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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 @@ -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 ''' diff --git a/doc/contributing/documentation.rst b/doc/contributing/documentation.rst index 9681a5ad5d1..5243f7176b9 100644 --- a/doc/contributing/documentation.rst +++ b/doc/contributing/documentation.rst @@ -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 `_. + for a free GitHub account and simply edit the `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. @@ -55,7 +55,7 @@ which in turn uses `Docutils `_ * `Sphinx Markup Constructs `_ 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 `_. +The source files for the docs are in `the doc directory of the CKAN git repo `_. The following sections will walk you through the process of making changes to these source files, and submitting your work to the CKAN project. @@ -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 @@ -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 diff --git a/doc/contributing/index.rst b/doc/contributing/index.rst index 18692fa6220..ddc6831f996 100644 --- a/doc/contributing/index.rst +++ b/doc/contributing/index.rst @@ -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 diff --git a/doc/contributing/issues.rst b/doc/contributing/issues.rst index 43517f8336e..1d027321c13 100644 --- a/doc/contributing/issues.rst +++ b/doc/contributing/issues.rst @@ -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 `! diff --git a/doc/data-viewer.rst b/doc/data-viewer.rst index 5f6ec34e444..625db22e085 100644 --- a/doc/data-viewer.rst +++ b/doc/data-viewer.rst @@ -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 `_. +`CKAN source `_. .. _embed-previews: diff --git a/doc/extensions/index.rst b/doc/extensions/index.rst index 293c897efc7..a4752dcfa47 100644 --- a/doc/extensions/index.rst +++ b/doc/extensions/index.rst @@ -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 `_. +`list of extensions on the CKAN wiki `_. Again, follow each extension's own documentation to install, setup and use the extension. diff --git a/doc/features.rst b/doc/features.rst index e1623f93fca..5eef39a2e28 100644 --- a/doc/features.rst +++ b/doc/features.rst @@ -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 `_. +`list of extensions on the CKAN wiki `_. .. toctree:: :maxdepth: 2 diff --git a/doc/install-from-source.rst b/doc/install-from-source.rst index 78e167c2e86..eb8dcf8ae4f 100644 --- a/doc/install-from-source.rst +++ b/doc/install-from-source.rst @@ -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 `_ +`How to Install CKAN `_ wiki page. From source is also the right installation method for developers who want to @@ -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 `_ +our `How to Install CKAN `_ wiki page for help): ===================== =============================================== diff --git a/doc/stats.rst b/doc/stats.rst index ecbb02e0e03..fee5f4cfa60 100644 --- a/doc/stats.rst +++ b/doc/stats.rst @@ -22,7 +22,7 @@ and graphs with statistics about your site, including: .. seealso:: - `ckanext-googleanalytics `_ + `ckanext-googleanalytics `_ A CKAN extension that integrates Google Analytics into CKAN. diff --git a/doc/theming/templates.rst b/doc/theming/templates.rst index 55ddc7939df..c1e27a19eb8 100644 --- a/doc/theming/templates.rst +++ b/doc/theming/templates.rst @@ -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 `_ +`ckan/templates/home/index.html `_ file, the ``/about`` page is generated from -`ckan/templates/home/about.html `_, +`ckan/templates/home/about.html `_, the datasets page at ``/dataset`` is generated from -`ckan/templates/package/search.html `_, +`ckan/templates/package/search.html `_, etc. To customize pages, our plugin needs to register its own custom template @@ -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 `_, + `source code of the template files `_, starting with the root file. Now let's override ``home/index.html`` using our plugins' custom ``templates`` @@ -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 `_. + `source code of the default template files `_. ------------------------------------------------------ @@ -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/ `_, -such as `ckan/templates/snippets/ `_ -and `ckan/templates/package/snippets/ `_. +directories in `ckan/templates/ `_, +such as `ckan/templates/snippets/ `_ +and `ckan/templates/package/snippets/ `_. For a complete list of the default snippets available to templates, see :doc:`template-snippets`. diff --git a/doc/tracking.rst b/doc/tracking.rst index 6c8d6865e40..739d17cd95d 100644 --- a/doc/tracking.rst +++ b/doc/tracking.rst @@ -14,7 +14,7 @@ CKAN can track visits to pages of your site and use this tracking data to: .. seealso:: - `ckanext-googleanalytics `_ + `ckanext-googleanalytics `_ A CKAN extension that integrates Google Analytics into CKAN.