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

chore(deps): Sort requirements files #1768

Merged
merged 12 commits into from
Nov 11, 2022
8 changes: 4 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
cache-dependency-path: "requirements/dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements/dev.txt
- run:
codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
--exclude-file=".github/workflows/codespell.yml"
Expand All @@ -30,9 +30,9 @@ jobs:
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
cache-dependency-path: "requirements/dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements/dev.txt
- run: bandit --recursive --skip B101,B104,B105,B110,B307,B311,B404,B603,B607 .
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
cache-dependency-path: "requirements/dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements/dev.txt
- name: Setup cache
id: cache-pylint
uses: actions/cache@v3
Expand All @@ -36,11 +36,11 @@ jobs:
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
cache-dependency-path: "requirements/dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements/dev.txt
- name: Setup cache
id: cache-mypy
uses: actions/cache@v3
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
cache-dependency-path: "requirements/dev.txt"
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements-dev.txt
pip install -r requirements/dev.txt
- name: Setup cache
id: cache-pytest
uses: actions/cache@v3
Expand Down Expand Up @@ -63,6 +63,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: "pip"
cache-dependency-path: "requirements/docs.txt"
check-latest: true
- name: Install dependencies
run: |
python -m pip install -U pip
Expand Down
31 changes: 7 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ classifiers = [
"Topic :: Utilities",
"Typing :: Typed",
]
dynamic = ["version", "dependencies"]
dynamic = ["version", "dependencies", "optional-dependencies"]

[project.urls]
Homepage = "https://pycord.dev"
Expand All @@ -40,28 +40,6 @@ Documentation = "https://docs.pycord.dev"
Tracker = "https://github.com/Pycord-Development/pycord/issues"
Funding = "https://patreon.com/pycord"

[project.optional-dependencies]
voice = [
"PyNaCl>=1.3.0,<1.6",
]
docs = [
"sphinx==5.3.0",
"sphinxcontrib_trio==1.1.2",
"sphinxcontrib-websupport",
"myst-parser",
"sphinxext-opengraph==0.7.2",
"sphinx-copybutton==0.5.0",
"furo@ git+https://github.com/BobDotCom/furo@temp",
"sphinx-autodoc-typehints==1.19.5",
]
speed = [
"orjson>=3.5.4",
"aiodns>=1.1",
"Brotlipy",
# cchardet does not support 3.10+, see https://github.com/PyYoshi/cChardet/pull/78
"cchardet>=2.1.5,<=2.1.7; python_version<'3.10'",
]

[tool.setuptools]
packages = [
"discord",
Expand All @@ -77,7 +55,12 @@ packages = [
]

[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
dependencies = {file = "requirements/_.txt"}

[tool.setuptools.dynamic.optional-dependencies]
docs = {file = "requirements/docs.txt"}
speed = {file = "requirements/speed.txt"}
voice = {file = "requirements/voice.txt"}

[tool.setuptools_scm]

Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions requirements/all.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r dev.txt
-r docs.txt
-r speed.txt
-r voice.txt
2 changes: 1 addition & 1 deletion requirements-dev.txt → requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r requirements.txt
-r _.txt
pylint~=2.15.5
pytest~=7.2.0
pytest-asyncio~=0.20.1
Expand Down
8 changes: 8 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sphinx==5.3.0
sphinxcontrib_trio==1.1.2
sphinxcontrib-websupport==1.2.4
myst-parser==0.18.1
sphinxext-opengraph==0.7.2
sphinx-copybutton==0.5.0
furo@ git+https://github.com/BobDotCom/furo@temp
sphinx-autodoc-typehints==1.19.5
2 changes: 2 additions & 0 deletions requirements/speed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
orjson>=3.5.4
aiohttp[speed]
1 change: 1 addition & 0 deletions requirements/voice.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PyNaCl>=1.3.0,<1.6