Commit Graph

367 Commits

Author SHA1 Message Date
amercader 3b6468b181 Merge branch '2.0-dataset-sources' of github.com:okfn/ckanext-harvest into 2.0-dataset-sources 2013-03-01 12:51:17 +00:00
joetsoi 9432368bea fix gather_stage if there is a previous job
change check on gather stage to check for changed packages since
last job instead of current harvest job's gather_start

fix attribute look up bug

fix print_job to print 0 gather_errors instead of key error
2013-02-28 19:06:21 +00:00
joetsoi ffce2c7915 Merge branch '2.0-dataset-sources' of github.com:okfn/ckanext-harvest into 2.0-dataset-sources 2013-02-28 18:11:12 +00:00
amercader dab98112dc Fix bug in harvest job reports 2013-02-28 15:47:35 +00:00
amercader a86d91c3f0 [#11] Make get actions side_effect_free 2013-02-28 12:17:15 +00:00
joetsoi ba486a9482 add indexing of datasets whilst harvesting 2013-02-27 11:34:09 +00:00
amercader efe977512b Include gather errors on job summaries and reports 2013-02-25 17:17:08 +00:00
Adrià Mercader 348f936601 Merge pull request #9 from joetsoi/2.0-dataset-sources
add return True to import stage of ckanharvester
2013-02-22 03:16:46 -08:00
joetsoi f97e3b4c6c add return True to import stage of ckanharvester
Was causing queue.py to report that the import had errored.
2013-02-22 10:13:36 +00:00
amercader 83f8cf69a6 Remove unnecessary extra quotes (see #381 on CKAN core) 2013-02-19 11:51:22 +00:00
amercader 177349fd76 Update HarvesterBase
This is a convenience class that other harvesters can extend. Updates
include a cleanup of old functions and porting of enhancements from the
spatial harvesters.
2013-02-12 16:10:13 +00:00
amercader eaa8988440 [#4] Changes in schema to accommodate organizations
Basically handle the 'owner_org' field in form_to_db and db_to_form.
Added 'owner_org', 'frequency' (has default) and 'config' to surplus
keys in check_data_dict.
Also remove schema tweaks to let package_show call the appropiate schema
function.
2013-02-11 16:34:52 +00:00
amercader 1391948b62 Merge branch '5-improve-job-errors-reporting' into 2.0-dataset-sources 2013-02-06 12:53:17 +00:00
amercader ba4a63feb5 Merge branch '4-new-auth-for-2.0' into 2.0-dataset-sources 2013-02-06 12:53:08 +00:00
amercader 3c50a40a76 [#5] Fix auth for harvest_job_list (should forward to harvest_source_update) 2013-02-05 16:41:29 +00:00
amercader 413ef8786c [#5] Fix counts on jobs listing 2013-02-05 16:40:22 +00:00
amercader 5956e5a9d5 Merge branch '4-new-auth-for-2.0' into 5-improve-job-errors-reporting 2013-02-05 12:36:26 +00:00
amercader 3bec3c46b0 Merge branch '2.0-dataset-sources' into 4-new-auth-for-2.0 2013-02-05 12:35:41 +00:00
amercader ca7819b885 Merge branch 'release-v2.0' into 2.0-dataset-sources 2013-02-05 12:35:14 +00:00
amercader cca554c5ec Fix typo and add missing column on v3 migration script 2013-02-05 12:33:56 +00:00
amercader e1ce0b7267 [#5] Allow not returning error summary on job dictize 2013-02-04 18:28:45 +00:00
amercader 8576ad6784 [#5] Add job listing page 2013-02-04 18:20:58 +00:00
amercader 22389fc52a [#5] Update report templates
The job details page has been updated to show the full error report, and
the whole report page has been dropped. All job details are loaded via a
snippet, which is also loaded on the harvest source page.

The frontend is still completely provisional.
2013-02-01 18:32:41 +00:00
amercader 42bace3628 [#5] Add new finished field for harvest job
When the run command flags a job as finished, it will query the most
recent harvest object for this job and use its import_finished value as
the job finishing time.
2013-01-28 17:19:28 +00:00
amercader 920f07cdf7 [#5] Cleanup the job controller actions 2013-01-28 16:32:53 +00:00
amercader c8e7086567 [#5] Change default auth for showing and listing jobs
Forward auth checks to harvest_source_update instead of
harvest_source_show, as job reports should only be visible to users that
can manage sources.
2013-01-28 16:31:11 +00:00
amercader ab78bf21b9 [#5] Fix typo in delete auth function 2013-01-28 16:15:38 +00:00
amercader 8431182f01 Document method and cleanup the interface file 2013-01-24 18:39:19 +00:00
amercader 676c7d34b6 [#5] Add method for returning the original URL for a document
Harvesters implementing IHarvester can define a `get_original_url`
method that should return a URL pointing to the original location of a
document in the remote server. If present, this URL will be used on the
job reports.

Examples:
* For a CKAN record: http://{ckan-instance}/api/rest/{guid}
* For a WAF record: http://{waf-root}/{file-name}
* For a CSW record: http://{csw-server}/?Request=GetElementById&Id={guid}&...
2013-01-24 18:35:43 +00:00
amercader d4b6dcb7f6 [#5] Add helper function for generating a link to a harvest object 2013-01-24 18:21:05 +00:00
amercader daa9a385ff Update job keys changed on 9ba6e8f 2013-01-24 17:36:58 +00:00
amercader 30d58b2b7b [#5] Preliminary job report logic function and page (WIP) 2013-01-23 18:04:19 +00:00
amercader 234f9f4cc0 [#5] Add job summary page
Shows dataset and error counts, job details and a summary of the more
frequent errors.
2013-01-23 17:33:44 +00:00
amercader b2b89dfd61 Add command for reindex all harvest sources 2013-01-22 16:43:36 +00:00
amercader 0d79252a09 Add command for reindex all harvest sources 2013-01-22 16:43:25 +00:00
amercader 6c861afe39 Update template with new harvest source status 2013-01-22 16:37:31 +00:00
amercader 9ba6e8f3b3 [#5] Add error summary to harvest_job_dictize
It will return the counts for the 20 most common errors for that
particular job. These will available when calling harvest_job_show.

Also refactor the harvest source status object to just call
harvest_job_dictize on the 'last_job' key, as it has all the
interesting fields anyway.
2013-01-22 13:13:24 +00:00
amercader 0950827329 Merge branch '4-new-auth-for-2.0' into 2.0-dataset-sources 2013-01-22 12:03:26 +00:00
amercader 30c9eedf5f Improve harvest source status creation
Use report_status field to improve speed, remove unnecessary fields.
2013-01-17 15:43:45 +00:00
amercader bfce5185f0 [#4] Add db_to_form_schema_options to harvest plugin to avoid validation on show 2013-01-16 17:45:33 +00:00
amercader 2ab10afcf9 [#4] Fix typo in auth functions 2013-01-16 12:56:58 +00:00
amercader 2f4cd3a4b0 [#4] Fix logic functions importer 2013-01-15 19:29:17 +00:00
amercader 2bb669af21 [#4] Add owner_org field to schema and form
This should store the owner organization id.

Also added the errors box on the form.
2013-01-10 12:23:01 +00:00
kindly acb17ff3b0 capture errors more cleanly 2013-01-10 10:48:48 +00:00
amercader e49dd94b34 [#4] Remove authorization functions for the publisher profile
The different profiles will be now configured via the harvest source
datasets on CKAN core, so they are no longer needed.
2013-01-09 17:35:47 +00:00
amercader 288e1429a6 [#4] Remove the loading of different authorization profiles
The different profiles will be now configured via the harvest source
datasets on CKAN core, so it is no longer needed.

Also simplify IActions and IAuthFunction hook calls.
2013-01-09 17:32:05 +00:00
amercader 058dcad435 [#4] Minor change on the state field to fix a bug on harvest_source_show 2013-01-09 17:31:30 +00:00
amercader a866445023 [#4] Refactor authorization functions
The authorization functions have been refactored to take into account
both the new organizaton based authorization on CKAN core and the
harvest source datasets.

Basically at the source level, authorization checks are forwarded to the
relevant package auth function (package_create, package_update, etc.)
wich will check for organizations membership, sysadmin, etc.

Also we only use functions available on the plugins toolkit whenever
possible.
2013-01-09 17:26:48 +00:00
amercader 1342463f8a Merge branch '2.0-dataset-sources' into 4-new-auth-for-2.0
Conflicts:
	ckanext/harvest/logic/action/get.py
2013-01-09 11:09:34 +00:00
amercader 6b23082010 Move logic from setup_template_variables to helper functions 2013-01-09 11:07:44 +00:00