No project description provided
Project description
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:
-
Install it via pip:
pip install ckanext-nswdesignsystem
-
Add
nswdesignsystem
to theckan.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.
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:
-
Update the version number in the
setup.cfg
file. See PEP 440 for how to choose version numbers. -
Make sure you have the latest version of necessary packages:
pip install -U twine build git-changelog -r dev-requirements.txt
-
Update changelog:
make changelog
-
Create a source and binary distributions of the new version
python -m build
-
Upload the source distribution to PyPI:
twine upload dist/*
-
Commit any outstanding changes:
git commit -a git push
-
Tag the new release of the project on GitHub with the version number from the
setup.cfg
file. For example if the version number insetup.cfg
is 0.0.1 then do:git tag v0.0.1 git push --tags
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ckanext_nswdesignsystem-0.1.8.post1.tar.gz
.
File metadata
- Download URL: ckanext_nswdesignsystem-0.1.8.post1.tar.gz
- Upload date:
- Size: 244.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f0935a903c9c05955b35b3fe5c19a5efff98d7b2f490690db2a5c9d1e49e49 |
|
MD5 | aeb55c8135054ebc8f3ce1027fed3ee7 |
|
BLAKE2b-256 | 8f6ba8b37f5fd7b7ed2383f8e9dc299b55e276e018cddead9357af989488abe1 |
File details
Details for the file ckanext_nswdesignsystem-0.1.8.post1-py3-none-any.whl
.
File metadata
- Download URL: ckanext_nswdesignsystem-0.1.8.post1-py3-none-any.whl
- Upload date:
- Size: 301.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3021153994a08eea43cab0c799a7cdbe919c996eff025c1b19169aa3f5445b6 |
|
MD5 | 806305fdd73f4645e7f83271099f649e |
|
BLAKE2b-256 | d0793aae86e9c316eb74e33163bfe15e6e7b48dcfbe48e87c28217e846524aaf |