ckanext-geodatagov


Nameckanext-geodatagov JSON
Version 0.2.8 PyPI version JSON
download
home_pagehttps://github.com/GSA/ckanext-geodatagov
Summary
upload_time2024-01-24 18:34:26
maintainer
docs_urlNone
authorData.gov
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Github Actions](https://github.com/GSA/ckanext-geodatagov/actions/workflows/test.yml/badge.svg)](https://github.com/GSA/ckanext-geodatagov/actions)
[![PyPI version](https://badge.fury.io/py/ckanext-geodatagov.svg)](https://badge.fury.io/py/ckanext-geodatagov)

# Data.gov  

[Data.gov](http://data.gov) is an open data website created by the [U.S. General Services Administration](https://github.com/GSA/) that is based on two robust open source projects: [CKAN](http://ckan.org) and [WordPress](http://wordpress.org). The data catalog at [catalog.data.gov](catalog.data.gov) is powered by CKAN, while the content seen at [Data.gov](Data.gov) is powered by WordPress.  
        
**For all code, bugs, and feature requests related to Data.gov, see the project wide Data.gov [issue tracker](https://github.com/GSA/data.gov/issues).** 

Currently this repository is only used for source version control on the code for the CKAN extension for geospatial data, but you can see all of the Data.gov relevant repos listed in the [GSA Data.gov README file](https://github.com/GSA/data.gov/blob/master/README.md). 

## CKAN Extension for Geospatial Data

Most Data.gov specific CKAN customizations are contained within this extension, but the extension also provides additional geospatial capabilities.

### Customization

Due to CKAN 2.3 and 2.8 migrations, some features should be removed or moved to the official community versions:
  - [Stop rolling up the extras](https://github.com/GSA/ckanext-geodatagov/issues/178)
  - [Move to the official search by geolocation](https://github.com/GSA/datagov-deploy/issues/2440) (probably sharing our version that has improvements)
  - Do a general analysis of this extension to detect other personalized functionalities that should be discontinued.

### Requirements

Package                                                                | Notes
---------------------------------------------------------------------- | -------------
[ckanext-harvest](https://github.com/ckan/ckanext-harvest/)            | --
[ckanext-spatial](https://github.com/ckan/ckanext-spatial)             | --
[PyZ3950](https://github.com/asl2/PyZ3950)                             | --
[werkzeug](https://github.com/nickumia-reisys/werkzeug)                | This only effects the tests.  For all intents and purposes, this should be tracking [upstream](https://github.com/pallets/werkzeug)

This extension is compatible with these versions of CKAN.

CKAN version | Compatibility
------------ | -------------
<=2.8        | no
2.9          | 0.1.37 (last supported)
2.10         | >=0.2.0

## Tests

All the tests live in the [/ckanext/geodatagov/tests](/ckanext/geodatagov/tests) folder. [Github actions](https://github.com/GSA/ckanext-geodatagov/blob/main/.github/workflows/test.yml) is configured to run the tests against CKAN 2.10 when you open a pull request.

## Using the Docker Dev Environment

### Build Environment

To start environment, run:
```docker-compose build```
```docker-compose up```

CKAN will start at localhost:5000

To shut down environment, run:

```docker-compose down```

To docker exec into the CKAN image, run:

```docker-compose exec app /bin/bash```

### Testing

They follow the guidelines for [testing CKAN
extensions](https://docs.ckan.org/en/2.10/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

### Debugging

We have not determined a good way for most IDE native debugging, however you can use the built in
Python pdb debugger. Simply run `make debug`, which will run docker with an interactive shell.
Add `import pdb; pdb.set_trace()` anywhere you want to start debugging, and if the code is triggered
you should see a command prompt waiting in the shell. Use a pdb cheat sheet when starting to learn
like [this](https://kapeli.com/cheat_sheets/Python_Debugger.docset/Contents/Resources/Documents/index).

When you edit/add/remove code, the server is smart enough to restart. If you are editing logic that is
not part of the webserver (ckan command, etc) then you should be able to run the command after edits
and get the same debugger prompt.
    
### Matrix builds

The existing development environment assumes a full catalog.data.gov test setup. This makes
it difficult to develop and test against new versions of CKAN (or really any
dependency) because everything is tightly coupled and would require us to
upgrade everything at once which doesn't really work. A new make target
`test-new` is introduced with a new docker-compose file.

The "new" 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.10 test

### Command line interface

The following operations can be run from the command line as described underneath::

      geodatagov sitemap-to-s3 [{upload_to_s3}] [{page_size}] [{max_per_page}]
        - Generates sitemap and uploads to s3

      geodatagov db-solr-sync [{dryrun}] [{cleanup_solr}] [{update_solr}]
        - DB Solr sync. 

      geodatagov tracking-update [{start_date}]
        - ckan tracking update with customized options and output

## 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-geodatagov",
    "name": "ckanext-geodatagov",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Data.gov",
    "author_email": "datagovhelp@gsa.gov",
    "download_url": "https://files.pythonhosted.org/packages/89/8e/c7fa590d87ca87d1ddc8be72b897793b9b8a7ab71e689e4429af7872e080/ckanext-geodatagov-0.2.8.tar.gz",
    "platform": null,
    "description": "[![Github Actions](https://github.com/GSA/ckanext-geodatagov/actions/workflows/test.yml/badge.svg)](https://github.com/GSA/ckanext-geodatagov/actions)\n[![PyPI version](https://badge.fury.io/py/ckanext-geodatagov.svg)](https://badge.fury.io/py/ckanext-geodatagov)\n\n# Data.gov  \n\n[Data.gov](http://data.gov) is an open data website created by the [U.S. General Services Administration](https://github.com/GSA/) that is based on two robust open source projects: [CKAN](http://ckan.org) and [WordPress](http://wordpress.org). The data catalog at [catalog.data.gov](catalog.data.gov) is powered by CKAN, while the content seen at [Data.gov](Data.gov) is powered by WordPress.  \n        \n**For all code, bugs, and feature requests related to Data.gov, see the project wide Data.gov [issue tracker](https://github.com/GSA/data.gov/issues).** \n\nCurrently this repository is only used for source version control on the code for the CKAN extension for geospatial data, but you can see all of the Data.gov relevant repos listed in the [GSA Data.gov README file](https://github.com/GSA/data.gov/blob/master/README.md). \n\n## CKAN Extension for Geospatial Data\n\nMost Data.gov specific CKAN customizations are contained within this extension, but the extension also provides additional geospatial capabilities.\n\n### Customization\n\nDue to CKAN 2.3 and 2.8 migrations, some features should be removed or moved to the official community versions:\n  - [Stop rolling up the extras](https://github.com/GSA/ckanext-geodatagov/issues/178)\n  - [Move to the official search by geolocation](https://github.com/GSA/datagov-deploy/issues/2440) (probably sharing our version that has improvements)\n  - Do a general analysis of this extension to detect other personalized functionalities that should be discontinued.\n\n### Requirements\n\nPackage                                                                | Notes\n---------------------------------------------------------------------- | -------------\n[ckanext-harvest](https://github.com/ckan/ckanext-harvest/)            | --\n[ckanext-spatial](https://github.com/ckan/ckanext-spatial)             | --\n[PyZ3950](https://github.com/asl2/PyZ3950)                             | --\n[werkzeug](https://github.com/nickumia-reisys/werkzeug)                | This only effects the tests.  For all intents and purposes, this should be tracking [upstream](https://github.com/pallets/werkzeug)\n\nThis extension is compatible with these versions of CKAN.\n\nCKAN version | Compatibility\n------------ | -------------\n<=2.8        | no\n2.9          | 0.1.37 (last supported)\n2.10         | >=0.2.0\n\n## Tests\n\nAll the tests live in the [/ckanext/geodatagov/tests](/ckanext/geodatagov/tests) folder. [Github actions](https://github.com/GSA/ckanext-geodatagov/blob/main/.github/workflows/test.yml) is configured to run the tests against CKAN 2.10 when you open a pull request.\n\n## Using the Docker Dev Environment\n\n### Build Environment\n\nTo start environment, run:\n```docker-compose build```\n```docker-compose up```\n\nCKAN will start at localhost:5000\n\nTo shut down environment, run:\n\n```docker-compose down```\n\nTo docker exec into the CKAN image, run:\n\n```docker-compose exec app /bin/bash```\n\n### Testing\n\nThey follow the guidelines for [testing CKAN\nextensions](https://docs.ckan.org/en/2.10/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### Debugging\n\nWe have not determined a good way for most IDE native debugging, however you can use the built in\nPython pdb debugger. Simply run `make debug`, which will run docker with an interactive shell.\nAdd `import pdb; pdb.set_trace()` anywhere you want to start debugging, and if the code is triggered\nyou should see a command prompt waiting in the shell. Use a pdb cheat sheet when starting to learn\nlike [this](https://kapeli.com/cheat_sheets/Python_Debugger.docset/Contents/Resources/Documents/index).\n\nWhen you edit/add/remove code, the server is smart enough to restart. If you are editing logic that is\nnot part of the webserver (ckan command, etc) then you should be able to run the command after edits\nand get the same debugger prompt.\n    \n### Matrix builds\n\nThe existing development environment assumes a full catalog.data.gov test setup. This makes\nit difficult to develop and test against new versions of CKAN (or really any\ndependency) because everything is tightly coupled and would require us to\nupgrade everything at once which doesn't really work. A new make target\n`test-new` is introduced with a new docker-compose file.\n\nThe \"new\" 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.10 test\n\n### Command line interface\n\nThe following operations can be run from the command line as described underneath::\n\n      geodatagov sitemap-to-s3 [{upload_to_s3}] [{page_size}] [{max_per_page}]\n        - Generates sitemap and uploads to s3\n\n      geodatagov db-solr-sync [{dryrun}] [{cleanup_solr}] [{update_solr}]\n        - DB Solr sync. \n\n      geodatagov tracking-update [{start_date}]\n        - ckan tracking update with customized options and output\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": "",
    "summary": "",
    "version": "0.2.8",
    "project_urls": {
        "Homepage": "https://github.com/GSA/ckanext-geodatagov"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7417b57d59ac20c4ad58c724a68b52cf3be98fbfd122cbd07455d594ed378686",
                "md5": "c28465bec1e0ccb58cbebf766013cb73",
                "sha256": "51ebdd52c04301b54e83afee8642c55aff22681b58488bd7bfa2211c71ff3fd7"
            },
            "downloads": -1,
            "filename": "ckanext_geodatagov-0.2.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c28465bec1e0ccb58cbebf766013cb73",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 214145,
            "upload_time": "2024-01-24T18:34:24",
            "upload_time_iso_8601": "2024-01-24T18:34:24.468865Z",
            "url": "https://files.pythonhosted.org/packages/74/17/b57d59ac20c4ad58c724a68b52cf3be98fbfd122cbd07455d594ed378686/ckanext_geodatagov-0.2.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "898ec7fa590d87ca87d1ddc8be72b897793b9b8a7ab71e689e4429af7872e080",
                "md5": "7cf74f0fdc889bc5323a1141cb37fe27",
                "sha256": "74e514c9c6fe89abd530770dd0f2b1eeb2dc9856139b13ccdda1c73fa0bf3300"
            },
            "downloads": -1,
            "filename": "ckanext-geodatagov-0.2.8.tar.gz",
            "has_sig": false,
            "md5_digest": "7cf74f0fdc889bc5323a1141cb37fe27",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 178299,
            "upload_time": "2024-01-24T18:34:26",
            "upload_time_iso_8601": "2024-01-24T18:34:26.863288Z",
            "url": "https://files.pythonhosted.org/packages/89/8e/c7fa590d87ca87d1ddc8be72b897793b9b8a7ab71e689e4429af7872e080/ckanext-geodatagov-0.2.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-24 18:34:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GSA",
    "github_project": "ckanext-geodatagov",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ckanext-geodatagov"
}
        
Elapsed time: 0.18349s