Skip to content

Commit

Permalink
Merge pull request #500 from pycontribs/develop
Browse files Browse the repository at this point in the history
v1.0.11 release
  • Loading branch information
ssbarnea committed Jan 27, 2018
2 parents f7f48d7 + 0ad2543 commit 2b42c0a
Show file tree
Hide file tree
Showing 21 changed files with 553 additions and 426 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
max_line_length = 160
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.idea/
# See http://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder
# to understand pattern used to include .idea/codeStyleSettings.xml but not the rest of .idea/
!.idea/
.idea/*
!.idea/codeStyleSettings.xml
*.bak
*.egg
*.egg-info/
Expand Down
9 changes: 9 additions & 0 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ python:
- '3.6'
install:
- pip -q --log dist/pip.log install --upgrade pip setuptools tox-travis py wheel
- touch ChangeLog
- python setup.py sdist bdist_wheel install
- pip install ./dist/jira-*.whl
- pip install ./dist/*.whl
- pip --version
script:
- export PACKAGE_NAME=$(python setup.py --name)
- export PACKAGE_VERSION=$(python setup.py --version)
- python setup.py --version
- tox --installpkg ./dist/jira-*.whl --travis-after
- tox --installpkg ./dist/*.whl --travis-after
# validates that the build source distribution is installable using the old easy_install
- pip uninstall -y jira && easy_install ./dist/jira-*.tar.gz
- pip uninstall -y $PACKAGE_NAME && easy_install ./dist/$PACKAGE_NAME-*.tar.gz
after_success:
- coveralls
- bash <(curl -s https://codecov.io/bash)
Expand Down
80 changes: 31 additions & 49 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,93 +1,75 @@
all: info clean flake8 test docs upload release
.PHONY: all docs upload info req
all: info clean lint test docs dist upload release
.PHONY: all docs upload info req dist

PACKAGE_NAME := $(shell python setup.py --name)
PACKAGE_VERSION := $(shell python setup.py --version)
PYTHON_PATH := $(shell which python)
PLATFORM := $(shell uname -s | awk '{print tolower($0)}')
PLATFORM := $(shell uname -s | awk '{print tolower($$0)}')
DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
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 ''))")
PYENV_HOME := $(DIR)/.tox/$(PYTHON_VERSION)-$(PLATFORM)/
ifneq (,$(findstring conda,$(PYTHON_VERSION)))
CONDA:=1
endif

PREFIX=""
ifndef GIT_BRANCH
GIT_BRANCH=$(shell git branch | sed -n '/\* /s///p')
endif

info:
@echo "INFO: Building $(PACKAGE_NAME):$(PACKAGE_VERSION) on $(GIT_BRANCH) branch"
@echo "INFO: Python $(PYTHON_VERSION) from $(PYENV_HOME) [$(CONDA)]"
@echo "INFO: Python $(PYTHON_VERSION) from '$(PREFIX)' [$(CONDA)]"

clean:
@find . -name "*.pyc" -delete
@rm -rf .tox/*-$(PLATFORM) .tox/docs dist/* .tox/dist .tox/log docs/build/*
@rm -rf .tox dist/* docs/build/*

package:
python setup.py sdist bdist_wheel build_sphinx

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

install: prepare
$(PYENV_HOME)/bin/pip install .
$(PREFIX)pip install .

install-sdk:
# 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
which atlas-run-standalone || brew tap atlassian/tap && brew install atlassian/tap/atlassian-plugin-sdk

uninstall:
$(PYENV_HOME)/bin/pip uninstall -y $(PACKAGE_NAME)
$(PREFIX)pip uninstall -y $(PACKAGE_NAME)

venv: $(PYENV_HOME)/bin/activate
dist:
$(PREFIX)python setup.py sdist bdist_wheel

# virtual environment depends on requriements files
$(PYENV_HOME)/bin/activate: requirements*.txt
@echo "INFO: (Re)creating virtual environment..."
ifdef CONDA
test -e $(PYENV_HOME)/bin/activate || conda create -y --prefix $(PYENV_HOME) pip
else
test -e $(PYENV_HOME)/bin/activate || virtualenv --python=$(PYTHON_PATH) --system-site-packages $(PYENV_HOME)
endif
$(PYENV_HOME)/bin/pip install -q -r requirements.txt -r requirements-opt.txt -r requirements-dev.txt
touch $(PYENV_HOME)/bin/activate

prepare: venv
pyenv install -s 2.7.13
pyenv install -s 3.4.5
pyenv install -s 3.5.2
pyenv install -s 3.6.0
pyenv local 2.7.13 3.4.5 3.5.2 3.6.0
prepare:
@pyenv install -s 2.7.13
@pyenv install -s 3.4.5
@pyenv install -s 3.5.2
@pyenv install -s 3.6.0
@pyenv local 2.7.13 3.4.5 3.5.2 3.6.0
@echo "INFO: === Prearing to run for package:$(PACKAGE_NAME) platform:$(PLATFORM) py:$(PYTHON_VERSION) dir:$(DIR) ==="
if [ -f ${HOME}/testspace/testspace ]; then ${HOME}/testspace/testspace config url ${TESTSPACE_TOKEN}@pycontribs.testspace.com/jira/tests ; fi;
#if [ -f ${HOME}/testspace/testspace ]; then ${HOME}/testspace/testspace config url ${TESTSPACE_TOKEN}@pycontribs.testspace.com/jira/tests ; fi;

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

flake8: venv
@echo "INFO: flake8"
$(PYENV_HOME)/bin/python -m flake8
$(PYENV_HOME)/bin/python -m flake8 --install-hook 2>/dev/null || true
lint:
@echo "INFO: linting...."
$(PREFIX)python -m flake8
@$(PREFIX)python -m flake8 --install-hook 2>/dev/null || true

test: prepare flake8
test: prepare lint
@echo "INFO: test"
$(PYENV_HOME)/bin/python setup.py build test build_sphinx sdist bdist_wheel check --restructuredtext --strict

test-cli:
$(PYENV_HOME)/bin/ipython -c "import jira; j = jira.JIRA('https://pycontribs.atlassian.net'); j.server_info()" -i
$(PREFIX)python setup.py build test build_sphinx sdist bdist_wheel check --restructuredtext --strict

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

python -m tox

docs:
@echo "INFO: Building the docs"
$(PYENV_HOME)/bin/pip install sphinx
$(PYENV_HOME)/bin/python setup.py build_sphinx
$(PREFIX)pip install sphinx
$(PREFIX)python setup.py build_sphinx
@mkdir -p docs/build/docset
@mkdir -p docs/build/html/docset
# cannot put doc2dash into requirements.txt file because is using pinned requirements
Expand All @@ -114,11 +96,11 @@ endif
upload:
ifeq ($(GIT_BRANCH),develop)
@echo "INFO: Upload package to testpypi.python.org"
$(PYENV_HOME)/bin/python setup.py check --restructuredtext --strict
$(PYENV_HOME)/bin/python setup.py sdist bdist_wheel upload -r https://testpypi.python.org/pypi
$(PREFIX)python setup.py check --restructuredtext --strict
$(PREFIX)python setup.py sdist bdist_wheel upload -r https://testpypi.python.org/pypi
endif
ifeq ($(GIT_BRANCH),master)
@echo "INFO: Upload package to pypi.python.org"
$(PYENV_HOME)/bin/python setup.py check --restructuredtext --strict
$(PYENV_HOME)/bin/python setup.py sdist bdist_wheel upload
$(PREFIX)python setup.py check --restructuredtext --strict
$(PREFIX)python setup.py sdist bdist_wheel upload
endif
22 changes: 9 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ JIRA Python Library
.. image:: https://img.shields.io/pypi/l/jira.svg
:target: https://pypi.python.org/pypi/jira/

.. image:: https://img.shields.io/pypi/dm/jira.svg
.. image:: https://img.shields.io/pypi/wheel/jira.svg
:target: https://pypi.python.org/pypi/jira/

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

------------

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

.. image:: https://img.shields.io/pypi/status/jira.svg
:target: https://pypi.python.org/pypi/jira/

.. image:: https://codecov.io/gh/pycontribs/jira/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/pycontribs/jira

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

By default only the basic library dependencies are installed, so if you want
to use the ``cli`` tool or other optional dependencies do perform a full
installation using ``pip install jira[opt,cli,testing]``

.. _virtualenv: http://www.virtualenv.org/en/latest/index.html


Expand Down Expand Up @@ -98,19 +99,17 @@ Credits

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

* 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.
* 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.
* JetBrains_ for providing us with free licenses of PyCharm_
* Travis_ for hosting our continous integration
* Travis_ for hosting our continuous integration
* Navicat_ for providing us free licenses of their powerful database client GUI tools.
* Citrix_ for providing maintenance of the library.

.. _Atlassian: https://www.atlassian.com/
.. _JIRA: https://pycontribs.atlassian.net
.. _JetBrains: http://www.jetbrains.com
.. _PyCharm: http://www.jetbrains.com/pycharm/
.. _Travis: https://travis-ci.org/
.. _navicat: https://www.navicat.com/
.. _Citrix: http://www.citrix.com/

.. 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
:target: http://www.atlassian.com
Expand All @@ -120,6 +119,3 @@ In additions to all the contributors we would like to thank to these companies:

.. 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
:target: http://www.navicat.com/

.. 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
:target: http://www.citrix.com/
123 changes: 116 additions & 7 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,126 @@
************
Contributing
************

The client is an open source project under the BSD license. Contributions of any kind are welcome!
The client is an open source project under the BSD license.
Contributions of any kind are welcome!

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

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


Discussion and support
======================
**********************

We encourage all who wish to discuss by using https://community.atlassian.com/t5/tag/jira-python/tg-p

Keep in mind to use the jira-python tag when you add a new question. This will
assure that the project maintainers will get notified about your question.


Contributing Code
*****************

* Patches should be:
* concise
* works across all supported versions of Python.
* follows the existing style of the code base (PEP-8).
* has comments included as needed.

* Great Patch has:
* A test case that demonstrates the previous flaw that now passes with the included patch.
* Documentation for those changes to a public API


Testing
*******

To test code run::

make test-all

This will run the code in a virtual environment, and will test across the
versions of python which are installed. It will also install tox if it is
not already installed.

Alternatively if you do not have make you can always run::

pip install tox
tox

Issues and Feature Requests
***************************

* Check to see if there's an existing issue/pull request for the
bug/feature. All issues are at https://github.com/pycontribs/jira/issues
and pull requests are at https://github.com/pycontribs/jira/pulls.
* If there isn't an existing issue there, please file an issue. The ideal
report includes:

* A description of the problem/suggestion.
* How to recreate the bug.
* If relevant, including the versions of your:

* Python interpreter (2.7, 3.5, etc)
* jira-python
* Operating System and Version (Windows 7, OS X 10.10, Ubuntu 14.04, etc.)
* IPython if using jirashell
* Optionally of the other dependencies involved

* If possible, create a pull request with a (failing) test case demonstrating
what's wrong. This makes the process for fixing bugs quicker & gets issues
resolved sooner.
* Here is an template::

Description: <SUMMARIZE ISSUE>

Python Intepreter: <VERSION>
jira-python: <VERSION>
OS: <OPERATING SYSTEM>
IPython (Optional): <VERSION>
Other Dependencies:

Steps To Reproduce:
1. <STEP>
2. <STEP>
3. <STEP>
...

Stack Trace:
<TRACE>


Issues
******
Here are the best ways to help with open issues:

* For issues without reproduction steps
* Try to reproduce the issue, comment with the minimal amount of steps to
reproduce the bug (a code snippet would be ideal).
* If there is not a set of steps that can be made to reproduce the issue,
at least make sure there are debug logs that capture the unexpected behavior.

* Submit pull requests for open issues.


Pull Requests
*************
There are some key points that are needed to be met before a pull request
can be merged:

* All tests must pass for all python versions. (Once the Test Framework is fixed)
* For now, no new failures should occur

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

Keep in mind to use the jira-python tag when you add a new question. This will assure that the project mantainers
will get notified about your question.
The best way to help with pull requests is to comment on pull requests by
noting if any of these key points are missing, it will both help get feedback
sooner to the issuer of the pull request and make it easier to determine for
an individual with write permissions to the repository if a pull request
is ready to be merged.
4 changes: 4 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ To enable Kerberos auth, set ``kerberos=True``::

authed_jira = JIRA(kerberos=True)

To pass additional options to Kerberos auth use dict ``kerberos_options``, e.g.::

authed_jira = JIRA(kerberos=True, kerberos_options={'mutual_authentication': 'DISABLED'})

.. _jirashell-label:

Issues
Expand Down

0 comments on commit 2b42c0a

Please sign in to comment.