Skip to content

Commit 923cabc

Browse files
authored
Update packaging - github actions (#125)
1 parent d03522b commit 923cabc

File tree

17 files changed

+97
-142
lines changed

17 files changed

+97
-142
lines changed

.bumpversion.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[bumpversion]
2+
current_version = 0.9.2
3+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.?)(?P<release>[a-z]*)(?P<relver>\d*)
4+
serialize =
5+
{major}.{minor}.{patch}.{release}{relver}
6+
{major}.{minor}.{patch}
7+
commit = True
8+
tag = True
9+
sign_tags = True
10+
tag_name = {new_version}
11+
message = Release {new_version}
12+
13+
[bumpversion:part:release]
14+
optional_value = gamma
15+
values =
16+
dev
17+
a
18+
b
19+
rc
20+
gamma
21+
22+
[bumpversion:file:taiga/__init__.py]

.github/workflows/lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ jobs:
88
if: "!contains(github.event.head_commit.message, '[skip ci]')"
99
strategy:
1010
matrix:
11-
python-version: [3.8]
12-
toxenv: [pep8, isort, black, pypi-description, docs, towncrier]
11+
python-version: ["3.11.x"]
12+
toxenv: [ruff, isort, black, pypi-description, towncrier]
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
with:
1616
repository: ${{ github.event.pull_request.head.repo.full_name }}
1717
ref: ${{ github.event.pull_request.head.ref }}
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v1
19+
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Cache pip
23-
uses: actions/cache@v1
23+
uses: actions/cache@v3
2424
with:
2525
path: ~/.cache/pip
2626
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
2727
restore-keys: |
2828
${{ runner.os }}-pip-${{ matrix.toxenv }}
2929
- name: Cache tox
30-
uses: actions/cache@v1
30+
uses: actions/cache@v3
3131
with:
3232
path: .tox
3333
key: ${{ runner.os }}-lint-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }}

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
- name: Set up Python
13-
uses: actions/setup-python@v1
13+
uses: actions/setup-python@v4
1414
with:
1515
python-version: '3.x'
1616
- name: Cache pip
17-
uses: actions/cache@v1
17+
uses: actions/cache@v3
1818
with:
1919
path: ~/.cache/pip
2020
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
2121
restore-keys: |
2222
${{ runner.os }}-pip-${{ matrix.toxenv }}
2323
- name: Cache tox
24-
uses: actions/cache@v1
24+
uses: actions/cache@v3
2525
with:
2626
path: .tox
2727
key: ${{ runner.os }}-tox-release-${{ hashFiles('setup.cfg') }}

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.9, 3.8, 3.7, 3.6]
11+
python-version: ["3.11", "3.10", "3.9"]
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1616
with:
1717
python-version: ${{ matrix.python-version }}
1818
- name: Cache pip
19-
uses: actions/cache@v1
19+
uses: actions/cache@v3
2020
with:
2121
path: ~/.cache/pip
2222
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
2323
restore-keys: |
2424
${{ runner.os }}-pip-${{ matrix.toxenv }}
2525
- name: Cache tox
26-
uses: actions/cache@v1
26+
uses: actions/cache@v3
2727
with:
2828
path: .tox
2929
key: ${{ runner.os }}-tox-${{ format('{{py{0}}}', matrix.python-version) }}-${{ hashFiles('setup.cfg') }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ debian/debhelper*
4343
debian/files
4444
debian/python-taiga*
4545
debian/python3-taiga*
46+
.ruff_cache

.pre-commit-config.yaml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
exclude: "(.idea|node_modules|.tox)"
44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.0.1
6+
rev: v4.4.0
77
hooks:
88
- id: trailing-whitespace
9+
exclude: "setup.cfg"
910
- id: end-of-file-fixer
1011
- id: check-yaml
1112
- id: check-added-large-files
@@ -16,42 +17,29 @@ repos:
1617
- id: fix-encoding-pragma
1718
args:
1819
- --remove
19-
- repo: https://github.com/timothycrosley/isort
20-
rev: "5.9.3"
20+
- repo: https://github.com/PyCQA/isort
21+
rev: "5.12.0"
2122
hooks:
2223
- id: isort
2324
- repo: https://github.com/psf/black
24-
rev: 21.9b0
25+
rev: 23.3.0
2526
hooks:
2627
- id: black
27-
- repo: https://gitlab.com/pycqa/flake8
28-
rev: 3.9.2
28+
- repo: https://github.com/charliermarsh/ruff-pre-commit
29+
rev: 'v0.0.262'
2930
hooks:
30-
- id: flake8
31-
additional_dependencies:
32-
- flake8-broken-line
33-
- flake8-bugbear
34-
- flake8-builtins
35-
- flake8-coding
36-
- flake8-commas
37-
- flake8-comprehensions
38-
- flake8-eradicate
39-
- flake8-quotes
40-
- flake8-tidy-imports
41-
- pep8-naming
42-
- repo: https://github.com/econchick/interrogate
43-
rev: 1.5.0
44-
hooks:
45-
- id: interrogate
46-
args:
47-
- "-cpyproject.toml"
48-
- "--quiet"
31+
- id: ruff
4932
- repo: https://github.com/asottile/pyupgrade
50-
rev: v2.29.0
33+
rev: v3.3.1
5134
hooks:
5235
- id: pyupgrade
5336
args:
5437
- --py3-plus
38+
- repo: https://github.com/adamchainz/django-upgrade
39+
rev: "1.13.0"
40+
hooks:
41+
- id: django-upgrade
42+
args: [--target-version, "3.2"]
5543
- repo: local
5644
hooks:
5745
- id: towncrier
@@ -60,3 +48,6 @@ repos:
6048
language: system
6149
pass_filenames: false
6250
always_run: true
51+
ci:
52+
skip:
53+
- towncrier

changes/124.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update packaging - python versions

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
export PYBUILD_NAME=taiga
33
export PYBUILD_DISABLE=test
44
%:
5-
dh $@ --with python2,python3 --buildsystem=pybuild
5+
dh $@ --with python3 --buildsystem=pybuild

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#
7272
# This is also used if you do content translation via gettext catalogs.
7373
# Usually you set "language" from the command line for these cases.
74-
language = None
74+
language = "en"
7575

7676
# There are two options for replacing |today|: either, you set today to some
7777
# non-false value, then it is used:

pyproject.toml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ build-backend = "setuptools.build_meta"
44

55
[tool.black]
66
line-length = 119
7-
target-version = ["py36"]
8-
include = 'taiga/*py'
7+
target-version = ["py310"]
98

109
[tool.towncrier]
11-
package = "python-taiga"
10+
package = "taiga"
1211
directory = "changes"
1312
filename = "HISTORY.rst"
1413
title_format = "{version} ({project_date})"
@@ -28,3 +27,22 @@ verbose = 0
2827
quiet = false
2928
whitelist-regex = []
3029
color = true
30+
31+
[tool.isort]
32+
profile = "black"
33+
combine_as_imports = true
34+
default_section = "THIRDPARTY"
35+
force_grid_wrap = 0
36+
include_trailing_comma = true
37+
known_first_party = "knocker"
38+
line_length = 119
39+
multi_line_output = 3
40+
use_parentheses = true
41+
42+
[tool.ruff]
43+
ignore = []
44+
line-length = 119
45+
target-version = "py310"
46+
47+
[tool.ruff.mccabe]
48+
max-complexity = 10

requirements-test.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
-r requirements.txt
22
coverage
33
coveralls>=2.0
4-
codecov
5-
mock

setup.cfg

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
[bumpversion]
2-
current_version = 0.9.2
3-
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.?)(?P<release>[a-z]*)(?P<relver>\d*)
4-
serialize =
5-
{major}.{minor}.{patch}.{release}{relver}
6-
{major}.{minor}.{patch}
7-
commit = True
8-
tag = True
9-
sign_tags = True
10-
tag_name = {new_version}
11-
message = Release {new_version}
12-
13-
[bumpversion:part:release]
14-
optional_value = gamma
15-
values =
16-
dev
17-
a
18-
b
19-
rc
20-
gamma
21-
22-
[bumpversion:file:taiga/__init__.py]
23-
241
[metadata]
252
name = python-taiga
263
version = attr: taiga.__version__
@@ -31,20 +8,20 @@ description = Taiga python API
318
long_description = file: README.rst, HISTORY.rst
329
long_description_content_type = text/x-rst
3310
license = MIT
34-
license_file = LICENSE
11+
license_files = LICENSE
3512
keywords = taiga kanban wrapper api
3613
classifiers =
3714
License :: OSI Approved :: MIT License
3815
Natural Language :: English
3916
Operating System :: OS Independent
4017
Development Status :: 5 - Production/Stable
4118
Programming Language :: Python
42-
Programming Language :: Python :: 2
43-
Programming Language :: Python :: 2.7
4419
Programming Language :: Python :: 3
45-
Programming Language :: Python :: 3.5
46-
Programming Language :: Python :: 3.6
4720
Programming Language :: Python :: 3.7
21+
Programming Language :: Python :: 3.8
22+
Programming Language :: Python :: 3.9
23+
Programming Language :: Python :: 3.10
24+
Programming Language :: Python :: 3.11
4825

