Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ use pip-tool to autogenerate dependencies #478

Merged
merged 6 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: ⬆
# Python
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
commit-message:
prefix: ⬆
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: pip install -e .[lint]
run: pip install -r requirements/pyproject.txt && pip install -r requirements/linting.txt
- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files --verbose
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -e .[test,oauth2,profiler,metrics,session,cache]
run: pip install -r requirements/all.txt
- name: Test
env:
ENV: test
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
- id: check-yaml
exclude: mkdocs.yml
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.270
rev: v0.0.275
hooks:
- id: ruff
args:
Expand All @@ -24,7 +24,7 @@ repos:
- id: black
args: ["--target-version", "py39"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.7.0
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ If it shows the `pip` binary at `env/bin/pip` then it worked. 🎉

### pip

After activating the environment as described above, Now lets install all the package that you need to develop Ormdantic:
After activating the environment as described above, Now lets install all the package that you need to develop authx:

<div class="termy">

```console
$ pip install -e .[test,lint,docs]
$ pip install -r requirements/all.txt

---> 100%
```
Expand Down
6 changes: 5 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,9 @@ pip install authx[oauth2]
### Development Dependencies

```shell
pip install authx[lint,test,docs]
git clone https://github.com/yezz123/authx.git

cd authx

bash scripts/install.sh
```
45 changes: 8 additions & 37 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "authx"
description = "Ready to use and customizable Authentications and Oauth2 management for FastAPI"
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.8"
license = "MIT"
authors = [
{ name = "Yasser Tahiri", email = "hello@yezz.me" },
Expand Down Expand Up @@ -45,10 +45,8 @@ classifiers = [

dependencies = [
"fastapi >=0.65.2,<0.99.0",
"starlette >=0.14.02,<0.28.1",
"pyjwt[crypto] >=2.6.0,<3.0.0",
"pydantic >=1.7.4,!=1.8,!=1.8.1,<2.0.0",
"typing-extensions >=3.7.4,<4.7.0",
]

dynamic = ["version"]
Expand All @@ -63,48 +61,21 @@ Funding = 'https://github.com/sponsors/yezz123'

[project.optional-dependencies]
profiler = [
"pyinstrument >=4.1.1,<4.6.0",
"pyinstrument>=4.1.1,<4.6.0",
]
oauth2 = [
"python-jose >=3.3.0,<4.0.0",
"python-jose>=3.3.0,<4.0.0",
]
metrics = [
"prometheus-client >=0.16.0,<1.0.0",
"prometheus-client>=0.16.0,<1.0.0",
]
session = [
"redis >=4.3.3,<4.6.1",
"redis>=4.3.3,<4.6.1",
]
cache = [
"python-dateutil==2.8.2",
"redis >=4.3.3,<4.6.1",
"pytz==2023.3",
]
lint = [
"pre-commit==3.3.3",
"mypy==1.4.1",
]
test = [
"pytest==7.4.0",
"pytest-asyncio == 0.21.0",
"pytest-cov==4.1.0",
"httpx==0.24.1",
"requests==2.31.0",
"SQLAlchemy ==2.0.17",
"itsdangerous == 2.1.2",
"websockets==11.0.3",
"uvicorn==0.22.0",
"uvloop==0.17.0",
"freezegun==1.2.2"
]
docs = [
"mkdocs >=1.1.2,<2.0.0",
"mkdocs-material >=8.1.4,<10.0.0",
"mdx-include >=1.4.1,<2.0.0",
"mkdocs-markdownextradata-plugin >=0.1.7,<0.3.0",
"mkdocs-mermaid2-plugin==0.6.0",
"markdown-include==0.8.1",
"pymdown-extensions==10.0.1",
"jinja2==3.1.2"
"python-dateutil>=2.8,<3.0.0",
"redis>=4.3.3,<4.6.1",
"pytz>=2023.3,<2024.0",
]

[tool.hatch.version]
Expand Down
5 changes: 5 additions & 0 deletions requirements/all.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r ./optional.txt
-r ./pyproject.txt
-r ./linting.txt
-r ./testing.txt
-r ./docs.txt
8 changes: 8 additions & 0 deletions requirements/docs.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mkdocs
mkdocs-material
mdx-include
mkdocs-markdownextradata-plugin
mkdocs-mermaid2-plugin
markdown-include
pymdown-extensions
jinja2
103 changes: 103 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --config=pyproject.toml --output-file=requirements/docs.txt --resolver=backtracking requirements/docs.in
#
beautifulsoup4==4.12.2
# via mkdocs-mermaid2-plugin
certifi==2023.5.7
# via requests
charset-normalizer==3.1.0
# via requests
click==8.1.3
# via mkdocs
colorama==0.4.6
# via mkdocs-material
cyclic==1.0.0
# via mdx-include
editorconfig==0.12.3
# via jsbeautifier
ghp-import==2.1.0
# via mkdocs
idna==3.4
# via requests
jinja2==3.1.2
# via
# -r requirements/docs.in
# mkdocs
# mkdocs-material
jsbeautifier==1.14.8
# via mkdocs-mermaid2-plugin
markdown==3.3.7
# via
# markdown-include
# mdx-include
# mkdocs
# mkdocs-material
# pymdown-extensions
markdown-include==0.8.1
# via -r requirements/docs.in
markupsafe==2.1.3
# via jinja2
mdx-include==1.4.2
# via -r requirements/docs.in
mergedeep==1.3.4
# via mkdocs
mkdocs==1.4.3
# via
# -r requirements/docs.in
# mkdocs-markdownextradata-plugin
# mkdocs-material
# mkdocs-mermaid2-plugin
mkdocs-markdownextradata-plugin==0.2.5
# via -r requirements/docs.in
mkdocs-material==9.1.17
# via
# -r requirements/docs.in
# mkdocs-mermaid2-plugin
mkdocs-material-extensions==1.1.1
# via mkdocs-material
mkdocs-mermaid2-plugin==0.6.0
# via -r requirements/docs.in
packaging==23.1
# via mkdocs
pygments==2.15.1
# via mkdocs-material
pymdown-extensions==10.0.1
# via
# -r requirements/docs.in
# mkdocs-material
# mkdocs-mermaid2-plugin
python-dateutil==2.8.2
# via ghp-import
pyyaml==6.0
# via
# mkdocs
# mkdocs-markdownextradata-plugin
# mkdocs-mermaid2-plugin
# pymdown-extensions
# pyyaml-env-tag
pyyaml-env-tag==0.1
# via mkdocs
rcslice==1.1.0
# via mdx-include
regex==2023.6.3
# via mkdocs-material
requests==2.31.0
# via
# mkdocs-material
# mkdocs-mermaid2-plugin
six==1.16.0
# via
# jsbeautifier
# python-dateutil
soupsieve==2.4.1
# via beautifulsoup4
urllib3==2.0.3
# via requests
watchdog==3.0.0
# via mkdocs

# The following packages are considered to be unsafe in a requirements file:
# setuptools
5 changes: 5 additions & 0 deletions requirements/linting.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pre-commit
mypy
black
pyupgrade
ruff
51 changes: 51 additions & 0 deletions requirements/linting.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --config=pyproject.toml --output-file=requirements/linting.txt --resolver=backtracking requirements/linting.in
#
black==23.3.0
# via -r requirements/linting.in
cfgv==3.3.1
# via pre-commit
click==8.1.3
# via black
distlib==0.3.6
# via virtualenv
filelock==3.12.2
# via virtualenv
identify==2.5.24
# via pre-commit
mypy==1.4.1
# via -r requirements/linting.in
mypy-extensions==1.0.0
# via
# black
# mypy
nodeenv==1.8.0
# via pre-commit
packaging==23.1
# via black
pathspec==0.11.1
# via black
platformdirs==3.8.0
# via
# black
# virtualenv
pre-commit==3.3.3
# via -r requirements/linting.in
pyupgrade==3.7.0
# via -r requirements/linting.in
pyyaml==6.0
# via pre-commit
ruff==0.0.275
# via -r requirements/linting.in
tokenize-rt==5.1.0
# via pyupgrade
typing-extensions==4.7.0
# via mypy
virtualenv==20.23.1
# via pre-commit

# The following packages are considered to be unsafe in a requirements file:
# setuptools
6 changes: 6 additions & 0 deletions requirements/optional.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyinstrument
python-jose
prometheus-client
python-dateutil
redis
pytz
32 changes: 32 additions & 0 deletions requirements/optional.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --config=pyproject.toml --output-file=requirements/optional.txt --resolver=backtracking requirements/optional.in
#
async-timeout==4.0.2
# via redis
ecdsa==0.18.0
# via python-jose
prometheus-client==0.17.0
# via -r requirements/optional.in
pyasn1==0.5.0
# via
# python-jose
# rsa
pyinstrument==4.5.0
# via -r requirements/optional.in
python-dateutil==2.8.2
# via -r requirements/optional.in
python-jose==3.3.0
# via -r requirements/optional.in
pytz==2023.3
# via -r requirements/optional.in
redis==4.6.0
# via -r requirements/optional.in
rsa==4.9
# via python-jose
six==1.16.0
# via
# ecdsa
# python-dateutil
Loading