Metadata-Version: 2.1
Name: udata-ckan
Version: 3.0.2
Summary: CKAN integration for udata
Home-page: https://github.com/opendatateam/udata-ckan
Author: OpenDataTeam
Author-email: udata@opendata.team
License: AGPL
Keywords: udata harvester CKAN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Environment :: Web Environment
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Software Distribution
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Requires-Dist: udata >=5.0.0
Requires-Dist: humanfriendly ==4.18
Provides-Extra: test
Requires-Dist: mock ==3.0.5 ; extra == 'test'
Requires-Dist: pytest ==7.2.1 ; extra == 'test'
Requires-Dist: pytest-flask ==1.2.0 ; extra == 'test'
Requires-Dist: pytest-sugar ==0.9.6 ; extra == 'test'
Requires-Dist: requests-mock ==1.7.0 ; extra == 'test'

CKAN
====

`![Crowdin <https://d322cqt584bo4o.cloudfront.net/udata-ckan/localized.svg>`_](https://crowdin.com/project/udata-ckan)

CKAN integration for uData

Usage
-----

Install the harvester package in you udata environement:

.. code-block:: bash

    pip install udata-ckan
    


The harvester will be automatically available as a backend choice.

Develop
-------

Python dependencies
*******************

Assuming you are in an active virtualenv with `udata` installed and in the current project cloned repository directory, install all dependencies using:

.. code-block:: shell

    pip install -e requirements/develop.pip
    


##CKAN
==== instance

A docker-compose is availbe to start up a CKAN instance if you want to test your harvester on a custom catalog.

Testing
*******

Tests are located into the `tests` folder and be run with:

.. code-block:: shell

    inv test
    


Changelog
=========

3.0.2 (2024-01-25)
------------------

- Use `datetime.utcnow` to make sure to handle utc datetimes `#246 <https://github.com/opendatateam/udata-ckan/pull/246>`_
- Remove `valid_at` on deprecated GeoZones `#248 <https://github.com/opendatateam/udata-ckan/pull/248>`_

3.0.1 (2023-03-17)
------------------

- Use id as remote_id ASAP for better error handling `#239 <https://github.com/opendatateam/udata-ckan/pull/239>`_
- Update mongoDB in CI `#242 <https://github.com/opendatateam/udata-ckan/pull/242>`_
- Refactor tests to mock CKAN results instead of starting a CKAN instance `#245 <https://github.com/opendatateam/udata-ckan/pull/245>`_
- Upgrade CKAN images used in docker-compose `#244 <https://github.com/opendatateam/udata-ckan/pull/244>`_
- Fix resource.published that is not needed anymore `#243 <https://github.com/opendatateam/udata-ckan/pull/243>`_

3.0.0 (2022-11-14)
------------------

- :warning: **Breaking change** Use harvest dynamic field introduced in udata 5 `#227 <https://github.com/opendatateam/udata-ckan/pull/227>`_

2.0.1 (2022-09-01)
------------------

- Replace mongo legacy image in CI `#219 <https://github.com/opendatateam/udata-ckan/pull/219>`_
- Make revision_id optional to match latest CKAN versions `#220 <https://github.com/opendatateam/udata-ckan/pull/220>`_

2.0.0 (2020-03-11)
------------------

- Migrate to python3 🐍 `#110 <https://github.com/opendatateam/udata-ckan/pull/110>`_

1.3.0 (2020-01-06)
------------------

- DKAN support `#129 <https://github.com/opendatateam/udata-ckan/pull/129>`_

1.2.3 (2019-05-29)
------------------

- Always fill extras.remote_url `#103 <https://github.com/opendatateam/udata-ckan/pull/103>`_

1.2.2 (2019-05-24)
------------------

- Max out package_search rows limit `#100 <https://github.com/opendatateam/udata-ckan/pull/98>`_

1.2.1 (2019-05-24)
------------------

- Fix filetype (always remote) `#98 <https://github.com/opendatateam/udata-ckan/pull/98>`_

1.2.0 (2018-10-02)
------------------

- Support both inclusion and exclusion filters `#42 <https://github.com/opendatateam/udata-ckan/pull/42>`_
- Localization support `#43 <https://github.com/opendatateam/udata-ckan/pull/43>`_
- Test the minimum accepted CKAN dataset payload and make the `extras` property optional `#57 <https://github.com/opendatateam/udata-ckan/pull/57>`_
- Improved error handling (support details in JSON responses, also handle raw quoted strings and HTML) `#56 <https://github.com/opendatateam/udata-ckan/pull/56>`_

1.1.1 (2018-06-15)
------------------

- Only store `url` field in `remote_url` extra if this is an URL otherwise store it in `ckan:source` `#30 <https://github.com/opendatateam/udata-ckan/pull/30>`_
- Properly handle geometry errors `#31 <https://github.com/opendatateam/udata-ckan/pull/31>`_
- Improve extras parsing `#32 <https://github.com/opendatateam/udata-ckan/pull/32>`_:
  - Skip empty extras
  - Parse update frequencies as RDF URI or udata frequency identifier
  - Parse `spatial-text` matching a known zone name or slug
  - Store unknown `spatial-uri`, `spatial-text` and `frequency` as `ckan:spatial-uri`, `ckan:spatial-text` and `ckan:frequency`

1.1.0 (2018-06-06)
------------------

- Test against a real CKAN instance `#23 <https://github.com/opendatateam/udata-ckan/pull/23>`_
- Allows to filter on Organizations and Tags `#26 <https://github.com/opendatateam/udata-ckan/pull/26>`_
- Register `ckan:` prefixed extras `#28 <https://github.com/opendatateam/udata-ckan/pull/28>`_

1.0.1 (2018-03-13)
------------------

- Fix packaging `#2 <https://github.com/opendatateam/udata-ckan/pull/2>`_
- Make use of `udata pytest plugin <opendatateam/udata#1400>`_ `#3 <https://github.com/opendatateam/udata-ckan/pull/3>`_
- Enable the `ckan` plugin in test (plugin needs to be enabled to use the harvester) `#8 <https://github.com/opendatateam/udata-ckan/pull/8>`_

1.0.0 (2017-10-20)
------------------

- Initial release

