diff --git a/Makefile b/Makefile index 8b19773..7b7c377 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ deps: pip-compile requirements.in - pip-compile dev-requirements.in - pip-sync requirements.txt dev-requirements.txt + pip-compile requirements-dev.in + pip-sync requirements.txt requirements-dev.txt lint: - ruff src $(ARGS) + ruff lint src fix: - ruff src --fix + ruff format src && ruff lint src --fix test: pytest src $(ARGS) diff --git a/dev-requirements.in b/dev-requirements.in deleted file mode 100644 index 648a8d0..0000000 --- a/dev-requirements.in +++ /dev/null @@ -1,8 +0,0 @@ -ruff - -pytest -pytest-cov -pytest-django -mixer - -ipython \ No newline at end of file diff --git a/dev-requirements.txt b/dev-requirements.txt deleted file mode 100644 index 33330ff..0000000 --- a/dev-requirements.txt +++ /dev/null @@ -1,67 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile dev-requirements.in -# -asttokens==2.4.1 - # via stack-data -coverage[toml]==7.4.1 - # via pytest-cov -decorator==5.1.1 - # via ipython -executing==2.0.1 - # via stack-data -faker==12.0.1 - # via mixer -iniconfig==2.0.0 - # via pytest -ipython==8.21.0 - # via -r dev-requirements.in -jedi==0.19.1 - # via ipython -matplotlib-inline==0.1.6 - # via ipython -mixer==7.2.2 - # via -r dev-requirements.in -packaging==23.2 - # via pytest -parso==0.8.3 - # via jedi -pexpect==4.9.0 - # via ipython -pluggy==1.4.0 - # via pytest -prompt-toolkit==3.0.43 - # via ipython -ptyprocess==0.7.0 - # via pexpect -pure-eval==0.2.2 - # via stack-data -pygments==2.17.2 - # via ipython -pytest==8.0.0 - # via - # -r dev-requirements.in - # pytest-cov - # pytest-django -pytest-cov==4.1.0 - # via -r dev-requirements.in -pytest-django==4.8.0 - # via -r dev-requirements.in -python-dateutil==2.8.2 - # via faker -ruff==0.2.1 - # via -r dev-requirements.in -six==1.16.0 - # via - # asttokens - # python-dateutil -stack-data==0.6.3 - # via ipython -traitlets==5.14.1 - # via - # ipython - # matplotlib-inline -wcwidth==0.2.13 - # via prompt-toolkit diff --git a/pyproject.toml b/pyproject.toml index 7c1c619..3ff679d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,3 +6,16 @@ line-length = 90 [tool.pytest.ini_options] DJANGO_SETTINGS_MODULE = "app.settings" pythonpath = "src" + + +[tool.mypy] +python_version = "3.12" +plugins = [ + "mypy_django_plugin.main", + "mypy_drf_plugin.main" +] +mypy_path = "src" +ignore_missing_imports = true + +[tool.django-stubs] +django_settings_module = "app.settings" \ No newline at end of file diff --git a/requirements-dev.in b/requirements-dev.in new file mode 100644 index 0000000..c04ba01 --- /dev/null +++ b/requirements-dev.in @@ -0,0 +1,12 @@ +ruff + +pytest +pytest-cov +pytest-django +mixer + +mypy +django-stubs[compatible-mypy] +djangorestframework-stubs[compatible-mypy] + +ipython \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..cf3085b --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,116 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile requirements-dev.in +# +asgiref==3.8.1 + # via + # django + # django-stubs +asttokens==2.4.1 + # via stack-data +certifi==2024.6.2 + # via requests +charset-normalizer==3.3.2 + # via requests +coverage[toml]==7.5.3 + # via pytest-cov +decorator==5.1.1 + # via ipython +django==5.0.6 + # via + # django-stubs + # django-stubs-ext +django-stubs[compatible-mypy]==5.0.2 + # via + # -r requirements-dev.in + # djangorestframework-stubs +django-stubs-ext==5.0.2 + # via django-stubs +djangorestframework-stubs[compatible-mypy]==3.15.0 + # via -r requirements-dev.in +executing==2.0.1 + # via stack-data +faker==12.0.1 + # via mixer +idna==3.7 + # via requests +iniconfig==2.0.0 + # via pytest +ipython==8.25.0 + # via -r requirements-dev.in +jedi==0.19.1 + # via ipython +matplotlib-inline==0.1.7 + # via ipython +mixer==7.2.2 + # via -r requirements-dev.in +mypy==1.10.0 + # via + # -r requirements-dev.in + # django-stubs + # djangorestframework-stubs +mypy-extensions==1.0.0 + # via mypy +packaging==24.0 + # via pytest +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pluggy==1.5.0 + # via pytest +prompt-toolkit==3.0.46 + # via ipython +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pygments==2.18.0 + # via ipython +pytest==8.2.2 + # via + # -r requirements-dev.in + # pytest-cov + # pytest-django +pytest-cov==5.0.0 + # via -r requirements-dev.in +pytest-django==4.8.0 + # via -r requirements-dev.in +python-dateutil==2.9.0.post0 + # via faker +requests==2.32.3 + # via djangorestframework-stubs +ruff==0.4.7 + # via -r requirements-dev.in +six==1.16.0 + # via + # asttokens + # python-dateutil +sqlparse==0.5.0 + # via django +stack-data==0.6.3 + # via ipython +traitlets==5.14.3 + # via + # ipython + # matplotlib-inline +types-pyyaml==6.0.12.20240311 + # via + # django-stubs + # djangorestframework-stubs +types-requests==2.32.0.20240602 + # via djangorestframework-stubs +typing-extensions==4.12.1 + # via + # django-stubs + # django-stubs-ext + # djangorestframework-stubs + # mypy +urllib3==2.2.1 + # via + # requests + # types-requests +wcwidth==0.2.13 + # via prompt-toolkit diff --git a/requirements.in b/requirements.in index 376fe7d..efd2dba 100644 --- a/requirements.in +++ b/requirements.in @@ -3,9 +3,9 @@ djangorestframework django-environ django-behaviors django-cors-headers -django-oauth-toolkit psycopg2-binary uritemplate pyyaml whitenoise +httpx \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e01f05a..a22edda 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,23 +4,14 @@ # # pip-compile requirements.in # -asgiref==3.7.2 +asgiref==3.8.1 # via # django # django-cors-headers -certifi==2024.2.2 - # via requests -cffi==1.16.0 - # via cryptography -charset-normalizer==3.3.2 - # via requests -cryptography==42.0.4 - # via jwcrypto -django==5.0.2 +django==5.0.6 # via # -r requirements.in # django-cors-headers - # django-oauth-toolkit # djangorestframework django-behaviors==0.5.1 # via -r requirements.in @@ -28,33 +19,15 @@ django-cors-headers==4.3.1 # via -r requirements.in django-environ==0.11.2 # via -r requirements.in -django-oauth-toolkit==2.3.0 +djangorestframework==3.15.1 # via -r requirements.in -djangorestframework==3.14.0 - # via -r requirements.in -idna==3.6 - # via requests -jwcrypto==1.5.4 - # via django-oauth-toolkit -oauthlib==3.2.2 - # via django-oauth-toolkit psycopg2-binary==2.9.9 # via -r requirements.in -pycparser==2.21 - # via cffi -pytz==2024.1 - # via djangorestframework pyyaml==6.0.1 # via -r requirements.in -requests==2.31.0 - # via django-oauth-toolkit -sqlparse==0.4.4 +sqlparse==0.5.0 # via django -typing-extensions==4.9.0 - # via jwcrypto uritemplate==4.1.1 # via -r requirements.in -urllib3==2.2.1 - # via requests whitenoise==6.6.0 # via -r requirements.in diff --git a/src/app/settings.py b/src/app/settings.py index 24bab21..eb31340 100644 --- a/src/app/settings.py +++ b/src/app/settings.py @@ -42,7 +42,6 @@ "rest_framework", "whitenoise", "corsheaders", - "oauth2_provider", ] INSTALLED_APPS = INTERNAL_APPS + THIRD_PARTY_APPS