|
| 1 | +Looking for contributors |
| 2 | +======================== |
| 3 | + |
| 4 | +If you are interested in contributing to this wrapper we ask that all |
| 5 | +pull requests have an open issue that and they be referenced. We also |
| 6 | +ask that you submit unit tests for your changes to make sure there are |
| 7 | +no regressions. |
| 8 | + |
| 9 | +Pull Requests |
| 10 | +------------- |
| 11 | + |
| 12 | +We are currently working on getting pyapi-gitlab to 101% coverage in |
| 13 | +both unittests and integration tests. Well the integration testing is |
| 14 | +not fully flushed out yet the unittests are so we ask that all new pull |
| 15 | +requests have unittests with them. |
| 16 | + |
| 17 | +Setting up for development |
| 18 | +-------------------------- |
| 19 | + |
| 20 | +If you wish to setup your system for development you will need to |
| 21 | +install the test requirements and we ask that you consider docker and |
| 22 | +docker-compose for integration testing. |
| 23 | + |
| 24 | +To install the test requirements you will need to run the following |
| 25 | +command ``pip install -Ur test-requirements.txt``. This will install |
| 26 | +both the ``requirements.txt`` and the ``test-requirements.txt``. |
| 27 | + |
| 28 | +To run the test simply run ``./cov`` from the project root directory. |
| 29 | + |
| 30 | +To review the cover open the ``index.html`` file in the |
| 31 | +``coverage_html_report``. |
| 32 | + |
| 33 | +To run the integration test run the commands below. This will build the |
| 34 | +docker containers and then start them. The containers will shutdown |
| 35 | +after the tests finish. |
| 36 | + |
| 37 | +:: |
| 38 | + |
| 39 | + docker-compose -f docker/v93/docker-compose.yml build |
| 40 | + docker-compose -f docker/v93/docker-compose.yml up --abort-on-container-exit |
| 41 | + |
| 42 | +pyapi-gitlab |
| 43 | +============ |
| 44 | + |
| 45 | +pyapi-gitlab is a python wrapper for the `Gitlab |
| 46 | +API <https://github.com/gitlabhq/gitlabhq/tree/master/doc/api>`__. |
| 47 | + |
| 48 | +|Build Status| |Coverage Status| |PyPI| |PyPi downloads| |Requirements |
| 49 | +Status| |License| |Docs| |
| 50 | + |
| 51 | +Requirements |
| 52 | +------------ |
| 53 | + |
| 54 | +- requests |
| 55 | + |
| 56 | +Naming convention |
| 57 | +----------------- |
| 58 | + |
| 59 | +pyapi-gitlab has its own versioning in which the 2 first numbers |
| 60 | +indicates the Gitlab version that its supported for that library. a 7.5 |
| 61 | +version means that its compatible with the Gitlab 7.5 and lower API |
| 62 | +versions. |
| 63 | + |
| 64 | +Installation |
| 65 | +------------ |
| 66 | + |
| 67 | +.. code:: bash |
| 68 | +
|
| 69 | + pip install pyapi-gitlab |
| 70 | +
|
| 71 | +pyapi-gitlab supports python version 2.7, 3.3, 3.4, 3.5, 3.5-dev, 3.6, |
| 72 | +3.6-dev, 3.7-dev, and the nightly build |
| 73 | + |
| 74 | +Versions tested |
| 75 | +=============== |
| 76 | + |
| 77 | ++------------------+------------------------+ |
| 78 | +| Gitlab version | Status | |
| 79 | ++==================+========================+ |
| 80 | +| 9.1.X | :x:1 | |
| 81 | ++------------------+------------------------+ |
| 82 | +| 7.9.X | :x:2 | |
| 83 | ++------------------+------------------------+ |
| 84 | +| 7.8.X | :heavy\_check\_mark: | |
| 85 | ++------------------+------------------------+ |
| 86 | +| 7.7.X | :heavy\_check\_mark: | |
| 87 | ++------------------+------------------------+ |
| 88 | +| 7.6.X | :heavy\_check\_mark: | |
| 89 | ++------------------+------------------------+ |
| 90 | +| 7.5.X | :heavy\_check\_mark: | |
| 91 | ++------------------+------------------------+ |
| 92 | +| 7.4.X | :heavy\_check\_mark: | |
| 93 | ++------------------+------------------------+ |
| 94 | +| 7.3.X | :heavy\_check\_mark: | |
| 95 | ++------------------+------------------------+ |
| 96 | +| 7.2.X | :heavy\_check\_mark: | |
| 97 | ++------------------+------------------------+ |
| 98 | +| 7.1.X | :x:3 | |
| 99 | ++------------------+------------------------+ |
| 100 | +| 7.0.X | :x:4 | |
| 101 | ++------------------+------------------------+ |
| 102 | + |
| 103 | +1. Currently under development |
| 104 | +2. 3 out of 17 tests failing: Seems that create snippet wall note now |
| 105 | + returns true/false instead of the created snippet. Snippet creating |
| 106 | + now does not return the created snippet. And move project does not |
| 107 | + return a dict either. |
| 108 | +3. Label creation is not supported on this version. |
| 109 | +4. Contributors endpoint seems to not exists in this version. Label |
| 110 | + creation is not supported on this version. |
| 111 | + |
| 112 | +Changelog |
| 113 | +--------- |
| 114 | + |
| 115 | +7.8.5 |
| 116 | +===== |
| 117 | + |
| 118 | +- Use ``requests.json()`` instead of decoding everything (@satreix) |
| 119 | +- Add getmergerequestchanges (@bor-sh) |
| 120 | +- Add getmilestoneissues (@JonathonReinhart) |
| 121 | +- Add editproject (@nelg) |
| 122 | +- Add editgroupmember (@) |
| 123 | +- Fix hook metadata creation #137 (@jzelinskie) |
| 124 | +- Fix addprojectmember (@btall) |
| 125 | +- Fix Raise exception instead of returning it in creategroup (@brenard) |
| 126 | + |
| 127 | +7.8.4 |
| 128 | +===== |
| 129 | + |
| 130 | +- Just a bumped version, now that its tested and fully supports Gitlab |
| 131 | + versions up to 7.8 |
| 132 | + |
| 133 | +7.5.4 |
| 134 | +===== |
| 135 | + |
| 136 | +- Change license to Apache 2.0 |
| 137 | +- getproject now accepts a namespace/projectname as well like the |
| 138 | + gitlab api |
| 139 | + |
| 140 | +7.5.3 |
| 141 | +===== |
| 142 | + |
| 143 | +- New function wrapper ``getall`` to get all results from any function |
| 144 | + that provides pagination [Anirudh Dutt] |
| 145 | +- Remove pagination params from ``getdeploykeys``, ``getbranches`` and |
| 146 | + ``getsshkeys`` as they don't support it [Anirudh Dutt] |
| 147 | +- Add oAuth tokens to the login method [Ken Cochrane] |
| 148 | +- You can now add the type of hook when creating it [tonicbupt] |
| 149 | +- Allow Project Issues to be filtered by passing kwargs [Nick Whyte] |
| 150 | +- Update docs [Itxaka Serrano] |
| 151 | + |
| 152 | +7.5.2 |
| 153 | +===== |
| 154 | + |
| 155 | +- Support for the full Gitlab 7.5 API |
| 156 | +- Fix python 2.6 compatibility |
| 157 | +- All methods have documentation (Inside the library only, the docs are |
| 158 | + lagging a bit behind). |
| 159 | +- New fork api that allows to actually fork a project instead of doing |
| 160 | + fork relations |
| 161 | +- New label methods (getlabel, createlabel, editlabel, deletelabel) |
| 162 | +- All get\* methods that return more than one item support pagination. |
| 163 | + Check page and per\_page args. Default to first page and 20 items per |
| 164 | + page. |
| 165 | +- BREAKING CHANGE: Old sudo arg in methods to execute as other user is |
| 166 | + gone. Now there is a method setsudo(user\_id/user\_username) which |
| 167 | + will setup the header, so all the subsequent API calls will be done |
| 168 | + as that user. To get back to your user just do a setsudo() and the |
| 169 | + sudo parameter will be cleared |
| 170 | +- BREAKING CHANGE: Some methods were returning True or False instead of |
| 171 | + the object created. Now all the methods in which there is something |
| 172 | + returning from the server is returned as a dictionary/list of |
| 173 | + dictionaries to the user |
| 174 | +- BREAKING CHANGE: Some methods now use kwargs for the optional |
| 175 | + parameters so the code is more easy and readable. Methods affected: |
| 176 | + createproject, createprojectuser, createmilestone, editmilestone, |
| 177 | + updatemergerequest |
| 178 | +- BREAKING CHANGE: Project wallnotes does not exist anymore, seems that |
| 179 | + they have been moved to project snippets (getsnippets, getsnippet, |
| 180 | + createsnippet, deletesnippet) |
| 181 | +- BREAKING CHANGE: Removed getreadme method as its not part of the |
| 182 | + gitlab api, nor was it ever. |
| 183 | +- BREAKING CHANGE: Old methods that started with list\* are not get\*. |
| 184 | + This is done in order to have a proper naming convention instead of |
| 185 | + having mixed listsomething and then getsomething. The actual |
| 186 | +- BREAKING CHANGE: Old methods with new names: getownprojects -> |
| 187 | + getprojectsowned, getallprojects -> getprojectsall |
| 188 | + |
| 189 | +Examples/Documentation |
| 190 | +---------------------- |
| 191 | + |
| 192 | +Check the docs at |
| 193 | +`readthedocs.org <http://pyapi-gitlab.readthedocs.org>`__ |
| 194 | + |
| 195 | +License |
| 196 | +------- |
| 197 | + |
| 198 | +pyapi-gitlab is licensed under the Apache License 2.0. Check the LICENSE |
| 199 | +file. |
| 200 | + |
| 201 | +Built with PyCharm |
| 202 | +------------------ |
| 203 | + |
| 204 | +Thanks to Jetbrains for giving me an Open Source license for PyCharm, it |
| 205 | +has helped making development much faster! |
| 206 | + |
| 207 | +|Pycharm| |
| 208 | + |
| 209 | +.. |Build Status| image:: https://travis-ci.org/Itxaka/pyapi-gitlab.svg?branch=develop |
| 210 | + :target: https://travis-ci.org/Itxaka/pyapi-gitlab |
| 211 | +.. |Coverage Status| image:: https://coveralls.io/repos/Itxaka/pyapi-gitlab/badge.png?branch=develop |
| 212 | + :target: https://coveralls.io/r/Itxaka/pyapi-gitlab?branch=develop |
| 213 | +.. |PyPI| image:: https://img.shields.io/pypi/v/pyapi-gitlab.svg |
| 214 | + :target: https://pypi.python.org/pypi/pyapi-gitlab |
| 215 | +.. |PyPi downloads| image:: https://img.shields.io/pypi/dm/pyapi-gitlab.svg |
| 216 | +.. |Requirements Status| image:: https://requires.io/github/pyapi-gitlab/pyapi-gitlab/requirements.svg?branch=develop |
| 217 | + :target: https://requires.io/github/pyapi-gitlab/pyapi-gitlab/requirements/?branch=develop |
| 218 | +.. |License| image:: http://img.shields.io/pypi/l/pyapi-gitlab.svg |
| 219 | + :target: https://www.apache.org/licenses/LICENSE-2.0.txt |
| 220 | +.. |Docs| image:: https://readthedocs.org/projects/pyapi-gitlab/badge/?version=latest |
| 221 | + :target: http://pyapi-gitlab.readthedocs.org/ |
| 222 | +.. |Pycharm| image:: http://www.jetbrains.com/pycharm/docs/logo_pycharm.png |
| 223 | + :target: https://www.jetbrains.com/pycharm/ |
0 commit comments