throttle-controller 0.3.1__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/.coveragerc +3 -0
- throttle_controller-0.4.0/.github/ISSUE_TEMPLATE/bug_report.yml +68 -0
- throttle_controller-0.4.0/.github/ISSUE_TEMPLATE/feature_request.yml +40 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/.github/workflows/gitignore-in.yml +1 -6
- throttle_controller-0.4.0/.github/workflows/happy.yml +10 -0
- throttle_controller-0.4.0/.github/workflows/octocov.yml +57 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/.github/workflows/pypi-publish.yml +18 -10
- throttle_controller-0.4.0/.github/workflows/python-test.yml +78 -0
- throttle_controller-0.4.0/.github/workflows/spellcheck.yml +8 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/.gitignore +121 -27
- throttle_controller-0.4.0/.octocov.yml +22 -0
- throttle_controller-0.4.0/CONTRIBUTING.md +67 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/PKG-INFO +82 -6
- throttle_controller-0.4.0/README.md +120 -0
- throttle_controller-0.4.0/lefthook.yml +13 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/pyproject.toml +45 -6
- throttle_controller-0.4.0/tests/test_simple.py +443 -0
- throttle_controller-0.4.0/tests/test_utils_interval.py +33 -0
- throttle_controller-0.4.0/throttle_controller/__init__.py +18 -0
- throttle_controller-0.4.0/throttle_controller/protocol.py +61 -0
- throttle_controller-0.4.0/throttle_controller/simple.py +233 -0
- throttle_controller-0.4.0/throttle_controller/utils/interval.py +40 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/throttle_controller.egg-info/PKG-INFO +82 -6
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/throttle_controller.egg-info/SOURCES.txt +8 -2
- throttle_controller-0.4.0/throttle_controller.egg-info/scm_file_list.json +32 -0
- throttle_controller-0.4.0/throttle_controller.egg-info/scm_version.json +8 -0
- throttle_controller-0.4.0/uv.lock +587 -0
- throttle_controller-0.3.1/.github/workflows/happy.yml +0 -18
- throttle_controller-0.3.1/.github/workflows/python-test.yml +0 -63
- throttle_controller-0.3.1/.github/workflows/spellcheck.yml +0 -16
- throttle_controller-0.3.1/README.md +0 -44
- throttle_controller-0.3.1/tests/test_simple.py +0 -82
- throttle_controller-0.3.1/tests/test_utils_interval.py +0 -12
- throttle_controller-0.3.1/throttle_controller/__init__.py +0 -7
- throttle_controller-0.3.1/throttle_controller/_version.py +0 -16
- throttle_controller-0.3.1/throttle_controller/protocol.py +0 -34
- throttle_controller-0.3.1/throttle_controller/simple.py +0 -55
- throttle_controller-0.3.1/throttle_controller/utils/interval.py +0 -14
- throttle_controller-0.3.1/throttle_controller.egg-info/requires.txt +0 -1
- throttle_controller-0.3.1/uv.lock +0 -407
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/.github/renovate.json5 +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/.gitignore.in +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/LICENSE +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/setup.cfg +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/tests/__init__.py +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/throttle_controller/py.typed +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/throttle_controller/utils/__init__.py +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/throttle_controller.egg-info/dependency_links.txt +0 -0
- {throttle_controller-0.3.1 → throttle_controller-0.4.0}/throttle_controller.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report behavior that is not working as expected.
|
|
3
|
+
title: "Bug: "
|
|
4
|
+
labels:
|
|
5
|
+
- bug
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Thanks for reporting a problem with `throttle-controller`.
|
|
11
|
+
Please include enough detail for maintainers to reproduce the behavior.
|
|
12
|
+
- type: input
|
|
13
|
+
id: package-version
|
|
14
|
+
attributes:
|
|
15
|
+
label: throttle-controller version
|
|
16
|
+
description: The installed package version.
|
|
17
|
+
placeholder: "0.3.1"
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: input
|
|
21
|
+
id: python-version
|
|
22
|
+
attributes:
|
|
23
|
+
label: Python version
|
|
24
|
+
description: The Python version used when the problem occurred.
|
|
25
|
+
placeholder: "3.13.1"
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: input
|
|
29
|
+
id: operating-system
|
|
30
|
+
attributes:
|
|
31
|
+
label: Operating system
|
|
32
|
+
description: The operating system and version.
|
|
33
|
+
placeholder: "macOS 15.5, Ubuntu 24.04, Windows 11"
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: reproduction
|
|
38
|
+
attributes:
|
|
39
|
+
label: Minimal reproduction
|
|
40
|
+
description: Provide the smallest code sample or sequence of steps that reproduces the issue.
|
|
41
|
+
placeholder: |
|
|
42
|
+
from throttle_controller import SimpleThrottleController
|
|
43
|
+
|
|
44
|
+
throttle = SimpleThrottleController.create(default_cooldown_time=3.0)
|
|
45
|
+
...
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
- type: textarea
|
|
49
|
+
id: expected-behavior
|
|
50
|
+
attributes:
|
|
51
|
+
label: Expected behavior
|
|
52
|
+
description: What did you expect to happen?
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
- type: textarea
|
|
56
|
+
id: actual-behavior
|
|
57
|
+
attributes:
|
|
58
|
+
label: Actual behavior
|
|
59
|
+
description: What happened instead? Include traceback or logs when available.
|
|
60
|
+
validations:
|
|
61
|
+
required: true
|
|
62
|
+
- type: textarea
|
|
63
|
+
id: additional-context
|
|
64
|
+
attributes:
|
|
65
|
+
label: Additional context
|
|
66
|
+
description: Add any extra context that may help explain the issue.
|
|
67
|
+
validations:
|
|
68
|
+
required: false
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an improvement or new capability.
|
|
3
|
+
title: "Feature: "
|
|
4
|
+
labels:
|
|
5
|
+
- enhancement
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Thanks for suggesting an improvement to `throttle-controller`.
|
|
11
|
+
Please describe the use case and the behavior you need.
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: use-case
|
|
14
|
+
attributes:
|
|
15
|
+
label: Use case
|
|
16
|
+
description: What are you trying to accomplish?
|
|
17
|
+
placeholder: "I want to throttle calls to ..."
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: proposed-behavior
|
|
22
|
+
attributes:
|
|
23
|
+
label: Proposed behavior
|
|
24
|
+
description: Describe the behavior or API you would like to see.
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
- type: textarea
|
|
28
|
+
id: alternatives
|
|
29
|
+
attributes:
|
|
30
|
+
label: Alternatives considered
|
|
31
|
+
description: Describe any workaround or alternative design you considered.
|
|
32
|
+
validations:
|
|
33
|
+
required: false
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: additional-context
|
|
36
|
+
attributes:
|
|
37
|
+
label: Additional context
|
|
38
|
+
description: Add examples, links, or constraints that may help evaluate the request.
|
|
39
|
+
validations:
|
|
40
|
+
required: false
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
name: Update gitignore file
|
|
2
|
-
|
|
3
2
|
on:
|
|
4
3
|
schedule:
|
|
5
4
|
# daily at 00:00
|
|
6
5
|
- cron: '0 0 * * *'
|
|
7
|
-
|
|
8
6
|
permissions:
|
|
9
7
|
contents: write
|
|
10
8
|
pull-requests: write
|
|
11
|
-
|
|
12
9
|
jobs:
|
|
13
10
|
update-gitignore:
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: gitignore-in/gh-action@v0.2.2
|
|
11
|
+
uses: kitsuyui/gh-actions-workflows/.github/workflows/gitignore-in.yml@a7071a4635eaece62696cd7132306616ce283c47
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: octocov
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pull-requests: write
|
|
15
|
+
checks: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
octocov:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
python: ["3.14"]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
id: setup-python
|
|
31
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
32
|
+
with:
|
|
33
|
+
python-version: "${{ matrix.python }}"
|
|
34
|
+
|
|
35
|
+
- name: Set up uv
|
|
36
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
37
|
+
with:
|
|
38
|
+
enable-cache: true
|
|
39
|
+
cache-dependency-glob: uv.lock
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: |
|
|
43
|
+
uv python pin ${{ matrix.python }}
|
|
44
|
+
uv sync
|
|
45
|
+
|
|
46
|
+
- name: Test
|
|
47
|
+
run: uv run poe test
|
|
48
|
+
|
|
49
|
+
- name: Coverage
|
|
50
|
+
run: uv run poe coverage-xml
|
|
51
|
+
|
|
52
|
+
# See also: https://github.com/k1LoW/octocov-action
|
|
53
|
+
- name: Report coverage with octocov
|
|
54
|
+
uses: k1LoW/octocov-action@b3b6ee60482a667950f87553abf1df63217235d9 # v1
|
|
55
|
+
with:
|
|
56
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
57
|
+
config: .octocov.yml
|
|
@@ -7,23 +7,36 @@ on:
|
|
|
7
7
|
# "released" events are emitted either when directly be released or be edited from pre-released.
|
|
8
8
|
types: [prereleased, released]
|
|
9
9
|
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: ${{ github.event_name != 'release' }}
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
10
17
|
env:
|
|
11
18
|
python_version: 3.13
|
|
12
19
|
|
|
13
20
|
jobs:
|
|
14
21
|
deploy:
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
id-token: write
|
|
15
25
|
runs-on: ubuntu-latest
|
|
16
26
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
27
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
18
28
|
|
|
19
29
|
- name: Set up Python
|
|
20
30
|
id: setup-python
|
|
21
|
-
uses: actions/setup-python@
|
|
31
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
22
32
|
with:
|
|
23
33
|
python-version: ${{ env.python_version }}
|
|
24
34
|
|
|
25
35
|
- name: Set up uv
|
|
26
|
-
uses: astral-sh/setup-uv@
|
|
36
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
37
|
+
with:
|
|
38
|
+
enable-cache: true
|
|
39
|
+
cache-dependency-glob: uv.lock
|
|
27
40
|
|
|
28
41
|
- name: Install dependencies
|
|
29
42
|
run: |
|
|
@@ -34,16 +47,11 @@ jobs:
|
|
|
34
47
|
run: uv build
|
|
35
48
|
|
|
36
49
|
- name: Publish distribution to Test PyPI
|
|
37
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
|
38
51
|
if: github.event_name == 'release' && github.event.release.prerelease
|
|
39
52
|
with:
|
|
40
|
-
user: __token__
|
|
41
|
-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
42
53
|
repository-url: https://test.pypi.org/legacy/
|
|
43
54
|
|
|
44
55
|
- name: Publish distribution to PyPI
|
|
45
56
|
if: github.event_name == 'release' && !github.event.release.prerelease
|
|
46
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
47
|
-
with:
|
|
48
|
-
user: __token__
|
|
49
|
-
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
57
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
on:
|
|
3
|
+
# pull-request events are not triggered when a PR is merged
|
|
4
|
+
# push events are not triggered when a PR created from a fork repository
|
|
5
|
+
# So we need both to run tests on every PR and after merging
|
|
6
|
+
pull_request:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
test:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout
|
|
28
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
29
|
+
|
|
30
|
+
- name: Set up Python
|
|
31
|
+
id: setup-python
|
|
32
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
33
|
+
with:
|
|
34
|
+
python-version: "${{ matrix.python }}"
|
|
35
|
+
|
|
36
|
+
- name: Set up uv
|
|
37
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
38
|
+
with:
|
|
39
|
+
enable-cache: true
|
|
40
|
+
cache-dependency-glob: uv.lock
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: |
|
|
44
|
+
uv python pin ${{ matrix.python }}
|
|
45
|
+
uv sync
|
|
46
|
+
|
|
47
|
+
- parallel:
|
|
48
|
+
- name: Lint
|
|
49
|
+
run: uv run poe check
|
|
50
|
+
|
|
51
|
+
- name: Check Python version
|
|
52
|
+
run: |
|
|
53
|
+
actual_version=$(uv run python --version)
|
|
54
|
+
expected_version="Python ${{ matrix.python }}"
|
|
55
|
+
if [[ "$actual_version" != *"$expected_version"* ]]; then
|
|
56
|
+
echo "Expected $expected_version, but got $actual_version"
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
- name: Test
|
|
61
|
+
run: uv run poe test
|
|
62
|
+
|
|
63
|
+
audit:
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
steps:
|
|
66
|
+
- name: Checkout
|
|
67
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
68
|
+
|
|
69
|
+
- name: Set up uv
|
|
70
|
+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
|
|
71
|
+
with:
|
|
72
|
+
enable-cache: true
|
|
73
|
+
cache-dependency-glob: uv.lock
|
|
74
|
+
|
|
75
|
+
- name: Audit dependencies for known CVEs
|
|
76
|
+
run: |
|
|
77
|
+
uv export --no-emit-project -o /tmp/requirements.txt
|
|
78
|
+
uvx pip-audit -r /tmp/requirements.txt
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
# gibo dump Linux
|
|
7
7
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
8
|
-
### https://raw.github.com/github/gitignore/
|
|
8
|
+
### https://raw.github.com/github/gitignore/576334520435382d6522f349b9d270eda1e79a25/Global/Linux.gitignore
|
|
9
9
|
|
|
10
10
|
*~
|
|
11
11
|
|
|
12
12
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
13
13
|
.fuse_hidden*
|
|
14
14
|
|
|
15
|
-
# KDE
|
|
15
|
+
# Metadata left by Dolphin file manager, which comes with KDE Plasma
|
|
16
16
|
.directory
|
|
17
17
|
|
|
18
18
|
# Linux trash folder which might appear on any partition or disk
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
|
|
21
21
|
# .nfs files are created when an open file is removed but is still being accessed
|
|
22
22
|
.nfs*
|
|
23
|
+
|
|
24
|
+
# Log files created by default by the nohup command
|
|
25
|
+
nohup.out
|
|
23
26
|
# -----------------------------------------------------------------------------
|
|
24
27
|
# gibo dump Windows
|
|
25
28
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
26
|
-
### https://raw.github.com/github/gitignore/
|
|
29
|
+
### https://raw.github.com/github/gitignore/576334520435382d6522f349b9d270eda1e79a25/Global/Windows.gitignore
|
|
27
30
|
|
|
28
31
|
# Windows thumbnail cache files
|
|
29
32
|
Thumbs.db
|
|
@@ -52,20 +55,20 @@ $RECYCLE.BIN/
|
|
|
52
55
|
# -----------------------------------------------------------------------------
|
|
53
56
|
# gibo dump macOS
|
|
54
57
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
55
|
-
### https://raw.github.com/github/gitignore/
|
|
58
|
+
### https://raw.github.com/github/gitignore/576334520435382d6522f349b9d270eda1e79a25/Global/macOS.gitignore
|
|
56
59
|
|
|
57
60
|
# General
|
|
58
61
|
.DS_Store
|
|
62
|
+
.localized
|
|
63
|
+
__MACOSX/
|
|
59
64
|
.AppleDouble
|
|
60
65
|
.LSOverride
|
|
66
|
+
Icon[
|
|
61
67
|
|
|
62
|
-
#
|
|
63
|
-
Icon
|
|
64
|
-
|
|
65
|
-
# Thumbnails
|
|
68
|
+
# Resource forks
|
|
66
69
|
._*
|
|
67
70
|
|
|
68
|
-
# Files that might appear in the root of a volume
|
|
71
|
+
# Files and directories that might appear in the root of a volume
|
|
69
72
|
.DocumentRevisions-V100
|
|
70
73
|
.fseventsd
|
|
71
74
|
.Spotlight-V100
|
|
@@ -73,6 +76,15 @@ Icon
|
|
|
73
76
|
.Trashes
|
|
74
77
|
.VolumeIcon.icns
|
|
75
78
|
.com.apple.timemachine.donotpresent
|
|
79
|
+
.com.apple.timemachine.supported
|
|
80
|
+
.PKInstallSandboxManager
|
|
81
|
+
.PKInstallSandboxManager-SystemSoftware
|
|
82
|
+
.hotfiles.btree
|
|
83
|
+
.vol
|
|
84
|
+
.file
|
|
85
|
+
.disk_label*
|
|
86
|
+
lost+found
|
|
87
|
+
.HFS+ Private Directory Data[
|
|
76
88
|
|
|
77
89
|
# Directories potentially created on remote AFP share
|
|
78
90
|
.AppleDB
|
|
@@ -80,14 +92,36 @@ Icon
|
|
|
80
92
|
Network Trash Folder
|
|
81
93
|
Temporary Items
|
|
82
94
|
.apdisk
|
|
95
|
+
|
|
96
|
+
# Mac OS 6 to 9
|
|
97
|
+
Desktop DB
|
|
98
|
+
Desktop DF
|
|
99
|
+
TheFindByContentFolder
|
|
100
|
+
TheVolumeSettingsFolder
|
|
101
|
+
.FBCIndex
|
|
102
|
+
.FBCSemaphoreFile
|
|
103
|
+
.FBCLockFolder
|
|
104
|
+
|
|
105
|
+
# Quota system
|
|
106
|
+
.quota.group
|
|
107
|
+
.quota.user
|
|
108
|
+
.quota.ops.group
|
|
109
|
+
.quota.ops.user
|
|
110
|
+
|
|
111
|
+
# TimeMachine
|
|
112
|
+
Backups.backupdb
|
|
113
|
+
.MobileBackups
|
|
114
|
+
.MobileBackups.trash
|
|
115
|
+
MobileBackups.trash
|
|
116
|
+
tmbootpicker.efi
|
|
83
117
|
# -----------------------------------------------------------------------------
|
|
84
118
|
# gibo dump Python
|
|
85
119
|
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
86
|
-
### https://raw.github.com/github/gitignore/
|
|
120
|
+
### https://raw.github.com/github/gitignore/576334520435382d6522f349b9d270eda1e79a25/Python.gitignore
|
|
87
121
|
|
|
88
122
|
# Byte-compiled / optimized / DLL files
|
|
89
123
|
__pycache__/
|
|
90
|
-
*.py[
|
|
124
|
+
*.py[codz]
|
|
91
125
|
*$py.class
|
|
92
126
|
|
|
93
127
|
# C extensions
|
|
@@ -114,8 +148,8 @@ share/python-wheels/
|
|
|
114
148
|
MANIFEST
|
|
115
149
|
|
|
116
150
|
# PyInstaller
|
|
117
|
-
#
|
|
118
|
-
#
|
|
151
|
+
# Usually these files are written by a python script from a template
|
|
152
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
119
153
|
*.manifest
|
|
120
154
|
*.spec
|
|
121
155
|
|
|
@@ -133,7 +167,8 @@ htmlcov/
|
|
|
133
167
|
nosetests.xml
|
|
134
168
|
coverage.xml
|
|
135
169
|
*.cover
|
|
136
|
-
*.py
|
|
170
|
+
*.py.cover
|
|
171
|
+
*.lcov
|
|
137
172
|
.hypothesis/
|
|
138
173
|
.pytest_cache/
|
|
139
174
|
cover/
|
|
@@ -179,35 +214,65 @@ ipython_config.py
|
|
|
179
214
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
180
215
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
181
216
|
# install all needed dependencies.
|
|
182
|
-
#Pipfile.lock
|
|
217
|
+
# Pipfile.lock
|
|
218
|
+
|
|
219
|
+
# UV
|
|
220
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
221
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
222
|
+
# commonly ignored for libraries.
|
|
223
|
+
# uv.lock
|
|
183
224
|
|
|
184
225
|
# poetry
|
|
185
226
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
186
227
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
187
228
|
# commonly ignored for libraries.
|
|
188
229
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
189
|
-
#poetry.lock
|
|
230
|
+
# poetry.lock
|
|
231
|
+
# poetry.toml
|
|
190
232
|
|
|
191
233
|
# pdm
|
|
192
234
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
193
|
-
#pdm.
|
|
194
|
-
# pdm
|
|
195
|
-
#
|
|
196
|
-
#
|
|
197
|
-
.pdm
|
|
235
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
236
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
237
|
+
# pdm.lock
|
|
238
|
+
# pdm.toml
|
|
239
|
+
.pdm-python
|
|
240
|
+
.pdm-build/
|
|
241
|
+
|
|
242
|
+
# pixi
|
|
243
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
244
|
+
# pixi.lock
|
|
245
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
246
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
247
|
+
.pixi/*
|
|
248
|
+
!.pixi/config.toml
|
|
198
249
|
|
|
199
250
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
200
251
|
__pypackages__/
|
|
201
252
|
|
|
202
253
|
# Celery stuff
|
|
203
|
-
celerybeat-schedule
|
|
254
|
+
celerybeat-schedule*
|
|
204
255
|
celerybeat.pid
|
|
205
256
|
|
|
257
|
+
# Redis
|
|
258
|
+
*.rdb
|
|
259
|
+
*.aof
|
|
260
|
+
*.pid
|
|
261
|
+
|
|
262
|
+
# RabbitMQ
|
|
263
|
+
mnesia/
|
|
264
|
+
rabbitmq/
|
|
265
|
+
rabbitmq-data/
|
|
266
|
+
|
|
267
|
+
# ActiveMQ
|
|
268
|
+
activemq-data/
|
|
269
|
+
|
|
206
270
|
# SageMath parsed files
|
|
207
271
|
*.sage.py
|
|
208
272
|
|
|
209
273
|
# Environments
|
|
210
274
|
.env
|
|
275
|
+
.envrc
|
|
211
276
|
.venv
|
|
212
277
|
env/
|
|
213
278
|
venv/
|
|
@@ -240,10 +305,39 @@ dmypy.json
|
|
|
240
305
|
cython_debug/
|
|
241
306
|
|
|
242
307
|
# PyCharm
|
|
243
|
-
#
|
|
244
|
-
#
|
|
245
|
-
#
|
|
246
|
-
#
|
|
247
|
-
|
|
308
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
309
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
310
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
311
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
312
|
+
# .idea/
|
|
313
|
+
|
|
314
|
+
# Abstra
|
|
315
|
+
# Abstra is an AI-powered process automation framework.
|
|
316
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
317
|
+
# Learn more at https://abstra.io/docs
|
|
318
|
+
.abstra/
|
|
319
|
+
|
|
320
|
+
# Visual Studio Code
|
|
321
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
322
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
323
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
324
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
325
|
+
# .vscode/
|
|
326
|
+
# Temporary file for partial code execution
|
|
327
|
+
tempCodeRunnerFile.py
|
|
328
|
+
|
|
329
|
+
# Ruff stuff:
|
|
330
|
+
.ruff_cache/
|
|
331
|
+
|
|
332
|
+
# PyPI configuration file
|
|
333
|
+
.pypirc
|
|
334
|
+
|
|
335
|
+
# Marimo
|
|
336
|
+
marimo/_static/
|
|
337
|
+
marimo/_lsp/
|
|
338
|
+
__marimo__/
|
|
339
|
+
|
|
340
|
+
# Streamlit
|
|
341
|
+
.streamlit/secrets.toml
|
|
248
342
|
# -----------------------------------------------------------------------------
|
|
249
343
|
_version.py
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# https://github.com/k1LoW/octocov?tab=readme-ov-file#configuration
|
|
2
|
+
coverage:
|
|
3
|
+
acceptable: current >= 100%
|
|
4
|
+
paths:
|
|
5
|
+
- coverage.xml
|
|
6
|
+
codeToTestRatio:
|
|
7
|
+
code:
|
|
8
|
+
- "**/*.py"
|
|
9
|
+
test:
|
|
10
|
+
- "tests/**/*.py"
|
|
11
|
+
testExecutionTime:
|
|
12
|
+
if: true
|
|
13
|
+
diff:
|
|
14
|
+
datastores:
|
|
15
|
+
- artifact://${GITHUB_REPOSITORY}
|
|
16
|
+
comment:
|
|
17
|
+
if: is_pull_request
|
|
18
|
+
updatePrevious: true
|
|
19
|
+
report:
|
|
20
|
+
if: is_default_branch
|
|
21
|
+
datastores:
|
|
22
|
+
- artifact://${GITHUB_REPOSITORY}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in improving `throttle-controller`.
|
|
4
|
+
|
|
5
|
+
This package is currently in alpha. Keep changes small, focused, and easy to
|
|
6
|
+
review. The controller is intended for single-threaded, single-process use
|
|
7
|
+
today; multi-threaded or multi-process behavior should be discussed before
|
|
8
|
+
implementation.
|
|
9
|
+
|
|
10
|
+
## Getting Started
|
|
11
|
+
|
|
12
|
+
Install [uv](https://docs.astral.sh/uv/) first, then install the project
|
|
13
|
+
dependencies:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
uv sync
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This repository uses [lefthook](https://lefthook.dev/) for local Git hooks. If
|
|
20
|
+
you have `lefthook` on your `PATH`, install the hooks once:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
lefthook install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The hooks run the same core commands that CI uses, but you can also run them
|
|
27
|
+
manually.
|
|
28
|
+
|
|
29
|
+
## Local Checks
|
|
30
|
+
|
|
31
|
+
Run these commands before opening a pull request:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
uv run poe check
|
|
35
|
+
uv run poe test
|
|
36
|
+
uv run poe coverage-xml
|
|
37
|
+
uv build
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`uv run poe check` runs Ruff and mypy. Keep formatting and type errors fixed in
|
|
41
|
+
the same change that introduces them.
|
|
42
|
+
|
|
43
|
+
## Tests
|
|
44
|
+
|
|
45
|
+
Add or update tests in `tests/` for behavior changes. For time-sensitive
|
|
46
|
+
behavior, prefer the `now` parameter on `SimpleThrottleController.create()` so
|
|
47
|
+
tests do not depend on wall-clock time.
|
|
48
|
+
|
|
49
|
+
## Pull Requests
|
|
50
|
+
|
|
51
|
+
- Keep each pull request focused on one topic.
|
|
52
|
+
- Include a short summary of user-visible behavior changes.
|
|
53
|
+
- Mention any compatibility impact, especially while the package is in alpha.
|
|
54
|
+
- Include the local checks you ran in the pull request description.
|
|
55
|
+
|
|
56
|
+
## Reporting Issues
|
|
57
|
+
|
|
58
|
+
When reporting a problem, include:
|
|
59
|
+
|
|
60
|
+
- the installed `throttle-controller` version,
|
|
61
|
+
- the Python version and operating system,
|
|
62
|
+
- a minimal reproduction,
|
|
63
|
+
- the expected behavior,
|
|
64
|
+
- the actual behavior.
|
|
65
|
+
|
|
66
|
+
Please avoid sharing private credentials, tokens, or service data in issues or
|
|
67
|
+
pull requests.
|