ckanext-nswdesignsystem


Nameckanext-nswdesignsystem JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/DataShades/ckanext-nswdesignsystem
SummaryNone
upload_time2024-04-29 16:13:56
maintainerNone
docs_urlNone
authorYan Rudenko
requires_python>=3.8
licenseAGPL
keywords ckan
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Tests](https://github.com/LinkDigital/ckanext-nswdesignsystem/workflows/Tests/badge.svg?branch=main)](https://github.com/LinkDigital/ckanext-nswdesignsystem/actions)

# ckanext-nswdesignsystem

Collection of tools for styling CKAN using [NSW Design System](https://digitalnsw.github.io/nsw-design-system/)


Compatibility with core CKAN versions:

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

## Installation

To install ckanext-nswdesignsystem:

1. Install it via pip:
   ```sh
   pip install ckanext-nswdesignsystem
   ```

1. Add `nswdesignsystem` to the `ckan.plugins` setting in your CKAN
   config file

## Usage

When plugin enabled, visit `/nswdesignsystem/components` URL of the application. It
lists implemented components with the code examples.

![Component demo](/screenshots/demo.png?raw=true)

Components often rely on macros which can be overriden if component requires
customization. Check examples if you need the main macros for the component and
then look at the macro source, to find out, which additional macros it uses.

Some of components use helper functions defined in the curent
extension. Usually these are components that require some default data:
collection of links or content. For example, `footer` macro gets links for
`upper`, `lower`, and `social` sections from `nswdesignsystem_footer_links`
helper. Such helpers should be chained to use links that make a sense for the
particular portal.

Finally, some macros, like `masthead`, can be used either as function:

```jinja2
{{ masthead() }}
```

or using `call` block:

```jinja2
{% call masthead() %}
    {# additional content for masthead #}
{% endcall %}
```


Eventually you can override quite low-level part of the macro/helper/template
structure, so always keep an eye on changelog. If any of the application parts
have backward incompatible changes, it will be mentioned there.

## Config settings

None at present


## Development

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

```sh
git clone https://github.com/DataShades/ckanext-nswdesignsystem.git
cd ckanext-nswdesignsystem
pip install -e.
```

Follow [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/). Namely:

* commit with a new feature start with: `feat: <feature description(without angles)>`
* commit with a bugfix start with: `fix: <bug description(without angles)>`
* commit with anything not important for changelog: `chore: <short message(without angles)>`



## Tests

To run the tests, do:

    pytest


## Releasing a new version of ckanext-nswdesignsystem

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

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

1. Make sure you have the latest version of necessary packages:
   ```sh
   pip install -U twine build git-changelog -r dev-requirements.txt
   ```

1. Update changelog:
   ```sh
   make changelog
   ```

1. Create a source and binary distributions of the new version
   ```sh
   python -m build
   ```

1. Upload the source distribution to PyPI:
   ```sh
   twine upload dist/*
   ```

1. Commit any outstanding changes:
   ```sh
   git commit -a
   git push
   ```

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

       git tag v0.0.1
       git push --tags

## License

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DataShades/ckanext-nswdesignsystem",
    "name": "ckanext-nswdesignsystem",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "CKAN",
    "author": "Yan Rudenko",
    "author_email": "yan.rudenko@linkdigital.com.au",
    "download_url": "https://files.pythonhosted.org/packages/3e/c3/5fd55fed90c92d5449c98309c9d6dd9901deb1d15ff4a7a3929665a572ea/ckanext_nswdesignsystem-0.1.8.tar.gz",
    "platform": null,
    "description": "[![Tests](https://github.com/LinkDigital/ckanext-nswdesignsystem/workflows/Tests/badge.svg?branch=main)](https://github.com/LinkDigital/ckanext-nswdesignsystem/actions)\n\n# ckanext-nswdesignsystem\n\nCollection of tools for styling CKAN using [NSW Design System](https://digitalnsw.github.io/nsw-design-system/)\n\n\nCompatibility with core CKAN versions:\n\n| CKAN version | Compatible? |\n|--------------|-------------|\n| 2.9          | no          |\n| 2.10         | yes         |\n\n## Installation\n\nTo install ckanext-nswdesignsystem:\n\n1. Install it via pip:\n   ```sh\n   pip install ckanext-nswdesignsystem\n   ```\n\n1. Add `nswdesignsystem` to the `ckan.plugins` setting in your CKAN\n   config file\n\n## Usage\n\nWhen plugin enabled, visit `/nswdesignsystem/components` URL of the application. It\nlists implemented components with the code examples.\n\n![Component demo](/screenshots/demo.png?raw=true)\n\nComponents often rely on macros which can be overriden if component requires\ncustomization. Check examples if you need the main macros for the component and\nthen look at the macro source, to find out, which additional macros it uses.\n\nSome of components use helper functions defined in the curent\nextension. Usually these are components that require some default data:\ncollection of links or content. For example, `footer` macro gets links for\n`upper`, `lower`, and `social` sections from `nswdesignsystem_footer_links`\nhelper. Such helpers should be chained to use links that make a sense for the\nparticular portal.\n\nFinally, some macros, like `masthead`, can be used either as function:\n\n```jinja2\n{{ masthead() }}\n```\n\nor using `call` block:\n\n```jinja2\n{% call masthead() %}\n    {# additional content for masthead #}\n{% endcall %}\n```\n\n\nEventually you can override quite low-level part of the macro/helper/template\nstructure, so always keep an eye on changelog. If any of the application parts\nhave backward incompatible changes, it will be mentioned there.\n\n## Config settings\n\nNone at present\n\n\n## Development\n\nTo install ckanext-nswdesignsystem for development, activate your CKAN virtualenv and\ndo:\n\n```sh\ngit clone https://github.com/DataShades/ckanext-nswdesignsystem.git\ncd ckanext-nswdesignsystem\npip install -e.\n```\n\nFollow [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/). Namely:\n\n* commit with a new feature start with: `feat: <feature description(without angles)>`\n* commit with a bugfix start with: `fix: <bug description(without angles)>`\n* commit with anything not important for changelog: `chore: <short message(without angles)>`\n\n\n\n## Tests\n\nTo run the tests, do:\n\n    pytest\n\n\n## Releasing a new version of ckanext-nswdesignsystem\n\nIf ckanext-nswdesignsystem should be available on PyPI you can follow these steps to publish a new version:\n\n1. Update the version number in the `setup.cfg` file. See [PEP\n   440](http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers)\n   for how to choose version numbers.\n\n1. Make sure you have the latest version of necessary packages:\n   ```sh\n   pip install -U twine build git-changelog -r dev-requirements.txt\n   ```\n\n1. Update changelog:\n   ```sh\n   make changelog\n   ```\n\n1. Create a source and binary distributions of the new version\n   ```sh\n   python -m build\n   ```\n\n1. Upload the source distribution to PyPI:\n   ```sh\n   twine upload dist/*\n   ```\n\n1. Commit any outstanding changes:\n   ```sh\n   git commit -a\n   git push\n   ```\n\n1. Tag the new release of the project on GitHub with the version number from\n   the `setup.cfg` file. For example if the version number in `setup.cfg` is\n   0.0.1 then do:\n\n       git tag v0.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.1.8",
    "project_urls": {
        "Homepage": "https://github.com/DataShades/ckanext-nswdesignsystem"
    },
    "split_keywords": [
        "ckan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17d0da1c2595d00a59e868b1e4d355b935f50793e18bfbca930077b325866bc9",
                "md5": "d7600ba2698ca8296376eac33cb937e6",
                "sha256": "8201074833a89c7282dec202efe05444ce5f089652bf598815a314a60cc79b61"
            },
            "downloads": -1,
            "filename": "ckanext_nswdesignsystem-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7600ba2698ca8296376eac33cb937e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 262317,
            "upload_time": "2024-04-29T16:13:54",
            "upload_time_iso_8601": "2024-04-29T16:13:54.812370Z",
            "url": "https://files.pythonhosted.org/packages/17/d0/da1c2595d00a59e868b1e4d355b935f50793e18bfbca930077b325866bc9/ckanext_nswdesignsystem-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ec35fd55fed90c92d5449c98309c9d6dd9901deb1d15ff4a7a3929665a572ea",
                "md5": "acee3beda4758a9ee2ce5562e5f880c1",
                "sha256": "525fd515cc59eaa5b2ad165b3a41e596ec6bd9fbfeecddb99a210f10d84de903"
            },
            "downloads": -1,
            "filename": "ckanext_nswdesignsystem-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "acee3beda4758a9ee2ce5562e5f880c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 204863,
            "upload_time": "2024-04-29T16:13:56",
            "upload_time_iso_8601": "2024-04-29T16:13:56.647366Z",
            "url": "https://files.pythonhosted.org/packages/3e/c3/5fd55fed90c92d5449c98309c9d6dd9901deb1d15ff4a7a3929665a572ea/ckanext_nswdesignsystem-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-29 16:13:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DataShades",
    "github_project": "ckanext-nswdesignsystem",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "ckanext-nswdesignsystem"
}
        
Elapsed time: 0.25815s