Skip to content

Commit

Permalink
Update dependencies and misc project config
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Jan 29, 2024
1 parent d432dd0 commit 06eb2a4
Show file tree
Hide file tree
Showing 9 changed files with 267 additions and 224 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1.3
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.LATEST_PY_VERSION }}
- name: Run style checks & linting
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.LATEST_PY_VERSION }}
- uses: snok/install-poetry@v1.3
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
Expand All @@ -17,11 +17,11 @@ repos:
- id: blacken-docs
args: [--skip-errors, --skip-string-normalization]
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.287
rev: v0.1.14
hooks:
- id: ruff
- repo: https://github.com/yunojuno/pre-commit-xenon
Expand All @@ -30,7 +30,7 @@ repos:
- id: xenon
args: [--max-average=A, --max-modules=C, --max-absolute=C]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.8.0
hooks:
- id: mypy
files: requests_ratelimiter
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Jordan Cook
Copyright (c) 2024 Jordan Cook

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ status](https://github.com/JWCook/requests-ratelimiter/workflows/Build/badge.svg
[![PyPI - Python Versions](https://img.shields.io/pypi/pyversions/requests-ratelimiter)](https://pypi.org/project/requests-ratelimiter)
[![PyPI - Format](https://img.shields.io/pypi/format/requests-ratelimiter?color=blue)](https://pypi.org/project/requests-ratelimiter)

This package is a simple wrapper around [pyrate-limiter](https://pyratelimiter.readthedocs.io)
This package is a simple wrapper around [pyrate-limiter v2](https://github.com/vutran1710/PyrateLimiter/tree/v2.10.0)
that adds convenient integration with the [requests](https://requests.readthedocs.io) library.

Full project documentation can be found at [requests-ratelimiter.readthedocs.io](https://requests-ratelimiter.readthedocs.io).


# Features
* `pyrate-limiter` is a general-purpose rate limiting library that implements the leaky bucket
* `pyrate-limiter` is a general-purpose rate-limiting library that implements the leaky bucket
algorithm, supports multiple rate limits, and has optional persistence with SQLite and Redis
backends
* `requests-ratelimiter` adds some extra conveniences specific to sending HTTP requests with the
* `requests-ratelimiter` adds some conveniences for sending rate-limited HTTP requests with the
`requests` library
* It can be used as either a
[session](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) or a
Expand Down
55 changes: 27 additions & 28 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
"""Config file for Sphinx documentation"""

# General information about the project.
copyright = '2022, Jordan Cook'
exclude_patterns = ['_build']
master_doc = 'index'
needs_sphinx = '4.0'
project = 'requests-ratelimiter'
source_suffix = ['.rst', '.md']
templates_path = ['_templates']
exclude_patterns = ["_build"]
master_doc = "index"
needs_sphinx = "5.0"
project = "requests-ratelimiter"
source_suffix = [".rst", ".md"]
templates_path = ["_templates"]

# Sphinx extensions
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx_autodoc_typehints',
'sphinx_copybutton',
'myst_parser',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx_copybutton",
"myst_parser",
]
myst_enable_extensions = ['colon_fence']
myst_enable_extensions = ["colon_fence"]

# Enable automatic links to other projects' Sphinx docs
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'requests': ('https://requests.readthedocs.io/en/latest/', None),
'urllib3': ('https://urllib3.readthedocs.io/en/stable/', None),
'pyrate_limiter': ('https://pyratelimiter.readthedocs.io/en/latest/', None),
"python": ("https://docs.python.org/3", None),
"requests": ("https://requests.readthedocs.io/en/latest/", None),
"urllib3": ("https://urllib3.readthedocs.io/en/stable/", None),
"pyrate_limiter": ("https://pyratelimiter.readthedocs.io/en/latest/", None),
}

# napoleon settings
Expand All @@ -35,22 +34,22 @@
numpydoc_show_class_members = False

# copybutton settings: Strip prompt text when copying code blocks
copybutton_prompt_text = r'>>> |\.\.\. |\$ '
copybutton_prompt_text = r">>> |\.\.\. |\$ "
copybutton_prompt_is_regexp = True

# Disable autodoc's built-in type hints, and use sphinx_autodoc_typehints extension instead
autodoc_typehints = 'none'
autodoc_typehints = "none"

# HTML general settings
html_show_sphinx = False
html_static_path = ['_static']
pygments_style = 'friendly'
pygments_dark_style = 'material'
html_static_path = ["_static"]
pygments_style = "friendly"
pygments_dark_style = "material"

# HTML theme settings
html_theme = 'furo'
html_theme = "furo"
html_theme_options = {
'light_logo': 'requests-ratelimiter.png',
'dark_logo': 'requests-ratelimiter-white.png',
'sidebar_hide_name': True,
"light_logo": "requests-ratelimiter.png",
"dark_logo": "requests-ratelimiter-white.png",
"sidebar_hide_name": True,
}

0 comments on commit 06eb2a4

Please sign in to comment.