Skip to main content

No project description provided

Project description

Tests

ckanext-nswdesignsystem

Collection of tools for styling CKAN using 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:

    pip install ckanext-nswdesignsystem
    
  2. 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

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:

{{ masthead() }}

or using call block:

{% 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:

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

Follow conventional commits specification. 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 for how to choose version numbers.

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

    pip install -U twine build git-changelog -r dev-requirements.txt
    
  3. Update changelog:

    make changelog
    
  4. Create a source and binary distributions of the new version

    python -m build
    
  5. Upload the source distribution to PyPI:

    twine upload dist/*
    
  6. Commit any outstanding changes:

    git commit -a
    git push
    
  7. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanext-nswdesignsystem-0.1.7.tar.gz (202.6 kB view details)

Uploaded Source

Built Distribution

ckanext_nswdesignsystem-0.1.7-py3-none-any.whl (258.9 kB view details)

Uploaded Python 3

File details

Details for the file ckanext-nswdesignsystem-0.1.7.tar.gz.

File metadata

File hashes

Hashes for ckanext-nswdesignsystem-0.1.7.tar.gz
Algorithm Hash digest
SHA256 65a3cb0932dd573e4125440511f44c7e4a0214ab64bf34c80828b48fc0c88aa4
MD5 9b52ef5085d296a7db20141621b87905
BLAKE2b-256 dbd38dee194737d441e5c87c5ebe008061bdd91a2f5e268b1ef4660b121b20b4

See more details on using hashes here.

Provenance

File details

Details for the file ckanext_nswdesignsystem-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for ckanext_nswdesignsystem-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 622606f049d9826c148afc921c42347079741a443c873fd9869c63fad4c7edcb
MD5 97954ef42fc603f543ea1adf2e40e30f
BLAKE2b-256 3b6324accf5bc48aa2415d9c9fec97bbfddc6ffbb51cfb9521b13931d03f6657

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page