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