looptime 0.5__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.
Files changed (45) hide show
  1. looptime-0.5/.codecov.yml +1 -0
  2. looptime-0.5/.github/CODEOWNERS +2 -0
  3. looptime-0.5/.github/FUNDING.yml +1 -0
  4. looptime-0.5/.github/ISSUE_TEMPLATE.md +9 -0
  5. looptime-0.5/.github/PULL_REQUEST_TEMPLATE.md +15 -0
  6. looptime-0.5/.github/workflows/ci.yaml +90 -0
  7. looptime-0.5/.github/workflows/publish.yaml +26 -0
  8. looptime-0.5/.github/workflows/thorough.yaml +86 -0
  9. looptime-0.5/.gitignore +34 -0
  10. looptime-0.5/.isort.cfg +6 -0
  11. looptime-0.5/.pre-commit-config.yaml +65 -0
  12. looptime-0.5/LICENSE +21 -0
  13. looptime-0.5/MAINTAINERS +1 -0
  14. looptime-0.5/PKG-INFO +802 -0
  15. looptime-0.5/README.md +768 -0
  16. looptime-0.5/SECURITY.md +1 -0
  17. looptime-0.5/looptime/.gitignore +2 -0
  18. looptime-0.5/looptime/__init__.py +17 -0
  19. looptime-0.5/looptime/_version.py +34 -0
  20. looptime-0.5/looptime/chronometers.py +71 -0
  21. looptime-0.5/looptime/loops.py +387 -0
  22. looptime-0.5/looptime/math.py +126 -0
  23. looptime-0.5/looptime/patchers.py +45 -0
  24. looptime-0.5/looptime/plugin.py +348 -0
  25. looptime-0.5/looptime/py.typed +0 -0
  26. looptime-0.5/looptime/timeproxies.py +34 -0
  27. looptime-0.5/looptime.egg-info/PKG-INFO +802 -0
  28. looptime-0.5/looptime.egg-info/SOURCES.txt +43 -0
  29. looptime-0.5/looptime.egg-info/dependency_links.txt +1 -0
  30. looptime-0.5/looptime.egg-info/entry_points.txt +4 -0
  31. looptime-0.5/looptime.egg-info/top_level.txt +1 -0
  32. looptime-0.5/mypy.ini +3 -0
  33. looptime-0.5/pyproject.toml +66 -0
  34. looptime-0.5/setup.cfg +4 -0
  35. looptime-0.5/tests/conftest.py +17 -0
  36. looptime-0.5/tests/test_chronometers.py +62 -0
  37. looptime-0.5/tests/test_initialisation.py +31 -0
  38. looptime-0.5/tests/test_patching.py +92 -0
  39. looptime-0.5/tests/test_plugin.py +146 -0
  40. looptime-0.5/tests/test_readme.py +25 -0
  41. looptime-0.5/tests/test_subclassing.py +52 -0
  42. looptime-0.5/tests/test_time_moves.py +165 -0
  43. looptime-0.5/tests/test_time_on_executors.py +32 -0
  44. looptime-0.5/tests/test_time_on_io_idle.py +104 -0
  45. looptime-0.5/tests/test_timeproxies.py +64 -0
