Skip to content

Commit 6f200cd

Browse files
authored
Merge pull request #3 from mosquito/refactoring
feat: Refactor project structure, JWT API, CI/CD, and documentation - Migrated CI/CD from Travis CI to GitHub Actions. - Adopted poetry for dependency and package management. - Standardized EditorConfig and removed legacy configuration files. - Refactored JWT API: - Replaced `private_key` and `public_key` with a single `key` parameter. - Added `algorithms` and `options` parameters for decoding. - Enhanced documentation and replaced README.rst with README.md. - Dropped support for Python versions below 3.10. - Improved RSA key management APIs and CLI commands. - Introduced modern testing suite with pytest and pytest-cov. Breaking Changes: - `JWT` constructor API has been updated. - Legacy tools (`bump.py`, `Makefile`, Travis CI`) have been removed.
2 parents 8b5a829 + 3297c58 commit 6f200cd

35 files changed

+2096
-726
lines changed

.editorconfig

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ insert_final_newline = true
66
charset = utf-8
77
trim_trailing_whitespace = true
88

9-
[*.{py,yml}]
9+
[*.{py,yml,md}]
1010
indent_style = space
1111

1212
[*.py]
1313
indent_size = 4
14+
max_line_length = 119
1415

15-
[docs/**.py]
16-
max_line_length = 80
17-
18-
[*.rst]
19-
indent_size = 3
16+
[*.md]
17+
indent_size = 4
2018

2119
[Makefile]
2220
indent_style = tab
Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
4-
name: Python package
1+
name: tests
52

63
on:
74
push:
@@ -10,24 +7,35 @@ on:
107
branches: [ master ]
118

129
jobs:
13-
build:
14-
10+
tests:
1511
runs-on: ubuntu-latest
1612
strategy:
13+
fail-fast: false
14+
1715
matrix:
18-
python-version: [3.5, 3.6, 3.7, 3.8]
16+
include:
17+
- python: '3.10'
18+
- python: '3.11'
19+
- python: '3.12'
20+
- python: '3.13'
1921

2022
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v1
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install -r requirements.txt
30-
pip install -r requirements.dev.txt
31-
- name: Test with pytest
32-
run: |
33-
pytest
23+
- uses: actions/checkout@v2
24+
25+
- name: Setup python${{ matrix.python }}
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: "${{ matrix.python }}"
29+
30+
- name: Install poetry
31+
run: python -m pip install poetry
32+
33+
- name: Install dependencies
34+
run: poetry install
35+
env:
36+
FORCE_COLOR: yes
37+
38+
- name: Run tests
39+
run: poetry run pytest
40+
env:
41+
FORCE_COLOR: yes

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ fabric.properties
139139

140140
/*/version.py
141141

142-
.mypy_cache/*
142+
.*_cache/

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

LICENCE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Dmiry Orlov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)