Commit Graph

864 Commits

Author SHA1 Message Date
David Read 1288a4d9e7 Reflow text to 79 char width. Warning not necessary with an exception I think. 2015-11-13 12:32:13 +00:00
Stefan Oderbolz 0ce3748153 Do not use ActionError as this does not yet exist in CKAN 2.2 2015-11-13 12:01:19 +01:00
Stefan Oderbolz c33c6e8c13 Raise an error instead of falling back to harvest_source_update
As the behaviour of *_patch is clearly different from the *_update we
should raise an error if this action is called on a CKAN instance, where
the action is not available.
2015-11-13 11:41:53 +01:00
Stefan Oderbolz 73aecb7f12 Add datastore_default user due to PR #2234 from ckan 2015-11-11 20:06:12 +01:00
Stefan Oderbolz 644fa49dd4 Make tests independent from cls.sysadmin
Generate unique harvest sources
2015-11-11 19:49:49 +01:00
Stefan Oderbolz ffca5cc3da Use new factory style for fixtures
- Remove default_source_dict from tests
- Replace setup_class with constructor
- Create mixin for harvest source fixture
- Replace assert with assert_equal where appropriate
- Replace assert with ok_
- Remove dependency to global SOURCE_DICT
- General refactoring of tests
2015-11-11 19:07:59 +01:00
Stefan Oderbolz 136fcb87d5 Make sure package_patch has a fallback for package_update on CKAN < 2.3 2015-11-11 11:37:23 +01:00
Stefan Oderbolz 359da2eb69 Add test class for harvest_source_patch 2015-11-11 11:34:01 +01:00
Stefan Oderbolz 3f09010039 Add harvest_source_patch to API 2015-11-11 05:39:29 +01:00
David Read 735ab3e286 [#157] Try to fix test for ckan 2.2 - cf 91afc0e928 2015-11-04 11:37:03 +00:00
David Read a0742d69b0 Merge branch 'master' of github.com:ckan/ckanext-harvest into 157-version-three-apify
Conflicts:
	ckanext/harvest/logic/action/update.py
2015-11-04 09:50:00 +00:00
David Read 679ed421e9 Merge branch 'master' of github.com:ckan/ckanext-harvest into immediate-harvest
Conflicts:
	ckanext/harvest/logic/action/update.py
2015-11-04 09:44:05 +00:00
David Read f0207ad38f Merge branch 'master' of github.com:ckan/ckanext-harvest into yhteentoimivuuspalvelut-job-reporting-fixes 2015-11-04 09:36:55 +00:00
David Read cbe9b40e66 Merge branch 'master' of github.com:ckan/ckanext-harvest into revision-id-fix 2015-11-04 09:36:08 +00:00
David Read 46e7e182f5 Merge branch 'master' of github.com:ckan/ckanext-harvest into 180-fix-modified-date 2015-11-04 09:35:23 +00:00
David Read 72ef3e4826 Merge pull request #184 from ckan/LondonAppDev-master
Allow Harvest Sources with duplicate URLs if they have unique configs
2015-11-03 23:41:47 +00:00
David Read f9da3654f8 [#184] Fix tests for older ckan versions. 2015-11-03 23:27:52 +00:00
David Read 5fba056c59 [#184] Add tests 2015-11-03 23:19:05 +00:00
David Read 6159d900b3 Merge branch 'master' into LondonAppDev-master 2015-11-03 22:26:07 +00:00
David Read 77e5b89a01 Blank line needed. 2015-11-03 22:23:04 +00:00
David Read 3d35814f3a Merge pull request #183 from ckan/pep8-from-174
A few more PEP8 changes taken from #174
2015-11-03 22:14:37 +00:00
David Read 1ccb0dae44 A few more PEP8 changes taken from #174. 2015-11-03 22:12:49 +00:00
David Read 8c1f7619cb Fix code style to be more ckan-like whilst still pep8. 2015-11-03 22:08:46 +00:00
David Read 20531c0dda Merge branch 'master' of github.com:ckan/ckanext-harvest into LondonAppDev-master
Conflicts:
	ckanext/harvest/logic/action/update.py
	ckanext/harvest/logic/validators.py
2015-11-03 22:02:49 +00:00
David Read 2ff017d9de Merge pull request #182 from ckan/pep8-from-174
Pep8 from 174
2015-11-03 21:59:29 +00:00
David Read 10685badb5 PEP8 based on #174
Conflicts:
	ckanext/harvest/logic/action/delete.py
	ckanext/harvest/logic/action/update.py
	ckanext/harvest/logic/validators.py
2015-11-03 21:56:06 +00:00
David Read 5a5260ff0b Add test for harvest_source_clear since the PEP8 changes were quite a lot there. 2015-11-03 21:42:39 +00:00
David Read 4f71612002 PEP8 based on #174 2015-11-03 20:30:11 +00:00
Mark Winterbottom 208d1c4185 Setting back to master. 2015-11-03 17:31:00 +00:00
David Read 91afc0e928 [#178] Fix test for ckan 2.2, which does not suffer problem #180. 2015-11-03 10:01:47 +00:00
David Read e305957cbe [#180] Fix modified date check. Fixes #180. 2015-11-03 09:41:45 +00:00
David Read f4f124c181 [#178] Fix resouce_revision_id_fkey error. Fixes #178. 2015-11-03 07:38:01 +00:00
David Read 59be6e2c71 Merge branch 'master' into db-error
Conflicts:
	ckanext/harvest/queue.py
2015-11-03 00:57:14 +00:00
David Read 8a7bc9e1d8 Merge remote-tracking branch 'origin/master' into immediate-harvest
Conflicts:
	README.rst
	ckanext/harvest/commands/harvester.py
	ckanext/harvest/logic/action/create.py
	ckanext/harvest/logic/action/update.py
	ckanext/harvest/logic/auth/update.py
2015-11-03 00:40:25 +00:00
David Read c7fac36c1c [#107] "unchanged" response tested and related fixes
* fix "existing_package_dict" which wasn't containing metadata_modified (because of the schema in the context) so you never skipped an object.
* fix IntegrityError due to resource revision_id being harvested. No idea why this hasn't caused errors before now.
* "unchanged" is now checked in base instead of ckanharvester - makes sense. Looking at other harvesters, it's normal to return from the import_stage with the value returned from base._create_or_update_package so I've continued with that.
* "unchanged" response is now documented
* better report_status tests in test_queue2.
2015-11-03 00:22:53 +00:00
David Read e59760fefe Merge branch 'job-reporting-fixes' of https://github.com/yhteentoimivuuspalvelut/ckanext-harvest into yhteentoimivuuspalvelut-job-reporting-fixes 2015-11-02 21:25:32 +00:00
David Read 24415844e0 [#158] Fix revision_id problem in second harvest. 2015-11-02 18:13:29 +00:00
David Read d495e269e7 [#158] Fix tests 2015-11-02 17:29:45 +00:00
David Read 14f372aec6 Merge branch 'master' of github.com:ckan/ckanext-harvest into 157-version-three-apify
Conflicts:
	README.rst
2015-11-02 17:01:22 +00:00
Mark Winterbottom 7ffd6748f3 Corrected docstring params field, duplicate if statement and deleting keys
for blank values.
2015-11-02 16:59:43 +00:00
David Read b7552ba700 [#158] Try harder to use the "get datasets since time X" method of harvesting. Go back to the last completely successful harvest, rather than just consider the previous one. And that had a bug, because fetch errors were ignored, meaning one fetch error could mean that dataset never got harvested again. 2015-11-02 16:59:19 +00:00
Mark Winterbottom 443d690ac8 Fixed big typo error. 2015-11-02 16:45:16 +00:00
Mark Winterbottom 53f692b802 Merge remote-tracking branch 'remotes/upstream/master' 2015-11-02 16:00:14 +00:00
Mark Winterbottom 1702cf2f09 Remove ', None' on .get() calls because it's the default value. 2015-11-02 15:51:25 +00:00
Mark Winterbottom 0c19acba78 Changed double quotes to single quotes in docstrings. 2015-11-02 15:50:04 +00:00
Mark Winterbottom a6069d93db Fixed bug where the harvest source url validator would validate against
all harvest sources that were ever created instead of just sources that
were currently enabled.
2015-10-30 16:59:04 +00:00
Mark Winterbottom 3f37ae5f45 Corrected docstring. 2015-10-30 16:11:25 +00:00
Mark Winterbottom 02b81187df Fixed bug with deleting harvest source's which have a custom
configuration. Added PEP-8 compliance.
2015-10-30 15:15:41 +00:00
amercader 3f856c3b8c Merge branch 'activate-pyenv' 2015-10-30 14:12:56 +00:00
amercader 975db5a6c9 Merge branch 'harvest-command' 2015-10-30 14:12:50 +00:00