Skip to content

Commit bd05052

Browse files
authored
Merge branch 'master' into fix-unclosed-fd
2 parents 47af2bb + 8705ff2 commit bd05052

38 files changed

+778
-694
lines changed

.fossa.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
2+
# Visit https://fossa.com to learn more
3+
4+
version: 2
5+
cli:
6+
server: https://app.fossa.com
7+
fetcher: custom
8+
project: jira
9+
analyze:
10+
modules:
11+
- name: .
12+
type: pip
13+
target: .
14+
path: .
15+
options:
16+
strategy: requirements

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
target-branch: master

.github/workflows/jira_server_ci.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Jira Server CI
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the master branch
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
13+
jobs:
14+
test:
15+
name: ${{ matrix.os }} / ${{ matrix.python-version }}
16+
runs-on: ${{ matrix.os }}-latest
17+
strategy:
18+
matrix:
19+
os: [Ubuntu]
20+
python-version: [3.6, 3.7, 3.8, 3.9]
21+
22+
steps:
23+
- uses: actions/checkout@master
24+
- name: Start Jira docker instance
25+
run: docker run -dit -p 2990:2990 --name jira addono/jira-software-standalone
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Get pip cache dir
33+
id: pip-cache
34+
run: |
35+
echo "::set-output name=dir::$(pip cache dir)"
36+
- name: Setup the Pip cache
37+
uses: actions/cache@v2
38+
with:
39+
path: ${{ steps.pip-cache.outputs.dir }}
40+
key: >-
41+
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
42+
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
43+
hashFiles('.pre-commit-config.yaml') }}
44+
restore-keys: |
45+
${{ runner.os }}-pip-
46+
${{ runner.os }}-
47+
48+
- name: Install Dependencies
49+
run: |
50+
sudo apt-get update; sudo apt-get install gcc libkrb5-dev
51+
python -m pip install --upgrade pip
52+
python -m pip install --upgrade tox tox-gh-actions
53+
54+
- name: Lint with tox
55+
run: tox -e lint
56+
57+
- name: Test with tox
58+
run: tox
59+
60+
- name: Upload coverage to Codecov
61+
uses: codecov/[email protected]
62+
with:
63+
file: ./coverage.xml
64+
name: ${{ runner.os }}-${{ matrix.python-version }}
65+
66+
- name: Run tox pkg
67+
run: tox -e pkg
68+
69+
- name: Make docs
70+
run: tox -e docs

.github/workflows/publish.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [published, created, edited]
6+
7+
jobs:
8+
publish:
9+
environment: publish
10+
if: startsWith(github.ref, 'refs/tags/') # Only release during tags
11+
runs-on: ubuntu-20.04
12+
13+
env:
14+
PY_COLORS: 1
15+
TOXENV: publish
16+
17+
steps:
18+
- name: Switch to using Python 3.6 by default
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.6
22+
- name: Install tox
23+
run: python3 -m pip install --user tox
24+
- name: Check out src from Git
25+
uses: actions/checkout@v2
26+
with:
27+
# Get shallow Git history (default) for release events
28+
# but have a complete clone for any other workflows.
29+
# Both options fetch tags but since we're going to remove
30+
# one from HEAD in non-create-tag workflows, we need full
31+
# history for them.
32+
fetch-depth: >-
33+
${{
34+
(
35+
(
36+
github.event_name == 'create' &&
37+
github.event.ref_type == 'tag'
38+
) ||
39+
github.event_name == 'release'
40+
) &&
41+
1 || 0
42+
}}
43+
- name: Drop Git tags from HEAD for non-tag-create and non-release events
44+
if: >-
45+
(
46+
github.event_name != 'create' ||
47+
github.event.ref_type != 'tag'
48+
) &&
49+
github.event_name != 'release'
50+
run: >-
51+
git tag --points-at HEAD
52+
|
53+
xargs git tag --delete
54+
- name: Build dists
55+
run: python3 -m tox
56+
- name: Publish to test.pypi.org
57+
if: >-
58+
(
59+
github.event_name == 'push' &&
60+
github.ref == format(
61+
'refs/heads/{0}', github.event.repository.default_branch
62+
)
63+
) ||
64+
(
65+
github.event_name == 'create' &&
66+
github.event.ref_type == 'tag'
67+
)
68+
uses: pypa/gh-action-pypi-publish@master
69+
with:
70+
password: ${{ secrets.TESTPYPI_PASSWORD }}
71+
repository_url: https://test.pypi.org/legacy/
72+
- name: Publish to pypi.org
73+
if: >- # "create" workflows run separately from "push" & "pull_request"
74+
github.event_name == 'release'
75+
uses: pypa/gh-action-pypi-publish@master
76+
with:
77+
password: ${{ secrets.PYPI_PASSWORD }}

