Skip to content

Commit 2b42c0a

Browse files
authored
Merge pull request #500 from pycontribs/develop
v1.0.11 release
2 parents f7f48d7 + 0ad2543 commit 2b42c0a

21 files changed

+553
-426
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
max_line_length = 160

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
.idea/
1+
# See http://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder
2+
# to understand pattern used to include .idea/codeStyleSettings.xml but not the rest of .idea/
3+
!.idea/
4+
.idea/*
5+
!.idea/codeStyleSettings.xml
26
*.bak
37
*.egg
48
*.egg-info/

.idea/codeStyleSettings.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ python:
1111
- '3.6'
1212
install:
1313
- pip -q --log dist/pip.log install --upgrade pip setuptools tox-travis py wheel
14+
- touch ChangeLog
1415
- python setup.py sdist bdist_wheel install
15-
- pip install ./dist/jira-*.whl
16+
- pip install ./dist/*.whl
1617
- pip --version
1718
script:
1819
- export PACKAGE_NAME=$(python setup.py --name)
1920
- export PACKAGE_VERSION=$(python setup.py --version)
2021
- python setup.py --version
21-
- tox --installpkg ./dist/jira-*.whl --travis-after
22+
- tox --installpkg ./dist/*.whl --travis-after
2223
# validates that the build source distribution is installable using the old easy_install
23-
- pip uninstall -y jira && easy_install ./dist/jira-*.tar.gz
24+
- pip uninstall -y $PACKAGE_NAME && easy_install ./dist/$PACKAGE_NAME-*.tar.gz
2425
after_success:
2526
- coveralls
2627
- bash <(curl -s https://codecov.io/bash)

Makefile

Lines changed: 31 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,75 @@
1-
all: info clean flake8 test docs upload release
2-
.PHONY: all docs upload info req
1+
all: info clean lint test docs dist upload release
2+
.PHONY: all docs upload info req dist
33

44
PACKAGE_NAME := $(shell python setup.py --name)
55
PACKAGE_VERSION := $(shell python setup.py --version)
66
PYTHON_PATH := $(shell which python)
7-
PLATFORM := $(shell uname -s | awk '{print tolower($0)}')
7+
PLATFORM := $(shell uname -s | awk '{print tolower($$0)}')
88
DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
99
PYTHON_VERSION := $(shell python3 -c "import sys; print('py%s%s' % sys.version_info[0:2] + ('-conda' if 'conda' in sys.version or 'Continuum' in sys.version else ''))")
10-
PYENV_HOME := $(DIR)/.tox/$(PYTHON_VERSION)-$(PLATFORM)/
11-
ifneq (,$(findstring conda,$(PYTHON_VERSION)))
12-
CONDA:=1
13-
endif
14-
10+
PREFIX=""
1511
ifndef GIT_BRANCH
1612
GIT_BRANCH=$(shell git branch | sed -n '/\* /s///p')
1713
endif
1814

1915
info:
2016
@echo "INFO: Building $(PACKAGE_NAME):$(PACKAGE_VERSION) on $(GIT_BRANCH) branch"
21-
@echo "INFO: Python $(PYTHON_VERSION) from $(PYENV_HOME) [$(CONDA)]"
17+
@echo "INFO: Python $(PYTHON_VERSION) from '$(PREFIX)' [$(CONDA)]"
2218

2319
clean:
2420
@find . -name "*.pyc" -delete
25-
@rm -rf .tox/*-$(PLATFORM) .tox/docs dist/* .tox/dist .tox/log docs/build/*
21+
@rm -rf .tox dist/* docs/build/*
2622

2723
package:
2824
python setup.py sdist bdist_wheel build_sphinx
2925

3026
req:
31-
@$(PYENV_HOME)/bin/requires.io update-site -t ac3bbcca32ae03237a6aae2b02eb9411045489bb -r $(PACKAGE_NAME)
27+
@$(PREFIX)requires.io update-site -t ac3bbcca32ae03237a6aae2b02eb9411045489bb -r $(PACKAGE_NAME)
3228

3329
install: prepare
34-
$(PYENV_HOME)/bin/pip install .
30+
$(PREFIX)pip install .
3531

3632
install-sdk:
3733
# https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and-build-a-project/install-the-atlassian-sdk-on-a-linux-or-mac-system#InstalltheAtlassianSDKonaLinuxorMacsystem-Homebrew
3834
which atlas-run-standalone || brew tap atlassian/tap && brew install atlassian/tap/atlassian-plugin-sdk
3935

4036
uninstall:
41-
$(PYENV_HOME)/bin/pip uninstall -y $(PACKAGE_NAME)
37+
$(PREFIX)pip uninstall -y $(PACKAGE_NAME)
4238

43-
venv: $(PYENV_HOME)/bin/activate
39+
dist:
40+
$(PREFIX)python setup.py sdist bdist_wheel
4441

45-
# virtual environment depends on requriements files
46-
$(PYENV_HOME)/bin/activate: requirements*.txt
47-
@echo "INFO: (Re)creating virtual environment..."
48-
ifdef CONDA
49-
test -e $(PYENV_HOME)/bin/activate || conda create -y --prefix $(PYENV_HOME) pip
50-
else
51-
test -e $(PYENV_HOME)/bin/activate || virtualenv --python=$(PYTHON_PATH) --system-site-packages $(PYENV_HOME)
52-
endif
53-
$(PYENV_HOME)/bin/pip install -q -r requirements.txt -r requirements-opt.txt -r requirements-dev.txt
54-
touch $(PYENV_HOME)/bin/activate
55-
56-
prepare: venv
57-
pyenv install -s 2.7.13
58-
pyenv install -s 3.4.5
59-
pyenv install -s 3.5.2
60-
pyenv install -s 3.6.0
61-
pyenv local 2.7.13 3.4.5 3.5.2 3.6.0
42+
prepare:
43+
@pyenv install -s 2.7.13
44+
@pyenv install -s 3.4.5
45+
@pyenv install -s 3.5.2
46+
@pyenv install -s 3.6.0
47+
@pyenv local 2.7.13 3.4.5 3.5.2 3.6.0
6248
@echo "INFO: === Prearing to run for package:$(PACKAGE_NAME) platform:$(PLATFORM) py:$(PYTHON_VERSION) dir:$(DIR) ==="
63-
if [ -f ${HOME}/testspace/testspace ]; then ${HOME}/testspace/testspace config url ${TESTSPACE_TOKEN}@pycontribs.testspace.com/jira/tests ; fi;
49+
#if [ -f ${HOME}/testspace/testspace ]; then ${HOME}/testspace/testspace config url ${TESTSPACE_TOKEN}@pycontribs.testspace.com/jira/tests ; fi;
6450

6551
testspace:
6652
${HOME}/testspace/testspace publish build/results.xml
6753

68-
flake8: venv
69-
@echo "INFO: flake8"
70-
$(PYENV_HOME)/bin/python -m flake8
71-
$(PYENV_HOME)/bin/python -m flake8 --install-hook 2>/dev/null || true
54+
lint:
55+
@echo "INFO: linting...."
56+
$(PREFIX)python -m flake8
57+
@$(PREFIX)python -m flake8 --install-hook 2>/dev/null || true
7258

73-
test: prepare flake8
59+
test: prepare lint
7460
@echo "INFO: test"
75-
$(PYENV_HOME)/bin/python setup.py build test build_sphinx sdist bdist_wheel check --restructuredtext --strict
76-
77-
test-cli:
78-
$(PYENV_HOME)/bin/ipython -c "import jira; j = jira.JIRA('https://pycontribs.atlassian.net'); j.server_info()" -i
61+
$(PREFIX)python setup.py build test build_sphinx sdist bdist_wheel check --restructuredtext --strict
7962

8063
test-all:
8164
@echo "INFO: test-all (extended/matrix tests)"
8265
# tox should not run inside virtualenv because it does create and use multiple virtualenvs
8366
pip install -q tox tox-pyenv
84-
python -m tox --skip-missing-interpreters true
85-
67+
python -m tox
8668

8769
docs:
8870
@echo "INFO: Building the docs"
89-
$(PYENV_HOME)/bin/pip install sphinx
90-
$(PYENV_HOME)/bin/python setup.py build_sphinx
71+
$(PREFIX)pip install sphinx
72+
$(PREFIX)python setup.py build_sphinx
9173
@mkdir -p docs/build/docset
9274
@mkdir -p docs/build/html/docset
9375
# cannot put doc2dash into requirements.txt file because is using pinned requirements
@@ -114,11 +96,11 @@ endif
11496
upload:
11597
ifeq ($(GIT_BRANCH),develop)
11698
@echo "INFO: Upload package to testpypi.python.org"
117-
$(PYENV_HOME)/bin/python setup.py check --restructuredtext --strict
118-
$(PYENV_HOME)/bin/python setup.py sdist bdist_wheel upload -r https://testpypi.python.org/pypi
99+
$(PREFIX)python setup.py check --restructuredtext --strict
100+
$(PREFIX)python setup.py sdist bdist_wheel upload -r https://testpypi.python.org/pypi
119101
endif
120102
ifeq ($(GIT_BRANCH),master)
121103
@echo "INFO: Upload package to pypi.python.org"
122-
$(PYENV_HOME)/bin/python setup.py check --restructuredtext --strict
123-
$(PYENV_HOME)/bin/python setup.py sdist bdist_wheel upload
104+
$(PREFIX)python setup.py check --restructuredtext --strict
105+
$(PREFIX)python setup.py sdist bdist_wheel upload
124106
endif

README.rst

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ JIRA Python Library
88
.. image:: https://img.shields.io/pypi/l/jira.svg
99
:target: https://pypi.python.org/pypi/jira/
1010

11-
.. image:: https://img.shields.io/pypi/dm/jira.svg
11+
.. image:: https://img.shields.io/pypi/wheel/jira.svg
1212
:target: https://pypi.python.org/pypi/jira/
1313

14-
.. image:: https://img.shields.io/pypi/wheel/Django.svg
15-
:target: https://pypi.python.org/pypi/jira/
14+
.. image:: https://img.shields.io/codeclimate/issues/github/pycontribs/jira.svg
15+
:target: https://github.com/pycontribs/jira/issues
1616

1717
------------
1818

@@ -22,9 +22,6 @@ JIRA Python Library
2222
.. image:: https://api.travis-ci.org/pycontribs/jira.svg?branch=master
2323
:target: https://travis-ci.org/pycontribs/jira
2424

25-
.. image:: https://img.shields.io/pypi/status/jira.svg
26-
:target: https://pypi.python.org/pypi/jira/
27-
2825
.. image:: https://codecov.io/gh/pycontribs/jira/branch/develop/graph/badge.svg
2926
:target: https://codecov.io/gh/pycontribs/jira
3027

@@ -69,6 +66,10 @@ You can also try ``pip install --user --upgrade jira`` which will install or
6966
upgrade jira to your user directory. Or maybe you ARE using a virtualenv_
7067
right?
7168

69+
By default only the basic library dependencies are installed, so if you want
70+
to use the ``cli`` tool or other optional dependencies do perform a full
71+
installation using ``pip install jira[opt,cli,testing]``
72+
7273
.. _virtualenv: http://www.virtualenv.org/en/latest/index.html
7374

7475

@@ -98,19 +99,17 @@ Credits
9899

99100
In additions to all the contributors we would like to thank to these companies:
100101

101-
* Atlassian_ for developing such a powerful issue tracker and for providing a free on-demand JIRA_ instance that we can use for continous integration testing.
102+
* Atlassian_ for developing such a powerful issue tracker and for providing a free on-demand JIRA_ instance that we can use for continuous integration testing.
102103
* JetBrains_ for providing us with free licenses of PyCharm_
103-
* Travis_ for hosting our continous integration
104+
* Travis_ for hosting our continuous integration
104105
* Navicat_ for providing us free licenses of their powerful database client GUI tools.
105-
* Citrix_ for providing maintenance of the library.
106106

107107
.. _Atlassian: https://www.atlassian.com/
108108
.. _JIRA: https://pycontribs.atlassian.net
109109
.. _JetBrains: http://www.jetbrains.com
110110
.. _PyCharm: http://www.jetbrains.com/pycharm/
111111
.. _Travis: https://travis-ci.org/
112112
.. _navicat: https://www.navicat.com/
113-
.. _Citrix: http://www.citrix.com/
114113

115114
.. image:: https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&refresh=3600&resize_h=50&url=https://www.atlassian.com/dms/wac/images/press/Atlassian-logos/logoAtlassianPNG.png
116115
:target: http://www.atlassian.com
@@ -120,6 +119,3 @@ In additions to all the contributors we would like to thank to these companies:
120119

121120
.. image:: https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&refresh=3600&resize_h=50&url=https://upload.wikimedia.org/wikipedia/en/9/90/PremiumSoft_Navicat_Premium_Logo.png
122121
:target: http://www.navicat.com/
123-
124-
.. image:: https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&refresh=3600&resize_h=50&url=https://www.citrix.com/content/dam/citrix/en_us/images/logos/citrix/citrix-logo-black.jpg
125-
:target: http://www.citrix.com/

docs/contributing.rst

Lines changed: 116 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,126 @@
1+
************
12
Contributing
23
************
34

4-
The client is an open source project under the BSD license. Contributions of any kind are welcome!
5+
The client is an open source project under the BSD license.
6+
Contributions of any kind are welcome!
57

68
https://github.com/pycontribs/jira/
79

8-
If you find a bug or have an idea for a useful feature, file it at that bitbucket project. Extra points for source
9-
code patches -- fork and send a pull request.
10+
If you find a bug or have an idea for a useful feature, file it at the GitHub
11+
project. Extra points for source code patches -- fork and send a pull request.
12+
1013

1114
Discussion and support
12-
======================
15+
**********************
16+
17+
We encourage all who wish to discuss by using https://community.atlassian.com/t5/tag/jira-python/tg-p
18+
19+
Keep in mind to use the jira-python tag when you add a new question. This will
20+
assure that the project maintainers will get notified about your question.
21+
22+
23+
Contributing Code
24+
*****************
25+
26+
* Patches should be:
27+
* concise
28+
* works across all supported versions of Python.
29+
* follows the existing style of the code base (PEP-8).
30+
* has comments included as needed.
31+
32+
* Great Patch has:
33+
* A test case that demonstrates the previous flaw that now passes with the included patch.
34+
* Documentation for those changes to a public API
35+
36+
37+
Testing
38+
*******
39+
40+
To test code run::
41+
42+
make test-all
43+
44+
This will run the code in a virtual environment, and will test across the
45+
versions of python which are installed. It will also install tox if it is
46+
not already installed.
47+
48+
Alternatively if you do not have make you can always run::
49+
50+
pip install tox
51+
tox
52+
53+
Issues and Feature Requests
54+
***************************
55+
56+
* Check to see if there's an existing issue/pull request for the
57+
bug/feature. All issues are at https://github.com/pycontribs/jira/issues
58+
and pull requests are at https://github.com/pycontribs/jira/pulls.
59+
* If there isn't an existing issue there, please file an issue. The ideal
60+
report includes:
61+
62+
* A description of the problem/suggestion.
63+
* How to recreate the bug.
64+
* If relevant, including the versions of your:
65+
66+
* Python interpreter (2.7, 3.5, etc)
67+
* jira-python
68+
* Operating System and Version (Windows 7, OS X 10.10, Ubuntu 14.04, etc.)
69+
* IPython if using jirashell
70+
* Optionally of the other dependencies involved
71+
72+
* If possible, create a pull request with a (failing) test case demonstrating
73+
what's wrong. This makes the process for fixing bugs quicker & gets issues
74+
resolved sooner.
75+
* Here is an template::
76+
77+
Description: <SUMMARIZE ISSUE>
78+
79+
Python Intepreter: <VERSION>
80+
jira-python: <VERSION>
81+
OS: <OPERATING SYSTEM>
82+
IPython (Optional): <VERSION>
83+
Other Dependencies:
84+
85+
Steps To Reproduce:
86+
1. <STEP>
87+
2. <STEP>
88+
3. <STEP>
89+
...
90+
91+
Stack Trace:
92+
<TRACE>
93+
94+
95+
Issues
96+
******
97+
Here are the best ways to help with open issues:
98+
99+
* For issues without reproduction steps
100+
* Try to reproduce the issue, comment with the minimal amount of steps to
101+
reproduce the bug (a code snippet would be ideal).
102+
* If there is not a set of steps that can be made to reproduce the issue,
103+
at least make sure there are debug logs that capture the unexpected behavior.
104+
105+
* Submit pull requests for open issues.
106+
107+
108+
Pull Requests
109+
*************
110+
There are some key points that are needed to be met before a pull request
111+
can be merged:
112+
113+
* All tests must pass for all python versions. (Once the Test Framework is fixed)
114+
* For now, no new failures should occur
13115

14-
We encourage all who wish to discuss by using https://answers.atlassian.com/questions/topics/754366/jira-python
116+
* All pull requests require tests that either test the new feature or test
117+
that the specific bug is fixed. Pull requests for minor things like
118+
adding a new region or fixing a typo do not need tests.
119+
* Must follow PEP8 conventions.
120+
* Within a major version changes must be backwards compatible.
15121

16-
Keep in mind to use the jira-python tag when you add a new question. This will assure that the project mantainers
17-
will get notified about your question.
122+
The best way to help with pull requests is to comment on pull requests by
123+
noting if any of these key points are missing, it will both help get feedback
124+
sooner to the issuer of the pull request and make it easier to determine for
125+
an individual with write permissions to the repository if a pull request
126+
is ready to be merged.

docs/examples.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ To enable Kerberos auth, set ``kerberos=True``::
9191

9292
authed_jira = JIRA(kerberos=True)
9393

94+
To pass additional options to Kerberos auth use dict ``kerberos_options``, e.g.::
95+
96+
authed_jira = JIRA(kerberos=True, kerberos_options={'mutual_authentication': 'DISABLED'})
97+
9498
.. _jirashell-label:
9599

96100
Issues

0 commit comments

Comments
 (0)