@@ -0,0 +1 @@
1
+ comment: off
@@ -0,0 +1,2 @@
1
+ # Who is automatically assigned to the new PRs based on their content.
2
+ * @nolar
@@ -0,0 +1 @@
1
+ github: nolar
@@ -0,0 +1,9 @@
1
+ ## Long story short
2
+
3
+ <!-- Please describe the issue in 1-3 sentences. -->
4
+
5
+
6
+ ## Description
7
+
8
+ <!-- Please provide as much information as possible.
9
+ Lack of information may result in a delayed response. Thank you! -->
@@ -0,0 +1,15 @@
1
+ <!--
2
+ Thank you for contributing! Please make sure that your code changes
3
+ are covered with tests. And in case of new features or big changes
4
+ remember to adjust the documentation.
5
+
6
+ Feel free to ping maintainers for the review!
7
+
8
+ In case of existing issue, reference it using one of the following:
9
+
10
+ closes: #ISSUE
11
+ related: #ISSUE
12
+
13
+ How to write a good git commit message:
14
+ http://chris.beams.io/posts/git-commit/
15
+ -->
@@ -0,0 +1,90 @@
1
+ name: CI
2
+ on:
3
+ pull_request:
4
+ branches:
5
+ - main
6
+ - release/**
7
+ workflow_dispatch: {}
8
+
9
+ jobs:
10
+ linters:
11
+ name: Linting and static analysis
12
+ runs-on: ubuntu-24.04
13
+ timeout-minutes: 5
14
+ steps:
15
+ - uses: actions/checkout@v5
16
+ - uses: actions/setup-python@v6
17
+ with:
18
+ python-version: "3.14"
19
+ - run: pip install --group dev --group lint -e .
20
+ - run: pre-commit run --all-files
21
+ - run: mypy looptime --strict
22
+
23
+ unit-tests:
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ python-version: [ "3.10", "3.11", "3.12", "3.13" ]
28
+ include:
29
+ - python-version: "3.14"
30
+ - python-version: "3.14"
31
+ install-extras: "pytest-asyncio<1.0.0"
32
+ name: Python ${{ matrix.python-version }}${{ matrix.install-extras && ', ' || '' }}${{ matrix.install-extras }}
33
+ runs-on: ubuntu-24.04
34
+ timeout-minutes: 5
35
+ steps:
36
+ - uses: actions/checkout@v5
37
+ - uses: actions/setup-python@v6
38
+ with:
39
+ python-version: ${{ matrix.python-version }}
40
+
41
+ - run: pip install --group dev -e .
42
+ - run: pip install "${{ matrix.install-extras }}"
43
+ if: ${{ matrix.install-extras }}
44
+ - run: pytest --color=yes --cov=looptime --cov-branch
45
+
46
+ - name: Publish coverage to Coveralls.io
47
+ if: success()
48
+ run: coveralls --service=github
49
+ env:
50
+ GITHUB_TOKEN: ${{ secrets.github_token }}
51
+ continue-on-error: true
52
+ - name: Publish coverage to CodeCov.io
53
+ uses: codecov/codecov-action@v3
54
+ if: success()
55
+ env:
56
+ PYTHON: ${{ matrix.python-version }}
57
+ with:
58
+ flags: unit
59
+ env_vars: PYTHON
60
+ continue-on-error: true
61
+
62
+ # No coverage: PyPy performs extremely poorly with tracing/coverage.
63
+ pypy-tests:
64
+ strategy:
65
+ fail-fast: false
66
+ matrix:
67
+ python-version: [ "pypy-3.10", "pypy-3.11" ]
68
+ name: Python ${{ matrix.python-version }}
69
+ runs-on: ubuntu-24.04
70
+ timeout-minutes: 5
71
+ steps:
72
+ - uses: actions/checkout@v5
73
+ - uses: actions/setup-python@v6
74
+ with:
75
+ python-version: ${{ matrix.python-version }}
76
+
77
+ - run: pip install --group dev -e .
78
+ - run: pytest --color=yes --no-cov
79
+
80
+ coveralls-finish:
81
+ name: Finalize coveralls.io
82
+ needs: [unit-tests]
83
+ runs-on: ubuntu-24.04
84
+ steps:
85
+ - uses: actions/setup-python@v6
86
+ - run: pip install coveralls
87
+ - run: coveralls --service=github --finish
88
+ env:
89
+ GITHUB_TOKEN: ${{ secrets.github_token }}
90
+ continue-on-error: true
@@ -0,0 +1,26 @@
1
+ name: Publish to PyPI
2
+ on:
3
+ release:
4
+ types:
5
+ - published
6
+ # push:
7
+ # tags:
8
+ # - "[0-9]+.[0-9]+*"
9
+ workflow_dispatch: {}
10
+
11
+ jobs:
12
+ publish:
13
+ name: Build and publish
14
+ runs-on: ubuntu-24.04
15
+ permissions:
16
+ id-token: write # for trusted publishing
17
+ steps:
18
+ - uses: actions/checkout@v5
19
+ - uses: actions/setup-python@v6
20
+ with:
21
+ python-version: "3.14"
22
+ - run: pip install --upgrade pip build
23
+ - run: python -m build # includes sdist & wheel by default
24
+ - uses: pypa/gh-action-pypi-publish@release/v1
25
+ with:
26
+ skip_existing: true
@@ -0,0 +1,86 @@
1
+ name: Thorough tests
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ - release/**
7
+ schedule:
8
+ - cron: "13 3 * * 6"
9
+ workflow_dispatch: {}
10
+
11
+ jobs:
12
+ linters:
13
+ name: Linting and static analysis
14
+ runs-on: ubuntu-24.04
15
+ timeout-minutes: 5
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+ - uses: actions/setup-python@v6
19
+ with:
20
+ python-version: "3.14"
21
+ - run: pip install --group dev --group lint -e .
22
+ - run: pre-commit run --all-files
23
+ - run: mypy looptime --strict
24
+
25
+ unit-tests:
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
30
+ name: Python ${{ matrix.python-version }}
31
+ runs-on: ubuntu-24.04
32
+ timeout-minutes: 5
33
+ steps:
34
+ - uses: actions/checkout@v5
35
+ - uses: actions/setup-python@v6
36
+ with:
37
+ python-version: ${{ matrix.python-version }}
38
+
39
+ - run: pip install --group dev -e .
40
+ - run: pytest --color=yes --cov=looptime --cov-branch
41
+
42
+ - name: Publish coverage to Coveralls.io
43
+ if: success()
44
+ run: coveralls --service=github
45
+ env:
46
+ GITHUB_TOKEN: ${{ secrets.github_token }}
47
+ continue-on-error: true
48
+ - name: Publish coverage to CodeCov.io
49
+ uses: codecov/codecov-action@v3
50
+ if: success()
51
+ env:
52
+ PYTHON: ${{ matrix.python-version }}
53
+ with:
54
+ flags: unit
55
+ env_vars: PYTHON
56
+ continue-on-error: true
57
+
58
+ # No coverage: PyPy performs extremely poorly with tracing/coverage.
59
+ pypy-tests:
60
+ strategy:
61
+ fail-fast: false
62
+ matrix:
63
+ python-version: [ "pypy-3.10", "pypy-3.11" ]
64
+ name: Python ${{ matrix.python-version }}
65
+ runs-on: ubuntu-24.04
66
+ timeout-minutes: 5
67
+ steps:
68
+ - uses: actions/checkout@v5
69
+ - uses: actions/setup-python@v6
70
+ with:
71
+ python-version: ${{ matrix.python-version }}
72
+
73
+ - run: pip install --group dev -e .
74
+ - run: pytest --color=yes --no-cov
75
+
76
+ coveralls-finish:
77
+ name: Finalize coveralls.io
78
+ needs: [unit-tests]
79
+ runs-on: ubuntu-24.04
80
+ steps:
81
+ - uses: actions/setup-python@v6
82
+ - run: pip install coveralls
83
+ - run: coveralls --service=github --finish
84
+ env:
85
+ GITHUB_TOKEN: ${{ secrets.github_token }}
86
+ continue-on-error: true
@@ -0,0 +1,34 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+
5
+ # Distribution / packaging
6
+ build/
7
+ dist/
8
+ .eggs/
9
+ *.egg-info/
10
+ *.egg
11
+
12
+ # Unit test / coverage reports
13
+ htmlcov/
14
+ .tox/
15
+ .coverage
16
+ .coverage.*
17
+ .cache
18
+ .pytest_cache
19
+ nosetests.xml
20
+ coverage.xml
21
+ junit.xml
22
+ *.cover
23
+ .hypothesis/
24
+ .mypy_cache
25
+
26
+ # Documentation
27
+ docs/_build
28
+ docs/packages
29
+
30
+ # VirtualEnv
31
+ env
32
+
33
+ # VSCode
34
+ .vscode
@@ -0,0 +1,6 @@
1
+ [settings]
2
+ line_length = 100
3
+ multi_line_output = 11
4
+ balanced_wrapping = true
5
+ combine_as_imports = true
6
+ case_sensitive = true
@@ -0,0 +1,65 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ exclude: |
4
+ (?x)^(
5
+ docs/.*\.xml|
6
+ docs/.*\.png
7
+ )
8
+ repos:
9
+ - repo: https://github.com/pre-commit/pre-commit-hooks
10
+ rev: v5.0.0
11
+ hooks:
12
+ - id: check-ast
13
+ - id: trailing-whitespace
14
+ - id: end-of-file-fixer
15
+ - id: fix-byte-order-marker
16
+ - id: check-xml
17
+ - id: check-toml
18
+ - id: check-yaml
19
+ args: [--allow-multiple-documents]
20
+ - id: check-json
21
+ - id: pretty-format-json
22
+ - id: check-added-large-files
23
+ - id: check-builtin-literals
24
+ - id: check-case-conflict
25
+ - id: check-executables-have-shebangs
26
+ - id: check-vcs-permalinks
27
+ - id: check-docstring-first
28
+ - id: check-merge-conflict
29
+ - id: check-symlinks
30
+ - id: destroyed-symlinks
31
+ - id: debug-statements
32
+ - id: detect-aws-credentials
33
+ args: [--allow-missing-credentials]
34
+ - id: detect-private-key
35
+ exclude: ^tests/authentication/test_credentials.py$
36
+ - id: fix-encoding-pragma
37
+ args: [--remove]
38
+ - id: forbid-new-submodules
39
+ - id: mixed-line-ending
40
+ args: [--fix=auto]
41
+ - id: name-tests-test
42
+ args: [--django]
43
+ - id: requirements-txt-fixer
44
+
45
+ # Intentionally disabled:
46
+ # - id: double-quote-string-fixer
47
+
48
+ - repo: https://github.com/pre-commit/pygrep-hooks
49
+ rev: v1.10.0
50
+ hooks:
51
+ - id: python-check-blanket-noqa
52
+ - id: python-check-mock-methods
53
+ - id: python-no-eval
54
+ - id: python-no-log-warn
55
+ - id: python-use-type-annotations
56
+ - id: rst-backticks
57
+ - id: rst-directive-colons
58
+ - id: rst-inline-touching-normal
59
+ - id: text-unicode-replacement-char
60
+
61
+ - repo: https://github.com/PyCQA/isort
62
+ rev: 6.0.1
63
+ hooks:
64
+ - id: isort
65
+ name: isort-source-code
looptime-0.5/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Sergey Vasilyev <nolar@nolar.info>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ Sergey Vasilyev <nolar@nolar.info>