Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI and drop support for py35 #1015

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c4f670e
style(client): move comment inline as black and flake are contradicting
Addono May 20, 2020
3bd06d9
ci(travis): use addono/jira-run-standalone as testing server instance
Addono Jan 25, 2020
f760c30
make getting started a little bit easier
studioj Apr 5, 2021
95caba7
update setup.cfg
adehad Apr 24, 2021
44a5249
updating tox side for Windows devs
adehad Apr 24, 2021
bd95d66
Merge branch 'improve_getting_started_documentation_for_ci_fixing' in…
adehad Apr 24, 2021
915cd9f
Merge remote-tracking branch 'origin/master' into fix_ci
adehad Apr 24, 2021
09ac5ea
new properties that use rest_api_version and rest_path
adehad Apr 24, 2021
a71a412
replace server property with server_url property
adehad Apr 25, 2021
e2a8957
bump pytest versions
adehad Apr 25, 2021
717bc32
tidy some travis things
adehad Apr 25, 2021
0443d31
using GH Actions
Apr 25, 2021
ef9c03a
fixing kerberos install
Apr 26, 2021
1d4b13d
waiting for docker
Apr 26, 2021
2ee10f5
satisfy lint, split ci into lint vs test sections,
adehad Apr 30, 2021
15dd2a3
adding all py versions and pip cache
studioj May 1, 2021
225608b
fix docs build
adehad Apr 30, 2021
e44abe8
bump lint versions
adehad May 1, 2021
15f64d2
commit package lock file
adehad May 1, 2021
19f397c
avoid duplicate builds running ?
adehad May 1, 2021
03fb317
update developer instructions
adehad May 1, 2021
ebc4429
clean legacy
adehad May 1, 2021
95ff1f9
fix lint, add guidance for Windows users
adehad May 1, 2021
e7c62a5
Upgrade to GitHub-native Dependabot
adehad Apr 30, 2021
4afa955
drop support for py 35
studioj May 1, 2021
2f357e9
Update setup.cfg
ssbarnea May 2, 2021
7f385bd
Update setup.cfg
ssbarnea May 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: master
70 changes: 70 additions & 0 deletions .github/workflows/jira_server_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Jira Server CI

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [Ubuntu]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@master
- name: Start Jira docker instance
run: docker run -dit -p 2990:2990 --name jira addono/jira-software-standalone

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Setup the Pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

- name: Install Dependencies
run: |
sudo apt-get update; sudo apt-get install gcc libkrb5-dev
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions

- name: Lint with tox
run: tox -e lint

- name: Test with tox
run: tox

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
name: ${{ runner.os }}-${{ matrix.python-version }}

- name: Run tox pkg
run: tox -e pkg

- name: Make docs
run: tox -e docs
16 changes: 5 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
repos:
- repo: https://github.com/python/black
rev: 19.3b0
rev: 21.4b2
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v3.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -20,21 +20,15 @@ repos:
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.8
rev: 3.9.1
hooks:
- id: flake8
additional_dependencies:
- flake8-black
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.17.0
rev: v1.26.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
- repo: https://github.com/openstack-dev/bashate.git
rev: 0.6.0
hooks:
- id: bashate
- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v0.730
rev: v0.812
hooks:
- id: mypy
76 changes: 0 additions & 76 deletions .travis.yml

This file was deleted.

17 changes: 8 additions & 9 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
extends: default

rules:
braces: {max-spaces-inside: 1, level: error}
brackets: {max-spaces-inside: 1, level: error}
colons: {max-spaces-after: -1, level: error}
commas: {max-spaces-after: -1, level: error}
braces: { max-spaces-inside: 1, level: error }
brackets: { max-spaces-inside: 1, level: error }
colons: { max-spaces-after: -1, level: error }
commas: { max-spaces-after: -1, level: error }
comments: disable
comments-indentation: disable
document-start: disable
empty-lines: {max: 3, level: error}
hyphens: {level: error}
empty-lines: { max: 3, level: error }
hyphens: { level: error }
indentation:
indent-sequences: consistent
# spaces: consistent
Expand All @@ -23,9 +23,8 @@ rules:
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
new-line-at-end-of-file: disable
new-lines: {type: unix}
new-lines: disable
trailing-spaces: disable
truthy: disable

ignore:
.tox
ignore: .tox
8 changes: 8 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
include LICENSE README.rst

# Exclude what is in these folders
prune tests
prune .github

# Exclude these files
exclude package-lock.json
recursive-exclude * *.py[co]
recursive-exclude * __pycache__
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ dist:
$(PREFIX)python setup.py sdist bdist_wheel

