ckan / ckanext-spatial

Geospatial extension for CKAN
http://docs.ckan.org/projects/ckanext-spatial
126 stars 193 forks source link

Dependency version conflict with PyCSW #200

Open rossjones opened 6 years ago

rossjones commented 6 years ago

Depending on the version of PyCSW you install, you may encounter a problem running the ckan-pycsw paster command with:

pkg_resources.ContextualVersionConflict:
 (OWSLib 0.8.6 (/usr/lib/venv/lib/python2.7/site-packages), 
Requirement.parse('OWSLib==0.16.0'), set(['pycsw']))

This is because ckanext-spatial requires 0.8.6 whereas pycsw after a certain version uses more recent OWSLib.


I've worked around this by installing a newer OWSLib, not yet sure what effect it has on the running of ckanext-spatial.

amercader commented 6 years ago

I'm pretty sure we can upgrade the ckanext-spatial requirement to align it with pycsw, but I haven't work on the harvesters for a long time. Do you think there will be an issue @tomkralidis? ie are there major API changes from that version?

tomkralidis commented 6 years ago

@amercader there’s nothing breaking in OWSLib AFAICT.

rossjones commented 6 years ago

It does seem to be okay in actual use, but the tests do break when I update owslib, but I think it's probably the test being wrong.

======================================================================
ERROR: ckanext.spatial.tests.test_harvest.TestHarvest.test_harvest_fields_service
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/build/rossjones/ckanext-spatial/ckanext/spatial/tests/test_harvest.py", line 268, in test_harvest_fields_service
    if not resource[key] == value:
KeyError: 'verified'
----------------------------------------------------------------------

The problem is likely at https://github.com/ckan/ckanext-spatial/blob/master/ckanext/spatial/harvesters/base.py#L386 (it only adds the verified field when true) .. but I'm afraid I'm out of time to dig deeper.

Maybe a Good for contribution tag?

thejuliekramer commented 4 years ago

@amercader @tomkralidis @rossjones is there any update to this? We are trying to use the most updated version of spatial but some of our imports fail because OWSLib is not up to date