Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IATI/ckanext-iati
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.3
Choose a base ref
...
head repository: IATI/ckanext-iati
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 7,478 additions and 1,797 deletions.
  1. +2 −0 .gitignore
  2. +14 −0 .travis.yml
  3. +32 −0 CONTRIBUTING.rst
  4. +2 −0 MANIFEST.in
  5. +28 −3 README.rst
  6. +38 −0 bin/travis-install-dependencies
  7. +7 −0 bin/travis-run-tests
  8. +280 −115 ckanext/iati/archiver.py
  9. BIN ckanext/iati/{theme → assets}/fanstatic_library/font/FontAwesome.otf
  10. BIN ckanext/iati/{theme → assets}/fanstatic_library/font/fontawesome-webfont.eot
  11. 0 ckanext/iati/{theme → assets}/fanstatic_library/font/fontawesome-webfont.svg
  12. BIN ckanext/iati/{theme → assets}/fanstatic_library/font/fontawesome-webfont.ttf
  13. BIN ckanext/iati/{theme → assets}/fanstatic_library/font/fontawesome-webfont.woff
  14. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/asc.png
  15. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/desc.png
  16. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/external-link.png
  17. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/favicon.ico
  18. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/header.png
  19. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/home-sections.png
  20. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/ie7-breadcrumb.png
  21. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/logo.png
  22. BIN ckanext/iati/{theme → assets}/fanstatic_library/images/secondary-nav-divider.png
  23. +4 −0 ckanext/iati/{theme → assets}/fanstatic_library/resource.config
  24. +3 −0 ckanext/iati/assets/fanstatic_library/scripts/popover.js
  25. +50 −0 ckanext/iati/assets/fanstatic_library/scripts/query_status.js
  26. +43 −0 ckanext/iati/assets/fanstatic_library/scripts/tablesorter.js
  27. 0 ckanext/iati/{theme → assets}/fanstatic_library/scripts/uploadanimation.js
  28. +1 −0 ckanext/iati/assets/fanstatic_library/scripts/vendor/tablesorter.js
  29. +344 −129 ckanext/iati/{theme → assets}/fanstatic_library/styles/iati.css
  30. +39 −0 ckanext/iati/assets/webassets.yml
  31. +69 −83 ckanext/iati/commands.py
  32. +0 −1 ckanext/iati/controllers/__init__.py
  33. +0 −22 ckanext/iati/controllers/publisher.py
  34. +0 −32 ckanext/iati/controllers/reports.py
  35. +0 −360 ckanext/iati/controllers/spreadsheet.py
  36. +0 −27 ckanext/iati/controllers/static.py
  37. +3 −2 ckanext/iati/countries.py
  38. +13 −13 ckanext/iati/countries.xml
  39. +24 −27 ckanext/iati/emailer.py
  40. +467 −69 ckanext/iati/helpers.py
  41. +170 −0 ckanext/iati/licenses.json
  42. +75 −0 ckanext/iati/linkchecker_patch.py
  43. +2 −2 ckanext/iati/lists.py
  44. +657 −86 ckanext/iati/logic/action.py
  45. +28 −0 ckanext/iati/logic/converters.py
  46. +475 −0 ckanext/iati/logic/csv_action.py
  47. +59 −0 ckanext/iati/logic/publisher_tasks.py
  48. +15 −0 ckanext/iati/logic/user_action.py
  49. +219 −21 ckanext/iati/logic/validators.py
  50. +175 −0 ckanext/iati/model.py
  51. +219 −151 ckanext/iati/plugins.py
  52. +128 −0 ckanext/iati/publisher_date.py
  53. +7 −8 ckanext/iati/tests/test_csv.py
  54. +2 −1 ckanext/iati/theme/README.md
  55. +0 −18 ckanext/iati/theme/fanstatic_library/scripts/tablesorter.js
  56. +0 −2 ckanext/iati/theme/fanstatic_library/scripts/vendor/tablesorter.js
  57. +3 −2 ckanext/iati/theme/less/header.less
  58. +2 −0 ckanext/iati/theme/less/iati.less
  59. +200 −0 ckanext/iati/theme/less/manual-additions.less
  60. BIN ckanext/iati/theme/public/favicon.ico
  61. +1 −1 ckanext/iati/theme/setup.sh
  62. +2 −2 ckanext/iati/theme/templates/activity_streams/activity_stream_items.html
  63. +9 −0 ckanext/iati/theme/templates/admin/base.html
  64. +29 −0 ckanext/iati/theme/templates/admin/index.html
  65. +64 −0 ckanext/iati/theme/templates/admin/redirects.html
  66. +30 −0 ckanext/iati/theme/templates/admin/reports.html
  67. +6 −2 ckanext/iati/theme/templates/base.html
  68. +0 −40 ckanext/iati/theme/templates/csv/index.html
  69. +206 −67 ckanext/iati/theme/templates/csv/result.html
  70. +16 −6 ckanext/iati/theme/templates/csv/upload.html
  71. +15 −0 ckanext/iati/theme/templates/emails/reset_password.txt
  72. +34 −38 ckanext/iati/theme/templates/header.html
  73. +9 −13 ckanext/iati/theme/templates/home/index.html
  74. +12 −0 ckanext/iati/theme/templates/organization/archiver.html
  75. +10 −0 ckanext/iati/theme/templates/organization/base_form_page.html
  76. +1 −2 ckanext/iati/theme/templates/organization/bulk_process.html
  77. +17 −0 ckanext/iati/theme/templates/organization/confirm_delete.html
  78. +18 −0 ckanext/iati/theme/templates/organization/confirm_delete_member.html
  79. +28 −7 ckanext/iati/theme/templates/organization/edit_base.html
  80. +78 −6 ckanext/iati/theme/templates/organization/index.html
  81. +67 −14 ckanext/iati/theme/templates/organization/member_new.html
  82. +1 −1 ckanext/iati/theme/templates/organization/members.html
  83. +26 −3 ckanext/iati/theme/templates/organization/new.html
  84. +4 −3 ckanext/iati/theme/templates/organization/read.html
  85. +15 −7 ckanext/iati/theme/templates/organization/read_base.html
  86. +10 −0 ckanext/iati/theme/templates/organization/snippets/create_helper.html
  87. +164 −70 ckanext/iati/theme/templates/organization/snippets/organization_form.html
  88. +18 −11 ckanext/iati/theme/templates/organization/snippets/organization_list.html
  89. +43 −0 ckanext/iati/theme/templates/organization/snippets/organization_list_dashboard.html
  90. +55 −0 ckanext/iati/theme/templates/organization/snippets/organization_list_ids.html
  91. +38 −0 ckanext/iati/theme/templates/organization/snippets/organization_list_rec_download.html
  92. +6 −5 ckanext/iati/theme/templates/package/base.html
  93. +1 −1 ckanext/iati/theme/templates/package/new.html
  94. +1 −1 ckanext/iati/theme/templates/package/new_package_form.html
  95. +27 −9 ckanext/iati/theme/templates/package/read_base.html
  96. +4 −2 ckanext/iati/theme/templates/package/search.html
  97. +7 −2 ckanext/iati/theme/templates/package/snippets/additional_info.html
  98. +14 −12 ckanext/iati/theme/templates/package/snippets/package_basic_fields.html
  99. +7 −6 ckanext/iati/theme/templates/package/snippets/resources_list.html
  100. +59 −1 ckanext/iati/theme/templates/page.html
  101. +38 −0 ckanext/iati/theme/templates/register/registration.html
  102. +2 −2 ckanext/iati/theme/templates/snippets/country_list.html
  103. +38 −0 ckanext/iati/theme/templates/snippets/dataset_snippet.html
  104. +26 −11 ckanext/iati/theme/templates/snippets/organization.html
  105. +4 −3 ckanext/iati/theme/templates/snippets/package_item.html
  106. +6 −0 ckanext/iati/theme/templates/snippets/package_list.html
  107. +16 −0 ckanext/iati/theme/templates/snippets/package_list_dashboard_pagination.html
  108. +3 −18 ckanext/iati/theme/templates/snippets/resource_links.html
  109. +49 −0 ckanext/iati/theme/templates/snippets/search_form.html
  110. +0 −72 ckanext/iati/theme/templates/static/about-2.html
  111. +0 −26 ckanext/iati/theme/templates/static/dashboard.html
  112. +0 −41 ckanext/iati/theme/templates/static/help.html
  113. +1 −1 ckanext/iati/theme/templates/static/help_csv-import.html
  114. +0 −49 ckanext/iati/theme/templates/static/registry-api.html
  115. +0 −37 ckanext/iati/theme/templates/static/using-iati-data.html
  116. +13 −0 ckanext/iati/theme/templates/user/api_tokens.html
  117. +112 −0 ckanext/iati/theme/templates/user/archiver.html
  118. +57 −0 ckanext/iati/theme/templates/user/archiver_report.html
  119. +224 −0 ckanext/iati/theme/templates/user/archiver_result.html
  120. +8 −4 ckanext/iati/theme/templates/user/dashboard.html
  121. +25 −0 ckanext/iati/theme/templates/user/dashboard_datasets.html
  122. +28 −0 ckanext/iati/theme/templates/user/dashboard_organizations.html
  123. +39 −0 ckanext/iati/theme/templates/user/dashboard_pending_organizations.html
  124. +58 −0 ckanext/iati/theme/templates/user/dashboard_recent_publishers.html
  125. +58 −0 ckanext/iati/theme/templates/user/edit_user_form.html
  126. +54 −0 ckanext/iati/theme/templates/user/login.html
  127. +27 −0 ckanext/iati/theme/templates/user/my_organizations.html
  128. +9 −0 ckanext/iati/theme/templates/user/new.html
  129. +50 −0 ckanext/iati/theme/templates/user/new_user_and_publisher_form.html
  130. +4 −14 ckanext/iati/theme/templates/user/read_base.html
  131. +40 −0 ckanext/iati/theme/templates/user/request_reset.html
  132. 0 ckanext/iati/views/__init__.py
  133. +191 −0 ckanext/iati/views/admin.py
  134. +237 −0 ckanext/iati/views/archiver.py
  135. +212 −0 ckanext/iati/views/dashboard.py
  136. +18 −0 ckanext/iati/views/helper_pages.py
  137. +340 −0 ckanext/iati/views/publisher.py
  138. +13 −0 ckanext/iati/views/registration.py
  139. +69 −0 ckanext/iati/views/reports.py
  140. +278 −0 ckanext/iati/views/spreadsheet.py
  141. +7 −2 pip-requirements.txt
  142. +8 −7 scripts/users_to_members.py
  143. +16 −4 setup.py
  144. +49 −0 test.travis.ini
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,5 @@ ckanext_iati.egg-info/
node_modules
bower_components
.idea/
#emacs cruft
*~
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: python
python:
- "2.7"
env:
- PGVERSION=9.6
dist: trusty
sudo: required
cache: pip
before_install:
- chmod +x ./bin/travis-install-dependencies
- chmod +x ./bin/travis-run-tests
install: ./bin/travis-install-dependencies
script:
- ./bin/travis-run-tests
32 changes: 32 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
International Aid Transparency Initiative (IATI) Registry Extension for CKAN
============================================================================