prepare:
@pyenv install -s 3.5.7
@pyenv install -s 3.6.9
@pyenv install -s 3.7.4
@pyenv local 3.5.7 3.6.9 3.7.4
@pyenv local 3.6.9 3.7.4
@echo "INFO: === Preparing 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;

Expand Down
57 changes: 32 additions & 25 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@ Jira Python Library
===================

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

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

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

.. image:: https://img.shields.io/github/issues/pycontribs/jira.svg
:target: https://github.com/pycontribs/jira/issues
:target: https://github.com/pycontribs/jira/issues

.. image:: https://img.shields.io/badge/irc-%23pycontribs-blue
:target: irc:///#pycontribs
:target: irc:///#pycontribs

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

.. image:: https://readthedocs.org/projects/jira/badge/?version=master
:target: https://jira.readthedocs.io/
:target: https://jira.readthedocs.io/

.. image:: https://travis-ci.com/pycontribs/jira.svg?branch=master
:target: https://travis-ci.com/pycontribs/jira
:target: https://travis-ci.com/pycontribs/jira

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/python/black
:alt: Python Black Code Style

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

.. image:: https://img.shields.io/bountysource/team/pycontribs/activity.svg
:target: https://www.bountysource.com/teams/pycontribs/issues?tracker_ids=3650997
:target: https://www.bountysource.com/teams/pycontribs/issues?tracker_ids=3650997

.. image:: https://requires.io/github/pycontribs/jira/requirements.svg?branch=master
:target: https://requires.io/github/pycontribs/jira/requirements/?branch=master
:alt: Requirements Status
:target: https://requires.io/github/pycontribs/jira/requirements/?branch=master
:alt: Requirements Status


This library eases the use of the Jira REST API from Python and it has been used in production for years.
Expand All @@ -54,14 +54,14 @@ Feeling impatient? I like your style.

.. code-block:: python

from jira import JIRA
from jira import JIRA

jira = JIRA('https://jira.atlassian.com')
jira = JIRA('https://jira.atlassian.com')

issue = jira.issue('JRA-9')
print(issue.fields.project.key) # 'JRA'
print(issue.fields.issuetype.name) # 'New Feature'
print(issue.fields.reporter.displayName) # 'Mike Cannon-Brookes [Atlassian]'
issue = jira.issue('JRA-9')
print(issue.fields.project.key) # 'JRA'
print(issue.fields.issuetype.name) # 'New Feature'
print(issue.fields.reporter.displayName) # 'Mike Cannon-Brookes [Atlassian]'


Installation
Expand Down Expand Up @@ -102,18 +102,25 @@ Setup
* Fork_ repo
* Keep it sync_'ed while you are developing
* Install pyenv_
* Install `Atlassian Jira Server`_ for testing
- make install-sdk
* pip install jira[test]
* Start up Jira Server
- atlas-run-standalone
* Test your changes
- make test
* develop and test
* Launch docker jira server
- ``docker run -dit -p 2990:2990 --name jira addono/jira-software-standalone``
* Lint
- ``tox -e lint``
- Note: Windows users trying to run locally will need to:
- Comment out the ``npm`` commands in the ``lint`` environment before running the ``lint`` environment
- Run ``npm install`` manually
- Run ``cspell "**" --unique`` manually - this relies on the ``cspell.json`` to check the right files
* Run tests
- ``tox``
* Run tests for one env only
- ``tox -e py37``
* Build and publish with TWINE
- ``tox -e upload``

.. _Fork: https://help.github.com/articles/fork-a-repo/
.. _sync: https://help.github.com/articles/syncing-a-fork/
.. _pyenv: https://amaral.northwestern.edu/resources/guides/pyenv-tutorial
.. _`Atlassian Jira Server`: https://www.atlassian.com/software/jira/download


Credits
Expand Down
13 changes: 11 additions & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"bspeakmon",
"capsys",
"categorised",
"Codecov",
"conda",
"cygwin",
"dae",
Expand Down Expand Up @@ -66,6 +67,7 @@
"k",
"ky",
"kzh",
"libkrb",
"lqqy",
"luk",
"makotemplate",
Expand Down Expand Up @@ -182,9 +184,16 @@
"/I18NSPHINXOPTS/"
],
"ignorePaths": [
"docs/build",
"__pycache__",
".eggs",
".tox",
".eggs"
"*.egg-info",
"*.egg",
"*.pyc",
"dist/**",
"docs/_build/**",
"node_modules/**",
"package-lock.json"
],
"ignoreWords": [
"AACCOUNTID",
Expand Down
Loading