For example, you might want to mention here which versions of CKAN this extension works with.
To install ckanext-mapactiontheme:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-mapactiontheme Python package into your virtual environment:
pip install ckanext-mapactiontheme
Add
mapactiontheme
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/production.ini
).Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
# Allow renaming of 'Group' # (optional, default: Group) ckan.mapactiontheme.group_name = MyGroupName # Allow renaming of 'Group' in plural form # (optional, default: the above suffixed with 's') ckan.mapactiontheme.plural_group_name = MyGroupNames # Show the section to follow datasets # (optional, default: True) ckan.mapactiontheme.show_follows = False # Show the license section # (optional, default: True) ckan.mapactiontheme.show_license = False # Show the entire concept of organizations # (optional, default: True) ckan.mapactiontheme.show_organization = False # Show the social links section # (optional, default: True) ckan.mapactiontheme.show_social = False # Show the groups tab eg in package_read template # (optional, default: True) ckan.mapactiontheme.show_groups_tab = False # Show the activity tab eg in package_read template # (optional, default: True) ckan.mapactiontheme.show_activity_tab = False # The name of the CKAN home page # (optional, default: Home) ckan.mapactiontheme.ckan_home_page_name = Maps and Data # The link for the home page if CKAN is deployed as part of another site # (mandatory) ckan.mapactiontheme.home_page_link = http://mapaction.org # The navigation menu ID of the CKAN site # (mandatory) ckan.mapactiontheme.nav_menu_this_id = 12 # Connect timeout when retrieving content from WordPress API # (optional, default: 3.05) ckan.mapactiontheme.api_connect_timeout = 1 # Read timeout when retrieving content from WordPress API # (optional, default: 3) ckan.mapactiontheme.read_timeout = 27 # URL for current emergencies content # (mandatory) ckan.mapactiontheme.current_emergencies_api = http://www.example.com/api/ # URL for navigation menu content # (mandatory) ckan.mapactiontheme.nav_menu_api = http://www.example.com/api/ # URL for footer widget content # (mandatory) ckan.mapactiontheme.footer_widget_api = http://www.example.com/api/
To install ckanext-mapactiontheme for development, activate your CKAN virtualenv and do:
git clone https://github.com/aptivate/ckanext-mapactiontheme.git cd ckanext-mapactiontheme python setup.py develop pip install -r dev-requirements.txt
To run the tests, do:
nosetests --nologcapture --with-pylons=test.ini
To run the tests and produce a coverage report, first make sure you have
coverage installed in your virtualenv (pip install coverage
) then run:
nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.mapactiontheme --cover-inclusive --cover-erase --cover-tests
ckanext-mapactiontheme should be availabe on PyPI as https://pypi.python.org/pypi/ckanext-mapactiontheme. If that link doesn't work, then you can register the project on PyPI for the first time by following these steps:
Create a source distribution of the project:
python setup.py sdist
Register the project:
python setup.py register
Upload the source distribution to PyPI:
python setup.py sdist upload
Tag the first release of the project on GitHub with the version number from the
setup.py
file. For example if the version number insetup.py
is 0.0.1 then do:git tag 0.0.1 git push --tags
ckanext-mapactiontheme is availabe on PyPI as https://pypi.python.org/pypi/ckanext-mapactiontheme. To publish a new version to PyPI follow these steps:
Update the version number in the
setup.py
file. See PEP 440 for how to choose version numbers.Create a source distribution of the new version:
python setup.py sdist
Upload the source distribution to PyPI:
python setup.py sdist upload
Tag the new release of the project on GitHub with the version number from the
setup.py
file. For example if the version number insetup.py
is 0.0.2 then do:git tag 0.0.2 git push --tags
Copyright (c) 2016 MapAction. Developed by Aptivate.
Development of v1 of this plugin was funded by ECHO.