ckanext-relationship


Nameckanext-relationship JSON
Version 0.2.10 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-10-29 14:33:02
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseAGPL
keywords ckan
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Tests](https://github.com/DataShades/ckanext-relationship/actions/workflows/test.yml/badge.svg)](https://github.com/DataShades/ckanext-relationship/actions/workflows/test.yml)

# ckanext-relationship

The extension adds an additional table to the database that stores relationships between
entities in the form of triples (subject_id, object_id, relation_type). The
relation_type parameter sets the type of relationship: peer-to-peer (related_to <=>
related_to) and subordinate (child_of <=> parent_of). Adding, deleting and getting a
list of relationships between entities is carried out using actions (relation_create,
relation_delete, relations_list). The description of the types of relationships between
entities is carried out in the entity schema in the form:

```yaml
- field_name: related_projects
  label: Related Projects
  preset: related_entity
  current_entity: package
  current_entity_type: dataset
  related_entity: package
  related_entity_type: project
  relation_type: related_to
  multiple: true
  updatable_only: false
  required: false
```

Entity (current_entity, related_entity) - one of three options: package, organization,
group.

Entity type (current_entity_type, related_entity_type) - entity customized using
ckanext-scheming.

Multiple - toggle the ability to add multiple related entities.

Updatable_only - toggle the ability to add only entities that can be updated by the
current user.

## Requirements

**TODO:** For example, you might want to mention here which versions of CKAN this
extension works with.

If your extension works across different versions you can add the following table:

Compatibility with core CKAN versions:

| CKAN version    | Compatible? |
|-----------------|-------------|
| 2.9             | yes         |
| 2.10            | yes         |

Suggested values:

* "yes"
* "not tested" - I can't think of a reason why it wouldn't work
* "not yet" - there is an intention to get it working
* "no"


## Installation

**TODO:** Add any additional install steps to the list below.
   For example installing any non-Python dependencies or adding any required
   config settings.

To install ckanext-relationship:

1. Activate your CKAN virtual environment, for example:

     . /usr/lib/ckan/default/bin/activate

2. Clone the source and install it on the virtualenv

    git clone https://github.com//ckanext-relationship.git
    cd ckanext-relationship
    pip install -e .
	pip install -r requirements.txt

3. Add `relationship` to the `ckan.plugins` setting in your CKAN
   config file (by default the config file is located at
   `/etc/ckan/default/ckan.ini`).

4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:

     sudo service apache2 reload


## Config settings

None at present

**TODO:** Document any optional config settings here. For example:

	# The minimum number of hours to wait before re-checking a resource
	# (optional, default: 24).
	ckanext.relationship.some_setting = some_default_value


## Developer installation

To install ckanext-relationship for development, activate your CKAN virtualenv and
do:

    git clone https://github.com//ckanext-relationship.git
    cd ckanext-relationship
    python setup.py develop
    pip install -r dev-requirements.txt


## Tests

To run the tests, do:

    pytest --ckan-ini=test.ini


## Releasing a new version of ckanext-relationship

If ckanext-relationship should be available on PyPI you can follow these steps to publish a new version:

1. Update the version number in the `setup.py` file. See [PEP 440](http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers) for how to choose version numbers.

2. Make sure you have the latest version of necessary packages:

    pip install --upgrade setuptools wheel twine

3. Create a source and binary distributions of the new version:

       python setup.py sdist bdist_wheel && twine check dist/*

   Fix any errors you get.

4. Upload the source distribution to PyPI:

       twine upload dist/*

5. Commit any outstanding changes:

       git commit -a
       git push

6. Tag the new release of the project on GitHub with the version number from
   the `setup.py` file. For example if the version number in `setup.py` is
   0.0.1 then do:

       git tag 0.0.1
       git push --tags

## License

[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ckanext-relationship",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "DataShades <datashades@linkdigital.com.au>",
    "keywords": "CKAN",
    "author": null,
    "author_email": "DataShades <datashades@linkdigital.com.au>, Oleksandr Ivaniuk <oleksandr.ivaniuk@linkdigital.com.au>",
    "download_url": "https://files.pythonhosted.org/packages/86/7a/c904ad244dc5c696cb60d411760264b0b1003d77638122124009f6d6cbff/ckanext_relationship-0.2.10.tar.gz",
    "platform": null,
    "description": "[![Tests](https://github.com/DataShades/ckanext-relationship/actions/workflows/test.yml/badge.svg)](https://github.com/DataShades/ckanext-relationship/actions/workflows/test.yml)\n\n# ckanext-relationship\n\nThe extension adds an additional table to the database that stores relationships between\nentities in the form of triples (subject_id, object_id, relation_type). The\nrelation_type parameter sets the type of relationship: peer-to-peer (related_to <=>\nrelated_to) and subordinate (child_of <=> parent_of). Adding, deleting and getting a\nlist of relationships between entities is carried out using actions (relation_create,\nrelation_delete, relations_list). The description of the types of relationships between\nentities is carried out in the entity schema in the form:\n\n```yaml\n- field_name: related_projects\n  label: Related Projects\n  preset: related_entity\n  current_entity: package\n  current_entity_type: dataset\n  related_entity: package\n  related_entity_type: project\n  relation_type: related_to\n  multiple: true\n  updatable_only: false\n  required: false\n```\n\nEntity (current_entity, related_entity) - one of three options: package, organization,\ngroup.\n\nEntity type (current_entity_type, related_entity_type) - entity customized using\nckanext-scheming.\n\nMultiple - toggle the ability to add multiple related entities.\n\nUpdatable_only - toggle the ability to add only entities that can be updated by the\ncurrent user.\n\n## Requirements\n\n**TODO:** For example, you might want to mention here which versions of CKAN this\nextension works with.\n\nIf your extension works across different versions you can add the following table:\n\nCompatibility with core CKAN versions:\n\n| CKAN version    | Compatible? |\n|-----------------|-------------|\n| 2.9             | yes         |\n| 2.10            | yes         |\n\nSuggested values:\n\n* \"yes\"\n* \"not tested\" - I can't think of a reason why it wouldn't work\n* \"not yet\" - there is an intention to get it working\n* \"no\"\n\n\n## Installation\n\n**TODO:** Add any additional install steps to the list below.\n   For example installing any non-Python dependencies or adding any required\n   config settings.\n\nTo install ckanext-relationship:\n\n1. Activate your CKAN virtual environment, for example:\n\n     . /usr/lib/ckan/default/bin/activate\n\n2. Clone the source and install it on the virtualenv\n\n    git clone https://github.com//ckanext-relationship.git\n    cd ckanext-relationship\n    pip install -e .\n\tpip install -r requirements.txt\n\n3. Add `relationship` to the `ckan.plugins` setting in your CKAN\n   config file (by default the config file is located at\n   `/etc/ckan/default/ckan.ini`).\n\n4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:\n\n     sudo service apache2 reload\n\n\n## Config settings\n\nNone at present\n\n**TODO:** Document any optional config settings here. For example:\n\n\t# The minimum number of hours to wait before re-checking a resource\n\t# (optional, default: 24).\n\tckanext.relationship.some_setting = some_default_value\n\n\n## Developer installation\n\nTo install ckanext-relationship for development, activate your CKAN virtualenv and\ndo:\n\n    git clone https://github.com//ckanext-relationship.git\n    cd ckanext-relationship\n    python setup.py develop\n    pip install -r dev-requirements.txt\n\n\n## Tests\n\nTo run the tests, do:\n\n    pytest --ckan-ini=test.ini\n\n\n## Releasing a new version of ckanext-relationship\n\nIf ckanext-relationship should be available on PyPI you can follow these steps to publish a new version:\n\n1. Update the version number in the `setup.py` file. See [PEP 440](http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers) for how to choose version numbers.\n\n2. Make sure you have the latest version of necessary packages:\n\n    pip install --upgrade setuptools wheel twine\n\n3. Create a source and binary distributions of the new version:\n\n       python setup.py sdist bdist_wheel && twine check dist/*\n\n   Fix any errors you get.\n\n4. Upload the source distribution to PyPI:\n\n       twine upload dist/*\n\n5. Commit any outstanding changes:\n\n       git commit -a\n       git push\n\n6. Tag the new release of the project on GitHub with the version number from\n   the `setup.py` file. For example if the version number in `setup.py` is\n   0.0.1 then do:\n\n       git tag 0.0.1\n       git push --tags\n\n## License\n\n[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)\n",
    "bugtrack_url": null,
    "license": "AGPL",
    "summary": null,
    "version": "0.2.10",
    "project_urls": {
        "Homepage": "https://github.com/DataShades/ckanext-relationship"
    },
    "split_keywords": [
        "ckan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89a344dbd0ecfca869cbe08a05ed649468a8c0a6ffb9a1cfa60f55dcaf533cfa",
                "md5": "98ea678f9935b679580a4bbe3f79bbbd",
                "sha256": "ace1e605af6430ca950e34273ca97d359139fc386fde771af2746990e320e53d"
            },
            "downloads": -1,
            "filename": "ckanext_relationship-0.2.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "98ea678f9935b679580a4bbe3f79bbbd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 41003,
            "upload_time": "2024-10-29T14:33:00",
            "upload_time_iso_8601": "2024-10-29T14:33:00.829627Z",
            "url": "https://files.pythonhosted.org/packages/89/a3/44dbd0ecfca869cbe08a05ed649468a8c0a6ffb9a1cfa60f55dcaf533cfa/ckanext_relationship-0.2.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "867ac904ad244dc5c696cb60d411760264b0b1003d77638122124009f6d6cbff",
                "md5": "fc74debde6421e0df4659fbaad26d137",
                "sha256": "896c35969feaf46d116c8158a422df32d397513322243d147fbc5000370585ef"
            },
            "downloads": -1,
            "filename": "ckanext_relationship-0.2.10.tar.gz",
            "has_sig": false,
            "md5_digest": "fc74debde6421e0df4659fbaad26d137",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 36730,
            "upload_time": "2024-10-29T14:33:02",
            "upload_time_iso_8601": "2024-10-29T14:33:02.671723Z",
            "url": "https://files.pythonhosted.org/packages/86/7a/c904ad244dc5c696cb60d411760264b0b1003d77638122124009f6d6cbff/ckanext_relationship-0.2.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 14:33:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DataShades",
    "github_project": "ckanext-relationship",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "ckanext-relationship"
}
        
Elapsed time: 0.86422s