-
Notifications
You must be signed in to change notification settings - Fork 103
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
1 parent
f707b0c
commit 4de2899
Showing
26 changed files
with
115 additions
and
136 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,4 @@ | ||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
pragma: nopy38 |
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 |
---|---|---|
|
@@ -107,3 +107,4 @@ venv.bak/ | |
*.sqlite3 | ||
|
||
.idea/ | ||
.ruff_cache/ |
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,45 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "djangorestframework-api-key" | ||
description = "API key permissions for the Django REST Framework" | ||
requires-python = ">=3.8" | ||
license = { text = "MIT" } | ||
authors = [ | ||
{ name = "Florimond Manca", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Operating System :: OS Independent", | ||
"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", | ||
"Environment :: Web Environment", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Framework :: Django", | ||
"Framework :: Django :: 2.2", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.2", | ||
] | ||
dependencies = [ | ||
"packaging", | ||
] | ||
dynamic = ["version", "readme"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/florimondmanca/djangorestframework-api-key" | ||
"Documentation" = "https://florimondmanca.github.io/djangorestframework-api-key/" | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "rest_framework_api_key.__version__" } | ||
readme = { file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown" } | ||
|
||
[tool.ruff] | ||
select = ["E", "F", "I"] | ||
line-length = 88 | ||
src = ["src", "test_project", "tests"] |
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 |
---|---|---|
@@ -1,20 +1,11 @@ | ||
[flake8] | ||
ignore = W503, E203, B305 | ||
max-line-length = 88 | ||
|
||
[mypy] | ||
disallow_untyped_defs = True | ||
ignore_missing_imports = True | ||
|
||
[tool:isort] | ||
profile = black | ||
known_third_party = test_project | ||
|
||
[tool:pytest] | ||
testpaths = tests | ||
addopts = | ||
-rxXs | ||
--cov=rest_framework_api_key | ||
--cov=tests | ||
--cov=src | ||
--cov-report=term-missing | ||
--cov-fail-under=100 |
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,55 +1,3 @@ | ||
import re | ||
from pathlib import Path | ||
from setuptools import setup | ||
|
||
from setuptools import find_packages, setup | ||
|
||
|
||
def get_version(package: str) -> str: | ||
version = (Path("src") / package / "__version__.py").read_text() | ||
match = re.search("__version__ = ['\"]([^'\"]+)['\"]", version) | ||
assert match is not None | ||
return match.group(1) | ||
|
||
|
||
def get_long_description() -> str: | ||
with open("README.md", encoding="utf8") as readme: | ||
with open("CHANGELOG.md", encoding="utf8") as changelog: | ||
return readme.read() + "\n\n" + changelog.read() | ||
|
||
|
||
setup( | ||
name="djangorestframework-api-key", | ||
version=get_version("rest_framework_api_key"), | ||
description="API key permissions for the Django REST Framework", | ||
long_description=get_long_description(), | ||
long_description_content_type="text/markdown", | ||
url="http://github.com/florimondmanca/djangorestframework-api-key", | ||
project_urls={ | ||
"Documentation": "https://florimondmanca.github.io/djangorestframework-api-key/" | ||
}, | ||
author="Florimond Manca", | ||
author_email="[email protected]", | ||
packages=find_packages("src"), | ||
package_dir={"": "src"}, | ||
include_package_data=True, | ||
zip_safe=False, | ||
install_requires=["packaging"], | ||
python_requires=">=3.7", | ||
license="MIT", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Environment :: Web Environment", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Framework :: Django", | ||
"Framework :: Django :: 2.2", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.2", | ||
], | ||
) | ||
setup() # Editable installs. |
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,8 +1,11 @@ | ||
import django | ||
try: | ||
import django | ||
except ImportError: # pragma: no cover | ||
pass | ||
else: | ||
if django.VERSION < (3, 2): # pragma: no cover | ||
default_app_config = "rest_framework_api_key.apps.RestFrameworkApiKeyConfig" | ||
|
||
from .__version__ import __version__ | ||
|
||
if django.VERSION < (3, 2): # pragma: no cover | ||
default_app_config = "rest_framework_api_key.apps.RestFrameworkApiKeyConfig" | ||
__version__ = "2.3.0" | ||
|
||
__all__ = ["__version__", "default_app_config"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [] # type: ignore | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
operations = [ | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("heroes", "0002_prefix_hashed_key"), | ||
] | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("heroes", "0003_alter_hero_id"), | ||
] | ||
|
Oops, something went wrong.