4926
[options]
5027
include_package_data = True
@@ -54,7 +31,7 @@ install_requires =
5431
python-dateutil>=2.4
5532
pyjwkest>=1.0
5633
packages = taiga
57-
python_requires = >=3.6
34+
python_requires = >=3.7
5835
setup_requires =
5936
setuptools
6037
zip_safe = False
@@ -68,9 +45,6 @@ taiga = *.html *.png *.gif *js *jpg *jpeg *svg *py *mo *po
6845
docs =
6946
sphinx
7047

71-
[upload]
72-
repository = https://upload.pypi.org/legacy/
73-
7448
[sdist]
7549
formats = zip
7650

taiga/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040

4141
class SearchResult:
42-
4342
count = 0
4443
tasks = []
4544
issues = []

taiga/models/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def parse(cls, requester, entry):
192192
"""
193193
Turns a JSON object into a model instance.
194194
"""
195-
if not type(entry) is dict:
195+
if type(entry) is not dict:
196196
return entry
197197
for key_to_parse, cls_to_parse in cls.parser.items():
198198
if key_to_parse in entry:

taiga/models/models.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ class EpicStatus(InstanceResource):
365365

366366

367367
class EpicStatuses(ListResource):
368-
369368
instance = EpicStatus
370369

371370
def create(self, project, name, **attrs):
@@ -516,7 +515,6 @@ class UserStoryStatus(InstanceResource):
516515

517516

518517
class UserStoryStatuses(ListResource):
519-
520518
instance = UserStoryStatus
521519

522520
def create(self, project, name, **attrs):
@@ -672,7 +670,6 @@ class TaskStatus(InstanceResource):
672670

673671

674672
class TaskStatuses(ListResource):
675-
676673
instance = TaskStatus
677674

678675
def create(self, project, name, **attrs):
@@ -940,7 +937,6 @@ def attach(self, attached_file, **attrs):
940937

941938

942939
class Issues(ListResource):
943-
944940
instance = Issue
945941

946942
def create(self, project, subject, priority, status, issue_type, severity, **attrs):

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def clean(c):
2626
@task
2727
def lint(c):
2828
"""Run linting tox environments."""
29-
c.run("tox -epep8,isort,black,pypi-description")
29+
c.run("tox -eruff,isort,black,pypi-description")
3030

3131

3232
@task # NOQA

0 commit comments

Comments
 (0)