Advice for contributing to the codebase.

Commit message style guide
--------------------------

`Chris Beams' advice on commit messages <http://chris.beams.io/posts/git-commit/>`_ should be followed. The most important elements are summarised below.

Messages should be descriptive of the change contained within the commit, with the first line using the imperative mood, being capitalised and no more than 50 characters in length:

.. code::
Refactor subsystem X for readability
If there is a corresponding issue, this should be referenced at the beginning of the message using square brackets and the issue number, preceded by a hash symbol. The following example describes a commit that would be related to issue 15:

.. code::
[#15] Update getting started documentation
Multiple issues can be referenced, listed in order of relevance. The following example describes a commit that would be most relevant to issue 22, but also issue 9:

.. code::
[#22][#9] Fix broken link
Any subsequent lines should be wrapped at 72 characters.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
graft ckanext
include *.py
31 changes: 28 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

International Aid Transparency Initiative (IATI) Registry Extension for CKAN
============================================================================
.. image:: https://api.travis-ci.org/ViderumGlobal/ckanext-iati.svg?branch=master
:target: https://travis-ci.org/ViderumGlobal/ckanext-iati
============================================================================


* `Installation`_
@@ -13,14 +17,14 @@ Installation
------------

The current version of ckanext-iati has been developed and tested again
**CKAN 2.1.x**. We assume a running CKAN 2.1.x instance.
**CKAN 2.9.1**. We assume a running CKAN 2.9.1 instance.

The installation has the following steps, assuming you have a running
copy of CKAN:

#. Install the extension from its source repository::

(pyenv) $ pip install -e git+https://github.com/okfn/ckanext-iati#egg=ckanext-iati
(pyenv) $ pip install -e git+https://github.com/IATI/ckanext-iati#egg=ckanext-iati

#. Install dependencies::

@@ -100,7 +104,7 @@ like ``ckan.site_id``, ``solr_url``, etc are not included)::
# Subject of the email sent to publishers when activated, default is 'IATI Registry Publisher Activation'
#iati.publisher_activation_email_subject=

# Allowed values for the IATI Standard Version (iati_version) field, default is '1.01 1.02 1.03 1.04 2.01'
# Allowed values for the IATI Standard Version (iati_version) field, default is '1.01 1.02 1.03 1.04 1.05 2.01 2.02 2.03'
#iati.standard_versions

# Set a user agent string used by ckanext-archiver when making requests
@@ -288,6 +292,27 @@ to the relevant user crontab (generally ``okfn``)::
05 00 * * * /usr/lib/ckan/iati/bin/paster --plugin=ckanext-iati iati-archiver update -c /etc/ckan/iati/production.ini >> /tmp/iati_archiver_2_out.log 2>&1


Nightly cronjobs runtimes
++++++++++++++++++++++++++++++++

Documenting cronjob running times for future reference:

* Purging of deleted datasets runs at 1 AM

* Reindexing after purging runs at 2 AM

* Archiver operation runs at 3 AM


*Times are UTC.

GitHub Repository - Production Code
++++++++++++++++++++++++++++++++
Repo: https://github.com/IATI/ckanext-iati
Branch: master


Copying and License
-------------------

38 changes: 38 additions & 0 deletions bin/travis-install-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

# Exit immediately if any command fails
set -e

echo "This is travis-install-dependencies..."

echo "Remove the current instance of PostgreSQL 9.2"
#sudo apt-get remove -y postgresql-9.2

echo "Installing the packages that CKAN requires..."
#sudo apt-get install postgresql-$PGVERSION solr-jetty

echo "Installing CKAN and its Python dependencies..."
#git clone https://github.com/ckan/ckan
#cd ckan
#git checkout "ckan-2.6.2"
#python setup.py develop
#pip install -r requirements.txt
#pip install -r dev-requirements.txt
#pip install coveralls
#cd -

echo "Creating the PostgreSQL user and database..."
#sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';"
#sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;'

echo "Initialising the database..."
#cd ckan
#paster db init -c test-core.ini
#cd -

echo "Installing ckanext-requestdata and its requirements..."
#python setup.py develop
#pip install -r requirements.txt
#pip install -r dev-requirements.txt

echo "travis-install-dependencies is done."
7 changes: 7 additions & 0 deletions bin/travis-run-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh -e

echo "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty
#sudo cp ckan/ckan/config/solr/schema.xml /etc/solr/conf/schema.xml
#sudo service jetty restart

#nosetests --ckan --with-pylons=test.travis.ini
Loading