Skip to content
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
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Setting things up

.. code-block:: bash

$ pip install -r requirements-dev-all.txt
$ pip install .[all] --group all


5. Install pre-commit hooks:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chango.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
cd ./target-repo
git add changes/unreleased/*
pip install . -r docs/requirements-docs.txt
pip install . --group docs
VERSION_TAG=$(python -c "from telegram import __version__; print(f'{__version__}')")
chango release --uid $VERSION_TAG

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-admonitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
cache-dependency-path: 'pyproject.toml'
- name: Install dependencies
run: |
python -W ignore -m pip install --upgrade pip
python -W ignore -m pip install -r requirements-dev-all.txt
python -W ignore -m pip install .[all] --group all
- name: Test autogeneration of admonitions
run: pytest -v --tb=short tests/docs/admonition_inserter.py
2 changes: 1 addition & 1 deletion .github/workflows/docs-linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install dependencies
run: |
python -W ignore -m pip install --upgrade pip
python -W ignore -m pip install -r requirements-dev-all.txt
python -W ignore -m pip install .[all] --group all
- name: Check Links
run: sphinx-build docs/source docs/build/html --keep-going -j auto -b linkcheck
- name: Upload linkcheck output
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test_official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
- name: Install dependencies
run: |
python -W ignore -m pip install --upgrade pip
python -W ignore -m pip install .[all]
python -W ignore -m pip install -r requirements-unit-tests.txt
python -W ignore -m pip install .[all] --group tests
- name: Compare to official api
run: |
pytest -v tests/test_official/test_official.py --junit-xml=.test_report_official.xml
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- tests/**
- .github/workflows/unit_tests.yml
- pyproject.toml
- requirements-unit-tests.txt
push:
branches:
- master
Expand Down Expand Up @@ -34,14 +33,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: |
python -W ignore -m pip install --upgrade pip
python -W ignore -m pip install -U pytest-cov
python -W ignore -m pip install .
python -W ignore -m pip install -r requirements-unit-tests.txt
python -W ignore -m pip install pytest-xdist
python -W ignore -m pip install . --group tests

- name: Test with pytest
# We run 4 different suites here
Expand Down
5 changes: 4 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ python:
install:
- method: pip
path: .
- requirements: requirements-dev-all.txt

build:
os: ubuntu-22.04
tools:
python: "3" # latest stable cpython version
jobs:
install:
- pip install -U pip
- pip install .[all] --group 'all' # install all the dependency groups

post_build:
# Based on https://github.com/readthedocs/readthedocs.org/issues/3242#issuecomment-1410321534
# This provides a HTML zip file for download, with the same structure as the hosted website
Expand Down
5 changes: 5 additions & 0 deletions changes/unreleased/4800.2Z9Q8uvzdU2TqMJ9biBLam.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dependencies = "Implement PEP 735 Dependency Groups for Development Dependencies"
[[pull_requests]]
uid = "4800"
author_uid = "harshil21"
closes_threads = ["4795"]
10 changes: 0 additions & 10 deletions docs/requirements-docs.txt

This file was deleted.

31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,37 @@ webhooks = [
"tornado~=6.4",
]

[dependency-groups]
tests = [
# required for building the wheels for releases
"build",
# For the test suite
"pytest==8.3.5",
# needed because pytest doesn't come with native support for coroutines as tests
"pytest-asyncio==0.21.2",
# xdist runs tests in parallel
"pytest-xdist==3.6.1",
# Used for flaky tests (flaky decorator)
"flaky>=3.8.1",
# used in test_official for parsing tg docs
"beautifulsoup4",
# For testing with timezones. Might not be needed on all systems, but to ensure that unit tests
# run correctly on all systems, we include it here.
"tzdata",
]
docs = [
"chango~=0.4.0; python_version >= '3.12'",
"sphinx==8.2.3; python_version >= '3.11'",
"furo==2024.8.6",
"furo-sphinx-search @ git+https://github.com/harshil21/furo-sphinx-search@v0.2.0.1",
"sphinx-paramlinks==0.6.0",
"sphinxcontrib-mermaid==1.0.0",
"sphinx-copybutton==0.5.2",
"sphinx-inline-tabs==2023.4.21",
# Temporary. See #4387
"sphinx-build-compatibility @ git+https://github.com/readthedocs/sphinx-build-compatibility.git@58aabc5f207c6c2421f23d3578adc0b14af57047",
]
all = ["pre-commit", { include-group = "tests" }, { include-group = "docs" }]

# HATCH
[tool.hatch.version]
Expand Down
5 changes: 0 additions & 5 deletions requirements-dev-all.txt

This file was deleted.

23 changes: 0 additions & 23 deletions requirements-unit-tests.txt

This file was deleted.

Loading