Skip to content

Commit 4abceb1

Browse files
authored
Version 3.0.0 (#434)
* Add GitHub Action for coveralls * Version 3.0.0 * Add support to Python 3.12 (#431) * Drop support to Python 3.7 * Bump Flask version to >=3.0.0 * Bump JQuery version from 1.8.1 to 3.7.1 (fix security issue) * Bump several dependencies versions * Migrate configuration to pyproject.toml * Reorganizze requirements files * Remove flask_jsonrpc.__version__ attribute in favor to pyproject.toml version attribute * Add multi Python version on update workflow (#332) * Add new param to allow/disallow JSON-RPC Notification (#385) * Unified API Browser when using modular server (#391) * Add tests to all Python versions supported by the project (#395) * Add e2e tests to Web Browsable API (#401) * Goodbye Python 3.6 (#404) * Add support to Python 3.11 (#408) * Add rpc.describe RPC method: JSON Schema Service Descriptor (#412) * Project links fixed (#429)
1 parent 473103b commit 4abceb1

24 files changed

+95
-215
lines changed

.github/workflows/codeql_analysis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
uses: github/codeql-action/init@v3
2828
with:
2929
languages: ${{ matrix.language }}
30-
# queries: security-extended,security-and-quality
3130
- name: Setup Python
3231
if: ${{ matrix.language == 'python' }}
3332
uses: actions/setup-python@v5
@@ -36,7 +35,7 @@ jobs:
3635
- name: Build Application using script
3736
if: ${{ matrix.language == 'python' }}
3837
run: |
39-
python -m pip install --upgrade pip setuptools build
38+
python -m pip install build
4039
python -m build
4140
- name: Perform CodeQL Analysis
4241
uses: github/codeql-action/analyze@v3

.github/workflows/on_update.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
platform:
2121
- ubuntu-latest
22-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
22+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2323
steps:
2424
- name: Checkout source at ${{ matrix.platform }}
2525
uses: actions/checkout@v4
@@ -31,7 +31,7 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Install dependencies
3333
run: |
34-
python -m pip install -r requirements/base.txt -r requirements/ci.txt
34+
python -m pip install -r requirements/base.txt -r requirements/style.txt
3535
- name: Run flake8
3636
run: |
3737
flake8 src/ tests/
@@ -47,7 +47,7 @@ jobs:
4747
matrix:
4848
platform:
4949
- ubuntu-latest
50-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
50+
python-version: ["3.8", "3.9", "3.10", "3.11"]
5151
steps:
5252
- name: Checkout source at ${{ matrix.platform }}
5353
uses: actions/checkout@v4
@@ -59,20 +59,20 @@ jobs:
5959
python-version: ${{ matrix.python-version }}
6060
- name: Install dependencies
6161
run: |
62-
python -m pip install -r requirements/base.txt -r requirements/test.txt
62+
python -m pip install -r requirements/base.txt -r requirements/tests.txt
6363
- name: Run py.test
6464
run: |
6565
py.test
6666
6767
run-tox:
68-
name: Tox | Test, Style, Lint, Typing, Security and Docs
68+
name: Tox | Test, Style, Lint, Typing, Pytype, Security and Docs
6969
runs-on: ${{ matrix.platform }}
7070
strategy:
7171
fail-fast: false
7272
matrix:
7373
platform:
7474
- ubuntu-latest
75-
python-version: ["3.12"]
75+
python-version: ["3.11", "3.12"]
7676
steps:
7777
- name: Checkout source at ${{ matrix.platform }}
7878
uses: actions/checkout@v4
@@ -86,5 +86,10 @@ jobs:
8686
run: |
8787
python -m pip install --upgrade pip tox
8888
- name: Run tox
89+
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
8990
run: |
90-
tox -e py,py-async,style,typing,pytype,security,docs
91+
tox -e py,py-async,style,typing,security,docs
92+
- name: Run tox (Pytype)
93+
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
94+
run: |
95+
tox -e pytype

.github/workflows/pre_release.yml

Lines changed: 32 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@ on:
55
branches:
66
- master
77
- release/**
8+
tags-ignore:
9+
- v**
810

911
permissions:
1012
contents: read
1113

1214
jobs:
13-
lint:
14-
name: Lint
15+
run-tox:
16+
name: Tox | Test, Style, Lint, Typing, Pytype, Security and Docs
1517
runs-on: ${{ matrix.platform }}
1618
strategy:
1719
fail-fast: false
1820
matrix:
1921
platform:
2022
- ubuntu-latest
21-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
23+
python-version: ["3.11", "3.12"]
2224
steps:
2325
- name: Checkout source at ${{ matrix.platform }}
2426
uses: actions/checkout@v4
@@ -28,113 +30,20 @@ jobs:
2830
uses: actions/setup-python@v5
2931
with:
3032
python-version: ${{ matrix.python-version }}
31-
cache: 'pip'
32-
cache-dependency-path: 'requirements/*.txt'
3333
- name: Install dependencies
3434
run: |
35-
pip install --upgrade pip
36-
pip install -r requirements/base.txt
37-
pip install -r requirements/ci.txt
38-
- name: Lint with Flake8
39-
run: |
40-
flake8 src/ tests/
41-
- name: Lint with PyLint
42-
run: |
43-
pylint src/ tests/
44-
45-
pytype:
46-
name: Typing
47-
runs-on: ${{ matrix.platform }}
48-
strategy:
49-
fail-fast: false
50-
matrix:
51-
platform:
52-
- ubuntu-latest
53-
python-version: ["3.11"]
54-
steps:
55-
- name: Checkout source at ${{ matrix.platform }}
56-
uses: actions/checkout@v4
57-
with:
58-
ref: ${{ github.ref_name }}
59-
- name: Setup Python ${{ matrix.python-version }}
60-
uses: actions/setup-python@v5
61-
with:
62-
python-version: ${{ matrix.python-version }}
63-
cache: 'pip'
64-
cache-dependency-path: 'requirements/*.txt'
65-
- name: Install dependencies
66-
run: |
67-
pip install --upgrade pip
68-
pip install -r requirements/base.txt
69-
pip install -r requirements/ci.txt
70-
- name: Static type check with Pytype
71-
run: |
72-
pytype
73-
74-
typing:
75-
name: Typing
76-
runs-on: ${{ matrix.platform }}
77-
strategy:
78-
fail-fast: false
79-
matrix:
80-
platform:
81-
- ubuntu-latest
82-
python-version: ["3.12"]
83-
steps:
84-
- name: Checkout source at ${{ matrix.platform }}
85-
uses: actions/checkout@v4
86-
with:
87-
ref: ${{ github.ref_name }}
88-
- name: Setup Python ${{ matrix.python-version }}
89-
uses: actions/setup-python@v5
90-
with:
91-
python-version: ${{ matrix.python-version }}
92-
cache: 'pip'
93-
cache-dependency-path: 'requirements/*.txt'
94-
- name: Install dependencies
95-
run: |
96-
pip install --upgrade pip
97-
pip install -r requirements/base.txt
98-
pip install -r requirements/ci.txt
99-
- name: Static type check with MyPy
100-
run: |
101-
mypy --install-types --non-interactive src/
102-
103-
security:
104-
name: Security
105-
runs-on: ${{ matrix.platform }}
106-
strategy:
107-
fail-fast: false
108-
matrix:
109-
platform:
110-
- ubuntu-latest
111-
python-version: ["3.12"]
112-
steps:
113-
- name: Checkout source at ${{ matrix.platform }}
114-
uses: actions/checkout@v4
115-
with:
116-
ref: ${{ github.ref_name }}
117-
- name: Setup Python ${{ matrix.python-version }}
118-
uses: actions/setup-python@v5
119-
with:
120-
python-version: ${{ matrix.python-version }}
121-
cache: 'pip'
122-
cache-dependency-path: 'requirements/*.txt'
123-
- name: Install dependencies
124-
run: |
125-
pip install --upgrade pip
126-
pip install -r requirements/base.txt
127-
pip install -r requirements/ci.txt
128-
- name: Check security issue in code with Bandit
35+
python -m pip install --upgrade pip tox
36+
- name: Run tox
37+
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
12938
run: |
130-
bandit -r src/
131-
- name: Check dependencies for known security vulnerabilities with Safety
39+
tox -e py,py-async,style,typing,security,docs
40+
- name: Run tox (Pytype)
41+
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
13242
run: |
133-
safety check
43+
tox -e pytype
13444
13545
test:
13646
name: Test
137-
needs: [lint, typing, security]
13847
runs-on: ${{ matrix.platform }}
13948
strategy:
14049
fail-fast: false
@@ -159,7 +68,7 @@ jobs:
15968
run: |
16069
pip install --upgrade pip
16170
pip install -r requirements/base.txt
162-
pip install -r requirements/test.txt
71+
pip install -r requirements/tests.txt
16372
- name: Test and and run coverage with PyTest
16473
run: |
16574
py.test
@@ -170,6 +79,7 @@ jobs:
17079
name: test-n-coverage-report
17180
path: |
17281
.coverage
82+
coverage.lcov
17383
junit/
17484
htmlcov/
17585
@@ -184,34 +94,21 @@ jobs:
18494
- ubuntu-latest
18595
python-version: ["3.12"]
18696
steps:
187-
- name: Checkout source at ${{ matrix.platform }}
188-
uses: actions/checkout@v4
189-
with:
190-
ref: ${{ github.ref_name }}
191-
- name: Setup Python ${{ matrix.python-version }}
192-
uses: actions/setup-python@v5
193-
with:
194-
python-version: ${{ matrix.python-version }}
195-
cache: 'pip'
196-
cache-dependency-path: 'requirements/*.txt'
197-
- name: Install dependencies
198-
run: |
199-
pip install --upgrade pip
200-
pip install -r requirements/test.txt
20197
- name: Download a coverage artifact
20298
uses: actions/download-artifact@v4
20399
with:
204100
name: test-n-coverage-report
205101
- name: Send coverage stats to Coveralls
206-
env:
207-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
208-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
209-
run: |
210-
coveralls
102+
uses: coverallsapp/github-action@v2
103+
with:
104+
github-token: ${{ secrets.GITHUB_TOKEN }}
105+
format: lcov
106+
file: coverage.lcov
107+
allow-empty: true
211108

212109
build:
213110
name: Build source
214-
needs: coverage
111+
needs: [run-tox, coverage]
215112
runs-on: ${{ matrix.platform }}
216113
strategy:
217114
fail-fast: false
@@ -232,19 +129,16 @@ jobs:
232129
python-version: ${{ matrix.python-version }}
233130
- name: Build source and wheel distributions
234131
run: |
235-
python -m pip install --upgrade pip setuptools build
132+
python -m pip install build
236133
python -m build --outdir dist-${{ matrix.platform }}-${{ matrix.python-version }}
237134
- name: Tar build and wheel distributions files
238-
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
239135
run: |
240-
mv dist-${{ matrix.platform }}-${{ matrix.python-version }} dist
241-
tar -cvf dist.tar dist
136+
tar -cvf dist-${{ matrix.platform }}-${{ matrix.python-version }}.tar dist-${{ matrix.platform }}-${{ matrix.python-version }}
242137
- name: Upload build and wheel distributions files
243-
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
244138
uses: actions/upload-artifact@v4
245139
with:
246-
name: pre-release-build
247-
path: dist.tar
140+
name: pre-release-build-${{ matrix.platform }}-${{ matrix.python-version }}
141+
path: dist-${{ matrix.platform }}-${{ matrix.python-version }}.tar
248142

249143
publish-testpypi:
250144
name: Publish to TestPyPI
@@ -270,30 +164,17 @@ jobs:
270164
- name: Download build and wheel distributions files
271165
uses: actions/download-artifact@v4
272166
with:
273-
name: pre-release-build
167+
name: pre-release-build-${{ matrix.platform }}-${{ matrix.python-version }}
274168
- name: Build source and wheel distributions to version ${{ github.ref_name }}
275169
run: |
276-
python -m pip install --upgrade pip setuptools twine
277-
tar -xvf dist.tar
278-
twine check --strict dist/*
170+
python -m pip install twine
171+
tar -xvf dist-${{ matrix.platform }}-${{ matrix.python-version }}.tar
172+
twine check --strict dist-${{ matrix.platform }}-${{ matrix.python-version }}/*
279173
- name: Publish distribution to TestPyPI
280174
uses: pypa/[email protected]
281175
with:
282176
user: __token__
283177
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
284-
repository_url: https://test.pypi.org/legacy/
285-
skip_existing: true
286-
# - name: Create GitHub Pre Release
287-
# id: create_release
288-
# uses: softprops/action-gh-release@v1
289-
# with:
290-
# name: ${{ github.ref_name }}
291-
# draft: false
292-
# prerelease: true
293-
# generate_release_notes: true
294-
# files: |
295-
# COPYING
296-
# LICENSE
297-
# AUTHORS
298-
# README.md
299-
# dist/*
178+
repository-url: https://test.pypi.org/legacy/
179+
packages-dir: dist-${{ matrix.platform }}-${{ matrix.python-version }}/
180+
skip-existing: true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Build source and wheel distributions to version ${{ github.ref_name }}
3333
run: |
34-
python -m pip install --upgrade pip setuptools build twine
34+
python -m pip install build twine
3535
python -m build
3636
twine check --strict dist/*
3737
- name: Publish distribution to PyPI

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Tests
1+
name: Tests [Docker]
22

33
on:
44
push:
5-
branches: ["master"]
5+
branches:
6+
- master
7+
- release/**
68
tags-ignore:
79
- v**
8-
pull_request:
9-
branches: ["master"]
1010

1111
permissions:
1212
contents: read

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ htmlcov/
111111
.nox/
112112
.coverage
113113
.coverage.*
114+
coverage.*
114115
.cache
115116
nosetests.xml
116117
coverage.xml

0 commit comments

Comments
 (0)