-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
171 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,47 +3,75 @@ on: | |
push: | ||
pull_request: | ||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.11' | ||
- run: python -m pip install --upgrade pip wheel | ||
- run: pip install tox | ||
- run: tox -elint | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- {name: '3.8', python: '3.8', tox: py38} | ||
- {name: '3.12', python: '3.12', tox: py312} | ||
- { name: '3.8', python: '3.8', tox: py38 } | ||
- { name: '3.12', python: '3.12', tox: py312 } | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- uses: actions/setup-python@v4.3.0 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
allow-prereleases: true | ||
- name: Run test | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
pip install tox | ||
tox -e${{ matrix.tox }} | ||
python -m pip install tox | ||
python -m tox -e ${{ matrix.tox }} | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v3 | ||
release: | ||
needs: [lint, tests] | ||
name: PyPI release | ||
build: | ||
name: Build package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install pypa/build | ||
run: python -m pip install build | ||
- name: Build a binary wheel and a source tarball | ||
run: python -m build | ||
- name: Install twine | ||
run: python -m pip install twine | ||
- name: Check build | ||
run: python -m twine check --strict dist/* | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
# this duplicates pre-commit.ci, so only run it on tags | ||
# it guarantees that linting is passing prior to a release | ||
lint-pre-release: | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
- run: python -m pip install --upgrade pip wheel | ||
- run: pip install twine | ||
- run: python setup.py sdist bdist_wheel | ||
- run: twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/* | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- run: python -m pip install tox | ||
- run: python -m tox -e lint | ||
publish-to-pypi: | ||
name: PyPI release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [build, tests, lint-pre-release] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/flask-smorest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.1 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.2.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
- repo: https://github.com/psf/black | ||
rev: 24.2.0 | ||
- id: ruff | ||
- id: ruff-format | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.28.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-bugbear==24.2.6] | ||
- id: check-github-workflows | ||
- id: check-readthedocs | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.16.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==22.3.0] | ||
additional_dependencies: [black==23.12.1] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
[project] | ||
name = "flask-smorest" | ||
version = "0.44.0" | ||
description = "Flask/Marshmallow-based REST API framework" | ||
readme = "README.rst" | ||
license = { file = "LICENSE" } | ||
authors = [{ name = "Jérôme Lafréchoux", email = "[email protected]" }] | ||
maintainers = [ | ||
{ name = "Jérôme Lafréchoux", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Environment :: Web Environment", | ||
"Framework :: Flask", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"werkzeug>=3.0.1,<4", | ||
"flask>=3.0.2,<4", | ||
"marshmallow>=3.18.0,<4", | ||
"webargs>=8.0.0,<9", | ||
"apispec[marshmallow]>=6.0.0,<7", | ||
] | ||
|
||
[project.urls] | ||
Changelog = "https://flask-smorest.readthedocs.io/en/latest/changelog.html" | ||
Funding = "https://opencollective.com/marshmallow" | ||
Issues = "https://github.com/marshmallow-code/flask-smorest/issues" | ||
Source = "https://github.com/marshmallow-code/flask-smorest" | ||
Tidelift = "https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=pypi" | ||
|
||
[project.optional-dependencies] | ||
docs = [ | ||
"sphinx==7.2.6", | ||
"sphinx-issues==4.0.0", | ||
"alabaster==0.7.16", | ||
] | ||
tests = [ | ||
"pytest==8.0.2", | ||
"pytest-cov==4.1.0", | ||
"coverage==7.4.3", | ||
"werkzeug==3.0.1", | ||
"flask==3.0.2", | ||
"marshmallow==3.20.2", | ||
"webargs==8.4.0", | ||
"apispec==6.4.0", | ||
"PyYAML==6.0.1", | ||
] | ||
dev = [ | ||
"flask-smorest[tests]", | ||
"tox", | ||
"pre-commit~=3.6", | ||
] | ||
|
||
[build-system] | ||
requires = ["flit_core<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[tool.flit.sdist] | ||
include = [ | ||
"docs/", | ||
"tests/", | ||
"CHANGELOG.rst", | ||
"CONTRIBUTING.rst", | ||
"tox.ini", | ||
] | ||
exclude = ["docs/_build/"] | ||
|
||
[tool.ruff] | ||
src = ["src"] | ||
fix = true | ||
show-fixes = true | ||
output-format = "full" | ||
|
||
[tool.ruff.lint] | ||
ignore = ["I001", "E203", "E266", "E501", "E731"] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"E", # pycodestyle error | ||
"F", # pyflakes | ||
"I", # isort | ||
"UP", # pyupgrade | ||
"W", # pycodestyle warning | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = ".git .ropeproject .tox docs env venv" | ||
addopts = "-v --tb=short" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters