1 |
d67246b5
|
Serghei MIHAI
|
.. You should enable this project on travis-ci.org and coveralls.io to make
|
2 |
|
|
these badges work. The necessary Travis and Coverage config files have been
|
3 |
|
|
generated for you.
|
4 |
|
|
|
5 |
|
|
.. image:: https://travis-ci.org//ckanext-ozwillo_theme.svg?branch=master
|
6 |
|
|
:target: https://travis-ci.org//ckanext-ozwillo_theme
|
7 |
|
|
|
8 |
|
|
.. image:: https://coveralls.io/repos//ckanext-ozwillo_theme/badge.png?branch=master
|
9 |
|
|
:target: https://coveralls.io/r//ckanext-ozwillo_theme?branch=master
|
10 |
|
|
|
11 |
|
|
.. image:: https://pypip.in/download/ckanext-ozwillo_theme/badge.svg
|
12 |
|
|
:target: https://pypi.python.org/pypi//ckanext-ozwillo_theme/
|
13 |
|
|
:alt: Downloads
|
14 |
|
|
|
15 |
|
|
.. image:: https://pypip.in/version/ckanext-ozwillo_theme/badge.svg
|
16 |
|
|
:target: https://pypi.python.org/pypi/ckanext-ozwillo_theme/
|
17 |
|
|
:alt: Latest Version
|
18 |
|
|
|
19 |
|
|
.. image:: https://pypip.in/py_versions/ckanext-ozwillo_theme/badge.svg
|
20 |
|
|
:target: https://pypi.python.org/pypi/ckanext-ozwillo_theme/
|
21 |
|
|
:alt: Supported Python versions
|
22 |
|
|
|
23 |
|
|
.. image:: https://pypip.in/status/ckanext-ozwillo_theme/badge.svg
|
24 |
|
|
:target: https://pypi.python.org/pypi/ckanext-ozwillo_theme/
|
25 |
|
|
:alt: Development Status
|
26 |
|
|
|
27 |
|
|
.. image:: https://pypip.in/license/ckanext-ozwillo_theme/badge.svg
|
28 |
|
|
:target: https://pypi.python.org/pypi/ckanext-ozwillo_theme/
|
29 |
|
|
:alt: License
|
30 |
|
|
|
31 |
|
|
=============
|
32 |
|
|
ckanext-ozwillo_theme
|
33 |
|
|
=============
|
34 |
|
|
|
35 |
|
|
.. Put a description of your extension here:
|
36 |
|
|
What does it do? What features does it have?
|
37 |
|
|
Consider including some screenshots or embedding a video!
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
------------
|
41 |
|
|
Requirements
|
42 |
|
|
------------
|
43 |
|
|
|
44 |
|
|
For example, you might want to mention here which versions of CKAN this
|
45 |
|
|
extension works with.
|
46 |
|
|
|
47 |
e4140c02
|
Serghei MIHAI
|
pip install -r dev-requirements.txt
|
48 |
|
|
|
49 |
14fbb44a
|
Serghei MIHAI
|
The configuration variable ``ckanext.ozwillo_theme.plugin.ozwillo_url`` must be
|
50 |
|
|
set(for example to https://ozwillo-preprod.eu)
|
51 |
|
|
|
52 |
cb0e91e4
|
Serghei MIHAI
|
The configuration variable ``ckanext.ozwillo_theme.plugin.ozwillo_portal_url``
|
53 |
|
|
must be set(for example to https://portal.ozwillo-preprod.eu)
|
54 |
d67246b5
|
Serghei MIHAI
|
|
55 |
|
|
------------
|
56 |
|
|
Installation
|
57 |
|
|
------------
|
58 |
|
|
|
59 |
|
|
.. Add any additional install steps to the list below.
|
60 |
|
|
For example installing any non-Python dependencies or adding any required
|
61 |
|
|
config settings.
|
62 |
|
|
|
63 |
|
|
To install ckanext-ozwillo_theme:
|
64 |
|
|
|
65 |
|
|
1. Activate your CKAN virtual environment, for example::
|
66 |
|
|
|
67 |
|
|
. /usr/lib/ckan/default/bin/activate
|
68 |
|
|
|
69 |
|
|
2. Install the ckanext-ozwillo_theme Python package into your virtual environment::
|
70 |
|
|
|
71 |
|
|
pip install ckanext-ozwillo_theme
|
72 |
|
|
|
73 |
|
|
3. Add ``ozwillo_theme`` to the ``ckan.plugins`` setting in your CKAN
|
74 |
|
|
config file (by default the config file is located at
|
75 |
|
|
``/etc/ckan/default/production.ini``).
|
76 |
|
|
|
77 |
|
|
4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::
|
78 |
|
|
|
79 |
|
|
sudo service apache2 reload
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
---------------
|
83 |
|
|
Config Settings
|
84 |
|
|
---------------
|
85 |
|
|
|
86 |
|
|
Document any optional config settings here. For example::
|
87 |
|
|
|
88 |
|
|
# The minimum number of hours to wait before re-checking a resource
|
89 |
|
|
# (optional, default: 24).
|
90 |
|
|
ckanext.ozwillo_theme.some_setting = some_default_value
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
------------------------
|
94 |
|
|
Development Installation
|
95 |
|
|
------------------------
|
96 |
|
|
|
97 |
|
|
To install ckanext-ozwillo_theme for development, activate your CKAN virtualenv and
|
98 |
|
|
do::
|
99 |
|
|
|
100 |
|
|
git clone https://github.com//ckanext-ozwillo_theme.git
|
101 |
|
|
cd ckanext-ozwillo_theme
|
102 |
|
|
python setup.py develop
|
103 |
|
|
pip install -r dev-requirements.txt
|
104 |
|
|
|
105 |
|
|
|
106 |
|
|
-----------------
|
107 |
|
|
Running the Tests
|
108 |
|
|
-----------------
|
109 |
|
|
|
110 |
|
|
To run the tests, do::
|
111 |
|
|
|
112 |
|
|
nosetests --nologcapture --with-pylons=test.ini
|
113 |
|
|
|
114 |
|
|
To run the tests and produce a coverage report, first make sure you have
|
115 |
|
|
coverage installed in your virtualenv (``pip install coverage``) then run::
|
116 |
|
|
|
117 |
|
|
nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.ozwillo_theme --cover-inclusive --cover-erase --cover-tests
|
118 |
|
|
|
119 |
|
|
|
120 |
|
|
---------------------------------
|
121 |
|
|
Registering ckanext-ozwillo_theme on PyPI
|
122 |
|
|
---------------------------------
|
123 |
|
|
|
124 |
|
|
ckanext-ozwillo_theme should be availabe on PyPI as
|
125 |
|
|
https://pypi.python.org/pypi/ckanext-ozwillo_theme. If that link doesn't work, then
|
126 |
|
|
you can register the project on PyPI for the first time by following these
|
127 |
|
|
steps:
|
128 |
|
|
|
129 |
|
|
1. Create a source distribution of the project::
|
130 |
|
|
|
131 |
|
|
python setup.py sdist
|
132 |
|
|
|
133 |
|
|
2. Register the project::
|
134 |
|
|
|
135 |
|
|
python setup.py register
|
136 |
|
|
|
137 |
|
|
3. Upload the source distribution to PyPI::
|
138 |
|
|
|
139 |
|
|
python setup.py sdist upload
|
140 |
|
|
|
141 |
|
|
4. Tag the first release of the project on GitHub with the version number from
|
142 |
|
|
the ``setup.py`` file. For example if the version number in ``setup.py`` is
|
143 |
|
|
0.0.1 then do::
|
144 |
|
|
|
145 |
|
|
git tag 0.0.1
|
146 |
|
|
git push --tags
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
----------------------------------------
|
150 |
|
|
Releasing a New Version of ckanext-ozwillo_theme
|
151 |
|
|
----------------------------------------
|
152 |
|
|
|
153 |
|
|
ckanext-ozwillo_theme is availabe on PyPI as https://pypi.python.org/pypi/ckanext-ozwillo_theme.
|
154 |
|
|
To publish a new version to PyPI follow these steps:
|
155 |
|
|
|
156 |
|
|
1. Update the version number in the ``setup.py`` file.
|
157 |
|
|
See `PEP 440 <http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers>`_
|
158 |
|
|
for how to choose version numbers.
|
159 |
|
|
|
160 |
|
|
2. Create a source distribution of the new version::
|
161 |
|
|
|
162 |
|
|
python setup.py sdist
|
163 |
|
|
|
164 |
|
|
3. Upload the source distribution to PyPI::
|
165 |
|
|
|
166 |
|
|
python setup.py sdist upload
|
167 |
|
|
|
168 |
|
|
4. Tag the new release of the project on GitHub with the version number from
|
169 |
|
|
the ``setup.py`` file. For example if the version number in ``setup.py`` is
|
170 |
|
|
0.0.2 then do::
|
171 |
|
|
|
172 |
|
|
git tag 0.0.2
|
173 |
|
|
git push --tags
|