|
| 1 | +.. 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/duskobogdanovski/ckanext-saml2auth.svg?branch=master |
| 6 | + :target: https://travis-ci.org/duskobogdanovski/ckanext-saml2auth |
| 7 | + |
| 8 | +.. image:: https://coveralls.io/repos/duskobogdanovski/ckanext-saml2auth/badge.svg |
| 9 | + :target: https://coveralls.io/r/duskobogdanovski/ckanext-saml2auth |
| 10 | + |
| 11 | +.. image:: https://img.shields.io/pypi/v/ckanext-saml2auth.svg |
| 12 | + :target: https://pypi.org/project/ckanext-saml2auth/ |
| 13 | + :alt: Latest Version |
| 14 | + |
| 15 | +.. image:: https://img.shields.io/pypi/pyversions/ckanext-saml2auth.svg |
| 16 | + :target: https://pypi.org/project/ckanext-saml2auth/ |
| 17 | + :alt: Supported Python versions |
| 18 | + |
| 19 | +.. image:: https://img.shields.io/pypi/status/ckanext-saml2auth.svg |
| 20 | + :target: https://pypi.org/project/ckanext-saml2auth/ |
| 21 | + :alt: Development Status |
| 22 | + |
| 23 | +.. image:: https://img.shields.io/pypi/l/ckanext-saml2auth.svg |
| 24 | + :target: https://pypi.org/project/ckanext-saml2auth/ |
| 25 | + :alt: License |
| 26 | + |
| 27 | +============= |
| 28 | +ckanext-saml2auth |
| 29 | +============= |
| 30 | + |
| 31 | +.. Put a description of your extension here: |
| 32 | + What does it do? What features does it have? |
| 33 | + Consider including some screenshots or embedding a video! |
| 34 | +
|
| 35 | +
|
| 36 | +------------ |
| 37 | +Requirements |
| 38 | +------------ |
| 39 | + |
| 40 | +For example, you might want to mention here which versions of CKAN this |
| 41 | +extension works with. |
| 42 | + |
| 43 | + |
| 44 | +------------ |
| 45 | +Installation |
| 46 | +------------ |
| 47 | + |
| 48 | +.. Add any additional install steps to the list below. |
| 49 | + For example installing any non-Python dependencies or adding any required |
| 50 | + config settings. |
| 51 | +
|
| 52 | +To install ckanext-saml2auth: |
| 53 | + |
| 54 | +1. Activate your CKAN virtual environment, for example:: |
| 55 | + |
| 56 | + . /usr/lib/ckan/default/bin/activate |
| 57 | + |
| 58 | +2. Install the ckanext-saml2auth Python package into your virtual environment:: |
| 59 | + |
| 60 | + pip install ckanext-saml2auth |
| 61 | + |
| 62 | +3. Add ``saml2auth`` to the ``ckan.plugins`` setting in your CKAN |
| 63 | + config file (by default the config file is located at |
| 64 | + ``/etc/ckan/default/ckan.ini``). |
| 65 | + |
| 66 | +4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:: |
| 67 | + |
| 68 | + sudo service apache2 reload |
| 69 | + |
| 70 | + |
| 71 | +--------------- |
| 72 | +Config settings |
| 73 | +--------------- |
| 74 | + |
| 75 | +None at present |
| 76 | + |
| 77 | +.. Document any optional config settings here. For example:: |
| 78 | +
|
| 79 | +.. # The minimum number of hours to wait before re-checking a resource |
| 80 | + # (optional, default: 24). |
| 81 | + ckanext.saml2auth.some_setting = some_default_value |
| 82 | +
|
| 83 | +
|
| 84 | +---------------------- |
| 85 | +Developer installation |
| 86 | +---------------------- |
| 87 | + |
| 88 | +To install ckanext-saml2auth for development, activate your CKAN virtualenv and |
| 89 | +do:: |
| 90 | + |
| 91 | + git clone https://github.com/duskobogdanovski/ckanext-saml2auth.git |
| 92 | + cd ckanext-saml2auth |
| 93 | + python setup.py develop |
| 94 | + pip install -r dev-requirements.txt |
| 95 | + |
| 96 | + |
| 97 | +----- |
| 98 | +Tests |
| 99 | +----- |
| 100 | + |
| 101 | +To run the tests, do:: |
| 102 | + |
| 103 | + pytest --ckan-ini=test.ini |
| 104 | + |
| 105 | +To run the tests and produce a coverage report, first make sure you have |
| 106 | +``pytest-cov`` installed in your virtualenv (``pip install pytest-cov``) then run:: |
| 107 | + |
| 108 | + pytest --ckan-ini=test.ini --cov=ckanext.saml2auth |
| 109 | + |
| 110 | + |
| 111 | +---------------------------------------- |
| 112 | +Releasing a new version of ckanext-saml2auth |
| 113 | +---------------------------------------- |
| 114 | + |
| 115 | +ckanext-saml2auth should be available on PyPI as https://pypi.org/project/ckanext-saml2auth. |
| 116 | +To publish a new version to PyPI follow these steps: |
| 117 | + |
| 118 | +1. Update the version number in the ``setup.py`` file. |
| 119 | + See `PEP 440 <http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers>`_ |
| 120 | + for how to choose version numbers. |
| 121 | + |
| 122 | +2. Make sure you have the latest version of necessary packages:: |
| 123 | + |
| 124 | + pip install --upgrade setuptools wheel twine |
| 125 | + |
| 126 | +3. Create a source and binary distributions of the new version:: |
| 127 | + |
| 128 | + python setup.py sdist bdist_wheel && twine check dist/* |
| 129 | + |
| 130 | + Fix any errors you get. |
| 131 | + |
| 132 | +4. Upload the source distribution to PyPI:: |
| 133 | + |
| 134 | + twine upload dist/* |
| 135 | + |
| 136 | +5. Commit any outstanding changes:: |
| 137 | + |
| 138 | + git commit -a |
| 139 | + git push |
| 140 | + |
| 141 | +6. Tag the new 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 |
0 commit comments