-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to pyproject.toml and deprecate the
__version__
attr (#560)
* Switch to pyproject.toml * Improve the implementation and wording * Add `build` package and update dependencies * Deprecate the `__version__` attribute. --------- Co-authored-by: Grey Li <withlihui@gmail.com>
- Loading branch information
Showing
14 changed files
with
167 additions
and
176 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[flake8] | ||
# B = bugbear | ||
# E = pycodestyle errors | ||
# F = flake8 pyflakes | ||
# W = pycodestyle warnings | ||
# B9 = bugbear opinions | ||
# ISC = implicit-str-concat | ||
# Q0 = quotes | ||
select = B, E, F, W, B9, ISC, Q0 | ||
# flake8-quotes | ||
inline-quotes = single | ||
multiline-quotes = double | ||
docstring-quotes = double | ||
avoid-escape = True | ||
|
||
ignore = | ||
# bin op line break, invalid | ||
W503 | ||
# up to 88 allowed by bugbear B950 | ||
max-line-length = 100 | ||
per-file-ignores = | ||
# modules export names | ||
src/apiflask/__init__.py: F401 | ||
src/apiflask/fields.py: F401 | ||
src/apiflask/validators.py: F401 | ||
src/apiflask/views.py: F401 | ||
# HTML templates | ||
src/apiflask/ui_templates.py: E501, B950 | ||
exclude = | ||
# only used when running flake8 manually | ||
.* | ||
*.txt | ||
*.md | ||
__pycache__ |
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,77 @@ | ||
[project] | ||
name = "APIFlask" | ||
description = "A lightweight web API framework based on Flask and marshmallow-code projects." | ||
readme = "README.md" | ||
license = { text = "MIT" } | ||
authors = [{ name = "Grey Li", email = "withlihui@gmail.com" }] | ||
version = "2.1.2-dev" | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Web Environment", | ||
"Framework :: Flask", | ||
"Intended Audience :: Developers", | ||
"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", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application", | ||
"Topic :: Software Development :: Libraries :: Application Frameworks", | ||
] | ||
dependencies = [ | ||
"flask >= 2", | ||
"flask-marshmallow >= 1.0.0", | ||
"marshmallow >= 3.20", | ||
"webargs >= 8.3", | ||
"flask-httpauth >= 4", | ||
"apispec >= 6", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://apiflask.com/docs" | ||
Changes = "https://apiflask.com/changelog" | ||
"Source Code" = "https://github.com/apiflask/apiflask" | ||
"Issue Tracker" = "https://github.com/apiflask/apiflask/issues" | ||
Donate = "https://opencollective.com/apiflask" | ||
|
||
[project.optional-dependencies] | ||
dotenv = ["python-dotenv"] | ||
async = ["asgiref>=3.2"] | ||
yaml = ["pyyaml"] | ||
|
||
[project.scripts] | ||
apiflask = "flask.cli:main" | ||
spec = "apiflask.commands:spec_command" | ||
|
||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.mypy] | ||
files = ["src/apiflask"] | ||
allow_redefinition = true | ||
warn_redundant_casts = true | ||
warn_unused_configs = true | ||
no_implicit_optional = true | ||
local_partial_types = true | ||
strict_equality = true | ||
warn_return_any = true | ||
warn_unreachable = true | ||
disallow_untyped_calls = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = ["flask_marshmallow.*", "apispec.*", "flask_httpauth.*"] | ||
ignore_missing_imports = true | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests", "examples"] | ||
filterwarnings = ["ignore::UserWarning"] | ||
addopts = ["--cov=apiflask", "--cov-branch", "--cov-report=term-missing"] | ||
|
||
[tool.coverage.run] | ||
omit = ["src/apiflask/_decorators.py", "src/apiflask/views.py"] |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
pip-compile-multi | ||
tox | ||
pre-commit | ||
build |
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
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
Oops, something went wrong.