ckanext-datajson


Nameckanext-datajson JSON
Version 0.1.23 PyPI version JSON
download
home_pagehttps://github.com/GSA/ckanext-datajson
SummaryCKAN extension to generate /data.json
upload_time2023-12-27 16:35:04
maintainer
docs_urlNone
authorData.gov
requires_python
licensePublic Domain
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ckanext-datajson

[![Github Actions](https://github.com/GSA/ckanext-datajson/actions/workflows/test.yml/badge.svg)](https://github.com/GSA/ckanext-datajson/actions)
[![PyPI version](https://badge.fury.io/py/ckanext-datajson.svg)](https://badge.fury.io/py/ckanext-datajson)

A CKAN extension containing plugins `datajson`.
First is used by http://catalog.data.gov/ to harvest data sources
from a remote /data.json file according to the U.S. Project
Open Data metadata specification (https://resources.data.gov/schemas/dcat-us/v1.1/).

Plugin `datajson` provides a harvester to import datasets from other
remote /data.json files. See below for setup instructions.

And the plugin also provides a new view to validate /data.json files
at http://ckanhostname/dcat-us/validator.


## Features

- [:heavy_check_mark:] **datajson** provides data.json export and DCAT-US metadata UI integration
  - Read more about [`datajson`](docs/datajson.md)
- [:heavy_check_mark:] **datajson_harvest** extends [ckanext-harvest](https://github.com/ckan/ckanext-harvest/)
to collect metadata fromremote data.json sources
  - Read more about [`datajson_harvest`](docs/datajson_harvest.md)
- [:warning:] **cmsdatanav_harvest** extends [ckanext-harvest](https://github.com/ckan/ckanext-harvest/)
to collect metadata from for the CMS Data Navigator catalog
- [:heavy_check_mark:] **datajson_validator** provides a web form to validate dcat-us metadata data.json compliance.
  - Read more about [`datajson_validator`](docs/datajson_validator.md)


## Usage

### Requirements

All requirements are tracked `setup.py` when possible.  Some CKAN extensions are not on PyPI, so they 
(and their dependencies) must be tracked in `requirements.txt`.
- [ckanext-harvest](https://github.com/ckan/ckanext-harvest/)

CKAN version   | Compatibility
-------------- | -------------
<=2.7          | :x:
2.8            | :warning:
2.9.5          | :heavy_check_mark:
2.9.6          | :heavy_check_mark:

### Installation

To install, activate your CKAN virtualenv, install dependencies, and
install the module in develop mode, which just puts the directory in your
Python path.

	. path/to/pyenv/bin/activate
	pip install -r requirements.txt
	python setup.py develop

Then in your CKAN .ini file, add `datajson`
to your ckan.plugins line:

	ckan.plugins = (other plugins here...) datajson

That's the plugin for /data.json output. To make the harvester available,
also add:

	ckan.plugins = (other plugins here...) harvest datajson_harvest
	
To make the datajson validator route and web form available, also add:

	ckan.plugins = (other plugins here...) datajson_validator


## Development

### Setup

Build the docker containers.

    $ make build

Start the docker containers.

    $ make up

CKAN will start at [localhost:5000](http://localhost:5000/).

Clean up any containers and volumes.

    $ make clean

Open a shell to run commands in the container.

    $ docker-compose exec app /bin/bash

If you're unfamiliar with docker-compose, see our
[cheatsheet](https://github.com/GSA/datagov-deploy/wiki/Docker-Best-Practices#cheatsheet)
and the [official docs](https://docs.docker.com/compose/reference/).

For additional make targets, see the help.

    $ make help


### Testing

They follow the guidelines for [testing CKAN
extensions](https://docs.ckan.org/en/2.9/extensions/testing-extensions.html#testing-extensions).

To run the extension tests, start the containers with `make up`, then:

    $ make test

Lint the code.

    $ make lint


### Matrix builds

The test development environment drops as many dependencies as possible. It is
not meant to have feature parity with
[GSA/catalog.data.gov](https://github.com/GSA/catalog.data.gov/). Tests should
mock external dependencies where possible.

In order to support multiple versions of CKAN, or even upgrade to new versions
of CKAN, we support development and testing through the `CKAN_VERSION`
environment variable.

    $ make CKAN_VERSION=2.9.5 test
    $ make CKAN_VERSION=2.9 test
    
Note: When testing patch versions of CKAN, the services may not have patch releases.
So, take note of the `SERVICES_VERSION` variable which tracks the minor release to 
pull for the `db` and `solr` images.


## Credit / Copying

Original work written by the HealthData.gov team. It has been modified in support of Data.gov.

As a work of the United States Government, this package is in the public
domain within the United States. Additionally, we waive copyright and
related rights in the work worldwide through the CC0 1.0 Universal
public domain dedication (which can be found at http://creativecommons.org/publicdomain/zero/1.0/).

## Ways to Contribute
We're so glad you're thinking about contributing to ckanext-datajson!

Before contributing to ckanext-datajson we encourage you to read our
[CONTRIBUTING](CONTRIBUTING.md) guide, our [LICENSE](LICENSE.md), and our README
(you are here), all of which should be in this repository. If you have any
questions, you can email the Data.gov team at
[datagov@gsa.gov](mailto:datagov@gsa.gov).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GSA/ckanext-datajson",
    "name": "ckanext-datajson",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Data.gov",
    "author_email": "datagovhelp@gsa.gov",
    "download_url": "https://files.pythonhosted.org/packages/85/9e/79030b2b6374e098590b7b7b5fcb6e1ea1047661dd92d86c0594ba887454/ckanext-datajson-0.1.23.tar.gz",
    "platform": null,
    "description": "# ckanext-datajson\n\n[![Github Actions](https://github.com/GSA/ckanext-datajson/actions/workflows/test.yml/badge.svg)](https://github.com/GSA/ckanext-datajson/actions)\n[![PyPI version](https://badge.fury.io/py/ckanext-datajson.svg)](https://badge.fury.io/py/ckanext-datajson)\n\nA CKAN extension containing plugins `datajson`.\nFirst is used by http://catalog.data.gov/ to harvest data sources\nfrom a remote /data.json file according to the U.S. Project\nOpen Data metadata specification (https://resources.data.gov/schemas/dcat-us/v1.1/).\n\nPlugin `datajson` provides a harvester to import datasets from other\nremote /data.json files. See below for setup instructions.\n\nAnd the plugin also provides a new view to validate /data.json files\nat http://ckanhostname/dcat-us/validator.\n\n\n## Features\n\n- [:heavy_check_mark:] **datajson** provides data.json export and DCAT-US metadata UI integration\n  - Read more about [`datajson`](docs/datajson.md)\n- [:heavy_check_mark:] **datajson_harvest** extends [ckanext-harvest](https://github.com/ckan/ckanext-harvest/)\nto collect metadata fromremote data.json sources\n  - Read more about [`datajson_harvest`](docs/datajson_harvest.md)\n- [:warning:] **cmsdatanav_harvest** extends [ckanext-harvest](https://github.com/ckan/ckanext-harvest/)\nto collect metadata from for the CMS Data Navigator catalog\n- [:heavy_check_mark:] **datajson_validator** provides a web form to validate dcat-us metadata data.json compliance.\n  - Read more about [`datajson_validator`](docs/datajson_validator.md)\n\n\n## Usage\n\n### Requirements\n\nAll requirements are tracked `setup.py` when possible.  Some CKAN extensions are not on PyPI, so they \n(and their dependencies) must be tracked in `requirements.txt`.\n- [ckanext-harvest](https://github.com/ckan/ckanext-harvest/)\n\nCKAN version   | Compatibility\n-------------- | -------------\n<=2.7          | :x:\n2.8            | :warning:\n2.9.5          | :heavy_check_mark:\n2.9.6          | :heavy_check_mark:\n\n### Installation\n\nTo install, activate your CKAN virtualenv, install dependencies, and\ninstall the module in develop mode, which just puts the directory in your\nPython path.\n\n\t. path/to/pyenv/bin/activate\n\tpip install -r requirements.txt\n\tpython setup.py develop\n\nThen in your CKAN .ini file, add `datajson`\nto your ckan.plugins line:\n\n\tckan.plugins = (other plugins here...) datajson\n\nThat's the plugin for /data.json output. To make the harvester available,\nalso add:\n\n\tckan.plugins = (other plugins here...) harvest datajson_harvest\n\t\nTo make the datajson validator route and web form available, also add:\n\n\tckan.plugins = (other plugins here...) datajson_validator\n\n\n## Development\n\n### Setup\n\nBuild the docker containers.\n\n    $ make build\n\nStart the docker containers.\n\n    $ make up\n\nCKAN will start at [localhost:5000](http://localhost:5000/).\n\nClean up any containers and volumes.\n\n    $ make clean\n\nOpen a shell to run commands in the container.\n\n    $ docker-compose exec app /bin/bash\n\nIf you're unfamiliar with docker-compose, see our\n[cheatsheet](https://github.com/GSA/datagov-deploy/wiki/Docker-Best-Practices#cheatsheet)\nand the [official docs](https://docs.docker.com/compose/reference/).\n\nFor additional make targets, see the help.\n\n    $ make help\n\n\n### Testing\n\nThey follow the guidelines for [testing CKAN\nextensions](https://docs.ckan.org/en/2.9/extensions/testing-extensions.html#testing-extensions).\n\nTo run the extension tests, start the containers with `make up`, then:\n\n    $ make test\n\nLint the code.\n\n    $ make lint\n\n\n### Matrix builds\n\nThe test development environment drops as many dependencies as possible. It is\nnot meant to have feature parity with\n[GSA/catalog.data.gov](https://github.com/GSA/catalog.data.gov/). Tests should\nmock external dependencies where possible.\n\nIn order to support multiple versions of CKAN, or even upgrade to new versions\nof CKAN, we support development and testing through the `CKAN_VERSION`\nenvironment variable.\n\n    $ make CKAN_VERSION=2.9.5 test\n    $ make CKAN_VERSION=2.9 test\n    \nNote: When testing patch versions of CKAN, the services may not have patch releases.\nSo, take note of the `SERVICES_VERSION` variable which tracks the minor release to \npull for the `db` and `solr` images.\n\n\n## Credit / Copying\n\nOriginal work written by the HealthData.gov team. It has been modified in support of Data.gov.\n\nAs a work of the United States Government, this package is in the public\ndomain within the United States. Additionally, we waive copyright and\nrelated rights in the work worldwide through the CC0 1.0 Universal\npublic domain dedication (which can be found at http://creativecommons.org/publicdomain/zero/1.0/).\n\n## Ways to Contribute\nWe're so glad you're thinking about contributing to ckanext-datajson!\n\nBefore contributing to ckanext-datajson we encourage you to read our\n[CONTRIBUTING](CONTRIBUTING.md) guide, our [LICENSE](LICENSE.md), and our README\n(you are here), all of which should be in this repository. If you have any\nquestions, you can email the Data.gov team at\n[datagov@gsa.gov](mailto:datagov@gsa.gov).\n\n\n",
    "bugtrack_url": null,
    "license": "Public Domain",
    "summary": "CKAN extension to generate /data.json",
    "version": "0.1.23",
    "project_urls": {
        "Homepage": "https://github.com/GSA/ckanext-datajson"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f52b0667b8970be671e1941872ce0c45a601e664f97550c51e0286924b69b752",
                "md5": "08c1927b8e360a4ac60444d7d2a7a3da",
                "sha256": "374d3b385f22bd3de968a1457cac97ac91c1668ac178be30eb7054242b4f147e"
            },
            "downloads": -1,
            "filename": "ckanext_datajson-0.1.23-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "08c1927b8e360a4ac60444d7d2a7a3da",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 89888,
            "upload_time": "2023-12-27T16:35:01",
            "upload_time_iso_8601": "2023-12-27T16:35:01.666684Z",
            "url": "https://files.pythonhosted.org/packages/f5/2b/0667b8970be671e1941872ce0c45a601e664f97550c51e0286924b69b752/ckanext_datajson-0.1.23-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "859e79030b2b6374e098590b7b7b5fcb6e1ea1047661dd92d86c0594ba887454",
                "md5": "e3d081992b13d5d0e13bf2e9f0a230f2",
                "sha256": "058a5656fd77e2c917a4c4352df0bfdf3a114ee1cbc35949c2f0f0cec573af98"
            },
            "downloads": -1,
            "filename": "ckanext-datajson-0.1.23.tar.gz",
            "has_sig": false,
            "md5_digest": "e3d081992b13d5d0e13bf2e9f0a230f2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 71350,
            "upload_time": "2023-12-27T16:35:04",
            "upload_time_iso_8601": "2023-12-27T16:35:04.033527Z",
            "url": "https://files.pythonhosted.org/packages/85/9e/79030b2b6374e098590b7b7b5fcb6e1ea1047661dd92d86c0594ba887454/ckanext-datajson-0.1.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-27 16:35:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GSA",
    "github_project": "ckanext-datajson",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ckanext-datajson"
}
        
Elapsed time: 0.21564s