.pre-commit-config.yaml

+28-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
repos:
33
- repo: https://github.com/python/black
4-
rev: 19.3b0
4+
rev: 21.4b2
55
hooks:
66
- id: black
77
language_version: python3
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v2.3.0
9+
rev: v3.4.0
1010
hooks:
1111
- id: end-of-file-fixer
1212
- id: trailing-whitespace
@@ -19,22 +19,39 @@ repos:
1919
- id: debug-statements
2020
- id: check-yaml
2121
files: .*\.(yaml|yml)$
22+
- repo: https://github.com/codespell-project/codespell.git
23+
rev: v2.0.0
24+
hooks:
25+
- id: codespell
26+
name: codespell
27+
description: Checks for common misspellings in text files.
28+
entry: codespell
29+
language: python
30+
types: [text]
31+
args: []
32+
require_serial: false
33+
additional_dependencies: []
2234
- repo: https://gitlab.com/pycqa/flake8
23-
rev: 3.7.8
35+
rev: 3.9.1
2436
hooks:
2537
- id: flake8
26-
additional_dependencies:
27-
- flake8-black
38+
- repo: https://github.com/pycqa/isort
39+
rev: 5.8.0
40+
hooks:
41+
- id: isort
42+
name: isort (python)
43+
- id: isort
44+
name: isort (cython)
45+
types: [cython]
46+
- id: isort
47+
name: isort (pyi)
48+
types: [pyi]
2849
- repo: https://github.com/adrienverge/yamllint.git
29-
rev: v1.17.0
50+
rev: v1.26.1
3051
hooks:
3152
- id: yamllint
3253
files: \.(yaml|yml)$
33-
- repo: https://github.com/openstack-dev/bashate.git
34-
rev: 0.6.0
35-
hooks:
36-
- id: bashate
3754
- repo: https://github.com/pre-commit/mirrors-mypy.git
38-
rev: v0.730
55+
rev: v0.812
3956
hooks:
4057
- id: mypy

.travis.yml

-76
This file was deleted.

.yamllint

+8-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
extends: default
33

44
rules:
5-
braces: {max-spaces-inside: 1, level: error}
6-
brackets: {max-spaces-inside: 1, level: error}
7-
colons: {max-spaces-after: -1, level: error}
8-
commas: {max-spaces-after: -1, level: error}
5+
braces: { max-spaces-inside: 1, level: error }
6+
brackets: { max-spaces-inside: 1, level: error }
7+
colons: { max-spaces-after: -1, level: error }
8+
commas: { max-spaces-after: -1, level: error }
99
comments: disable
1010
comments-indentation: disable
1111
document-start: disable
12-
empty-lines: {max: 3, level: error}
13-
hyphens: {level: error}
12+
empty-lines: { max: 3, level: error }
13+
hyphens: { level: error }
1414
indentation:
1515
indent-sequences: consistent
1616
# spaces: consistent
@@ -23,9 +23,8 @@ rules:
2323
allow-non-breakable-words: true
2424
allow-non-breakable-inline-mappings: true
2525
new-line-at-end-of-file: disable
26-
new-lines: {type: unix}
26+
new-lines: disable
2727
trailing-spaces: disable
2828
truthy: disable
2929

30-
ignore:
31-
.tox
30+
ignore: .tox

MANIFEST.in

+9
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
include LICENSE README.rst
2+
3+
# Exclude what is in these folders
24
prune tests
5+
prune .github
6+
7+
# Exclude these files
8+
exclude package-lock.json
9+
exclude test-requirements.*
10+
recursive-exclude * *.py[co]
11+
recursive-exclude * __pycache__

0 commit comments

Comments
 (0)