mode-streaming 0.3.4__tar.gz → 0.5.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.
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/.editorconfig +4 -0
- mode-streaming-0.3.4/.github/workflows/gh-pages.yml → mode_streaming-0.5.0/.github/workflows/deploy-docs.yml +21 -14
- mode_streaming-0.5.0/.github/workflows/publish.yml +63 -0
- mode_streaming-0.5.0/.github/workflows/tests.yml +71 -0
- mode_streaming-0.5.0/.gitignore +102 -0
- mode_streaming-0.5.0/.pre-commit-config.yaml +35 -0
- mode_streaming-0.5.0/CHANGELOG.md +4 -0
- mode-streaming-0.3.4/docs/includes/code-of-conduct.txt → mode_streaming-0.5.0/CODE_OF_CONDUCT.md +1 -2
- mode_streaming-0.5.0/CONTRIBUTING.md +131 -0
- mode_streaming-0.5.0/PKG-INFO +529 -0
- mode_streaming-0.5.0/README.md +484 -0
- mode_streaming-0.5.0/docs/changelog.md +1 -0
- mode_streaming-0.5.0/docs/contributing.md +1 -0
- mode_streaming-0.5.0/docs/creating-service.md +102 -0
- mode_streaming-0.5.0/docs/example-service.md +3 -0
- mode_streaming-0.5.0/docs/example-webapp.md +3 -0
- mode_streaming-0.5.0/docs/index.md +152 -0
- mode_streaming-0.5.0/docs/references/mode.debug.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.exceptions.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.locals.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.loop.eventlet.md +8 -0
- mode_streaming-0.5.0/docs/references/mode.loop.gevent.md +8 -0
- mode_streaming-0.5.0/docs/references/mode.loop.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.loop.uvloop.md +8 -0
- mode_streaming-0.5.0/docs/references/mode.proxy.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.services.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.signals.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.supervisors.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.threads.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.timers.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.types.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.types.services.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.types.signals.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.types.supervisors.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.aiter.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.collections.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.compat.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.contexts.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.cron.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.futures.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.graphs.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.imports.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.locals.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.locks.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.logging.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.loops.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.mocks.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.objects.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.queues.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.text.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.times.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.tracebacks.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.trees.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.types.graphs.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.utils.types.trees.md +3 -0
- mode_streaming-0.5.0/docs/references/mode.worker.md +3 -0
- mode-streaming-0.3.4/examples/tutorial.py → mode_streaming-0.5.0/examples/webapp.py +3 -3
- mode_streaming-0.5.0/mkdocs.yml +108 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/__init__.py +28 -78
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/debug.py +15 -6
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/locals.py +220 -231
- mode_streaming-0.5.0/mode/loop/__init__.py +82 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/loop/_gevent_loop.py +5 -3
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/loop/eventlet.py +6 -4
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/loop/gevent.py +16 -10
- mode_streaming-0.5.0/mode/loop/uvloop.py +7 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/proxy.py +15 -9
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/services.py +277 -231
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/signals.py +37 -40
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/supervisors.py +25 -21
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/threads.py +49 -48
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/timers.py +11 -6
- mode_streaming-0.5.0/mode/types/services.py +155 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/types/signals.py +32 -58
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/types/supervisors.py +14 -18
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/aiter.py +21 -27
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/collections.py +128 -151
- mode_streaming-0.5.0/mode/utils/compat.py +31 -0
- mode_streaming-0.5.0/mode/utils/contexts.py +26 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/cron.py +4 -3
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/futures.py +25 -21
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/graphs/formatter.py +31 -20
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/graphs/graph.py +29 -23
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/imports.py +143 -103
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/locals.py +7 -6
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/locks.py +8 -5
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/logging.py +199 -169
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/loops.py +31 -3
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/mocks.py +19 -16
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/objects.py +247 -238
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/queues.py +41 -29
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/text.py +46 -38
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/times.py +59 -58
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/tracebacks.py +37 -39
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/trees.py +14 -12
- mode_streaming-0.5.0/mode/utils/types/graphs.py +115 -0
- mode_streaming-0.5.0/mode/utils/types/trees.py +71 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/worker.py +38 -55
- mode_streaming-0.5.0/mode_streaming.egg-info/PKG-INFO +529 -0
- mode_streaming-0.5.0/mode_streaming.egg-info/SOURCES.txt +161 -0
- mode_streaming-0.5.0/mode_streaming.egg-info/requires.txt +16 -0
- mode_streaming-0.5.0/mode_streaming.egg-info/scm_file_list.json +158 -0
- mode_streaming-0.5.0/mode_streaming.egg-info/scm_version.json +8 -0
- mode_streaming-0.5.0/pyproject.toml +233 -0
- mode_streaming-0.5.0/requirements-docs.txt +3 -0
- mode_streaming-0.5.0/requirements-tests.txt +24 -0
- mode_streaming-0.5.0/requirements.txt +3 -0
- mode_streaming-0.5.0/scripts/build-docs.sh +5 -0
- mode_streaming-0.5.0/scripts/build.sh +6 -0
- mode_streaming-0.5.0/scripts/bump.sh +5 -0
- mode-streaming-0.3.4/scripts/clean → mode_streaming-0.5.0/scripts/clean.sh +6 -2
- mode_streaming-0.5.0/scripts/format.sh +6 -0
- mode_streaming-0.5.0/scripts/lint.sh +8 -0
- mode-streaming-0.3.4/scripts/docs → mode_streaming-0.5.0/scripts/tests.sh +3 -3
- mode_streaming-0.5.0/setup.cfg +4 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/conftest.py +1 -1
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/test_mode.py +0 -1
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/test_proxy.py +1 -7
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/test_service.py +7 -12
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/test_signals.py +5 -6
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/test_supervisors.py +2 -4
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/test_timers.py +26 -36
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_aiter.py +10 -2
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_collections.py +18 -28
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_compat.py +2 -10
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_futures.py +5 -7
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_locals.py +3 -1
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_queues.py +12 -9
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_text.py +2 -14
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_times.py +1 -2
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_tracebacks.py +3 -4
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_trees.py +2 -2
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/test_debug.py +2 -7
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/test_locals.py +49 -89
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/test_services.py +43 -58
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/test_supervisors.py +7 -13
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/test_threads.py +18 -26
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/test_worker.py +9 -20
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/utils/test_cron.py +2 -11
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/utils/test_imports.py +26 -28
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/utils/test_logging.py +64 -71
- mode_streaming-0.5.0/tests/unit/utils/test_loops.py +48 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/utils/test_objects.py +94 -157
- mode-streaming-0.3.4/.coveragerc +0 -37
- mode-streaming-0.3.4/.github/workflows/dist.yml +0 -47
- mode-streaming-0.3.4/.github/workflows/python-package.yml +0 -39
- mode-streaming-0.3.4/.gitignore +0 -35
- mode-streaming-0.3.4/.pre-commit-config.yaml +0 -27
- mode-streaming-0.3.4/.pyup.yml +0 -6
- mode-streaming-0.3.4/CODE_OF_CONDUCT.rst +0 -43
- mode-streaming-0.3.4/Changelog +0 -35
- mode-streaming-0.3.4/MANIFEST.in +0 -16
- mode-streaming-0.3.4/Makefile +0 -188
- mode-streaming-0.3.4/PKG-INFO +0 -523
- mode-streaming-0.3.4/README.rst +0 -489
- mode-streaming-0.3.4/docs/Makefile +0 -233
- mode-streaming-0.3.4/docs/_static/.keep +0 -0
- mode-streaming-0.3.4/docs/_templates/.keep +0 -0
- mode-streaming-0.3.4/docs/changelog.rst +0 -1
- mode-streaming-0.3.4/docs/conf.py +0 -61
- mode-streaming-0.3.4/docs/copyright.rst +0 -28
- mode-streaming-0.3.4/docs/faq.rst +0 -7
- mode-streaming-0.3.4/docs/glossary.rst +0 -12
- mode-streaming-0.3.4/docs/images/favicon.ico +0 -0
- mode-streaming-0.3.4/docs/images/logo.png +0 -0
- mode-streaming-0.3.4/docs/images/tutorial_graph.png +0 -0
- mode-streaming-0.3.4/docs/includes/faq.txt +0 -130
- mode-streaming-0.3.4/docs/includes/installation.txt +0 -42
- mode-streaming-0.3.4/docs/includes/introduction.txt +0 -232
- mode-streaming-0.3.4/docs/index.rst +0 -32
- mode-streaming-0.3.4/docs/introduction.rst +0 -11
- mode-streaming-0.3.4/docs/make.bat +0 -272
- mode-streaming-0.3.4/docs/reference/index.rst +0 -76
- mode-streaming-0.3.4/docs/reference/mode.debug.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.exceptions.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.locals.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.loop.eventlet.rst +0 -12
- mode-streaming-0.3.4/docs/reference/mode.loop.gevent.rst +0 -12
- mode-streaming-0.3.4/docs/reference/mode.loop.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.loop.uvloop.rst +0 -12
- mode-streaming-0.3.4/docs/reference/mode.proxy.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.services.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.signals.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.supervisors.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.threads.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.timers.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.types.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.types.services.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.types.signals.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.types.supervisors.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.aiter.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.collections.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.compat.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.contexts.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.cron.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.futures.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.graphs.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.imports.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.locals.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.locks.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.logging.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.loops.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.mocks.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.objects.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.queues.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.text.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.times.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.tracebacks.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.trees.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.types.graphs.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.types.trees.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.utils.typing.rst +0 -11
- mode-streaming-0.3.4/docs/reference/mode.worker.rst +0 -11
- mode-streaming-0.3.4/docs/templates/readme.txt +0 -36
- mode-streaming-0.3.4/docs/userguide/index.rst +0 -13
- mode-streaming-0.3.4/docs/userguide/services.rst +0 -249
- mode-streaming-0.3.4/mode/loop/__init__.py +0 -71
- mode-streaming-0.3.4/mode/loop/uvloop.py +0 -6
- mode-streaming-0.3.4/mode/types/services.py +0 -186
- mode-streaming-0.3.4/mode/utils/_py37_contextlib.py +0 -486
- mode-streaming-0.3.4/mode/utils/compat.py +0 -55
- mode-streaming-0.3.4/mode/utils/contexts.py +0 -77
- mode-streaming-0.3.4/mode/utils/types/graphs.py +0 -128
- mode-streaming-0.3.4/mode/utils/types/trees.py +0 -85
- mode-streaming-0.3.4/mode/utils/typing.py +0 -74
- mode-streaming-0.3.4/mode_streaming.egg-info/PKG-INFO +0 -523
- mode-streaming-0.3.4/mode_streaming.egg-info/SOURCES.txt +0 -194
- mode-streaming-0.3.4/mode_streaming.egg-info/not-zip-safe +0 -1
- mode-streaming-0.3.4/mode_streaming.egg-info/requires.txt +0 -20
- mode-streaming-0.3.4/requirements/ci.txt +0 -3
- mode-streaming-0.3.4/requirements/default.txt +0 -6
- mode-streaming-0.3.4/requirements/dev.txt +0 -9
- mode-streaming-0.3.4/requirements/dist.txt +0 -12
- mode-streaming-0.3.4/requirements/docs.txt +0 -7
- mode-streaming-0.3.4/requirements/extras/eventlet.txt +0 -2
- mode-streaming-0.3.4/requirements/extras/gevent.txt +0 -1
- mode-streaming-0.3.4/requirements/extras/uvloop.txt +0 -1
- mode-streaming-0.3.4/requirements/flakes.txt +0 -11
- mode-streaming-0.3.4/requirements/test.txt +0 -14
- mode-streaming-0.3.4/requirements/typecheck.txt +0 -2
- mode-streaming-0.3.4/scripts/README.md +0 -11
- mode-streaming-0.3.4/scripts/build +0 -13
- mode-streaming-0.3.4/scripts/check +0 -14
- mode-streaming-0.3.4/scripts/coverage +0 -11
- mode-streaming-0.3.4/scripts/install +0 -19
- mode-streaming-0.3.4/scripts/lint +0 -13
- mode-streaming-0.3.4/scripts/publish +0 -19
- mode-streaming-0.3.4/scripts/tests +0 -19
- mode-streaming-0.3.4/setup.cfg +0 -90
- mode-streaming-0.3.4/setup.py +0 -136
- mode-streaming-0.3.4/tox.ini +0 -45
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/.github/ISSUE_TEMPLATE.md +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/AUTHORS +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/LICENSE +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/examples/service.py +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/exceptions.py +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/py.typed +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/types/__init__.py +2 -2
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/__init__.py +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/graphs/__init__.py +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode/utils/types/__init__.py +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode_streaming.egg-info/dependency_links.txt +0 -0
- {mode-streaming-0.3.4 → mode_streaming-0.5.0}/mode_streaming.egg-info/top_level.txt +0 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/__init__.py +0 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/__init__.py +0 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/__init__.py +0 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/functional/utils/test_contexts.py +0 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/__init__.py +0 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/utils/__init__.py +0 -0
- {mode-streaming-0.3.4/t → mode_streaming-0.5.0/tests}/unit/utils/test_locks.py +0 -0
|
@@ -8,29 +8,36 @@ on:
|
|
|
8
8
|
release:
|
|
9
9
|
types: [created]
|
|
10
10
|
branches:
|
|
11
|
-
-
|
|
11
|
+
- master
|
|
12
|
+
workflow_dispatch:
|
|
12
13
|
|
|
13
14
|
jobs:
|
|
14
15
|
build:
|
|
15
|
-
name:
|
|
16
|
+
name: Build docs
|
|
16
17
|
runs-on: ubuntu-latest
|
|
17
18
|
steps:
|
|
18
|
-
- uses: actions/
|
|
19
|
-
- uses: actions/checkout@v3
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
20
|
with:
|
|
21
21
|
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.13'
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: pip install -r requirements.txt
|
|
29
|
+
|
|
30
|
+
- name: Build docs
|
|
31
|
+
run: scripts/build-docs.sh
|
|
32
|
+
|
|
33
|
+
- name: Upload artifacts
|
|
34
|
+
uses: actions/upload-pages-artifact@v3
|
|
28
35
|
with:
|
|
29
36
|
# Upload built docs
|
|
30
|
-
path: "./
|
|
37
|
+
path: "./site"
|
|
31
38
|
deploy:
|
|
32
|
-
name:
|
|
33
|
-
if: github.event_name == 'release' && github.event.action == '
|
|
39
|
+
name: Deploy docs
|
|
40
|
+
if: github.event_name == 'release' && github.event.action == 'created'
|
|
34
41
|
needs: build
|
|
35
42
|
runs-on: ubuntu-latest
|
|
36
43
|
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
|
@@ -42,6 +49,6 @@ jobs:
|
|
|
42
49
|
name: github-pages
|
|
43
50
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
44
51
|
steps:
|
|
45
|
-
- uses: actions/deploy-pages@
|
|
52
|
+
- uses: actions/deploy-pages@v4
|
|
46
53
|
id: deployment
|
|
47
54
|
name: "Deploy to GitHub Pages"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Publish Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Only run when release is created in the master branch
|
|
5
|
+
release:
|
|
6
|
+
types: [created]
|
|
7
|
+
branches:
|
|
8
|
+
- 'master'
|
|
9
|
+
# Manual re-publish/backfill: run from a tag to rebuild and upload any
|
|
10
|
+
# files missing on PyPI for that version (skip-existing keeps the rest).
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: Build distributable files
|
|
16
|
+
runs-on: 'ubuntu-latest'
|
|
17
|
+
steps:
|
|
18
|
+
- name: 'Checkout source repository'
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.13'
|
|
26
|
+
|
|
27
|
+
- name: Install build dependencies
|
|
28
|
+
# --upgrade packaging: the system interpreter satisfies twine's floor
|
|
29
|
+
# with packaging 24.0, which predates Metadata-Version 2.4 / PEP 639
|
|
30
|
+
# License-File support and fails `twine check` on wheels built by
|
|
31
|
+
# setuptools >= 77.
|
|
32
|
+
run: pip install --upgrade build twine packaging
|
|
33
|
+
|
|
34
|
+
- name: 'Build package'
|
|
35
|
+
run: scripts/build.sh
|
|
36
|
+
|
|
37
|
+
- name: Upload build artifacts
|
|
38
|
+
uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: dist-packages
|
|
41
|
+
path: 'dist/*'
|
|
42
|
+
if-no-files-found: error
|
|
43
|
+
|
|
44
|
+
upload_pypi:
|
|
45
|
+
name: Upload packages
|
|
46
|
+
needs: ['build']
|
|
47
|
+
runs-on: 'ubuntu-latest'
|
|
48
|
+
if: >-
|
|
49
|
+
(github.event_name == 'release' && github.event.action == 'created')
|
|
50
|
+
|| github.event_name == 'workflow_dispatch'
|
|
51
|
+
steps:
|
|
52
|
+
- name: Download artifacts
|
|
53
|
+
uses: actions/download-artifact@v4
|
|
54
|
+
with:
|
|
55
|
+
name: dist-packages
|
|
56
|
+
path: dist
|
|
57
|
+
|
|
58
|
+
- name: Publish package to PyPI
|
|
59
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
60
|
+
with:
|
|
61
|
+
user: '__token__'
|
|
62
|
+
password: '${{ secrets.PYPI_API_TOKEN }}'
|
|
63
|
+
skip-existing: true
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: ["master"]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: ["master"]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
tests:
|
|
14
|
+
name: "Run tests with Python ${{ matrix.python-version }}"
|
|
15
|
+
runs-on: "ubuntu-latest"
|
|
16
|
+
|
|
17
|
+
continue-on-error: ${{ matrix.experimental }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
python-version:
|
|
22
|
+
- "pypy3.9"
|
|
23
|
+
- "pypy3.10"
|
|
24
|
+
- "3.9"
|
|
25
|
+
- "3.10"
|
|
26
|
+
- "3.11"
|
|
27
|
+
- "3.12"
|
|
28
|
+
- "3.13"
|
|
29
|
+
experimental: [ false ]
|
|
30
|
+
include:
|
|
31
|
+
- python-version: "~3.14.0-0"
|
|
32
|
+
experimental: true
|
|
33
|
+
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v3
|
|
36
|
+
with:
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
- uses: "actions/setup-python@v4"
|
|
39
|
+
with:
|
|
40
|
+
python-version: "${{ matrix.python-version }}"
|
|
41
|
+
cache: "pip"
|
|
42
|
+
cache-dependency-path: |
|
|
43
|
+
requirements-docs.txt
|
|
44
|
+
requirements-tests.txt
|
|
45
|
+
pyproject.toml
|
|
46
|
+
|
|
47
|
+
- name: Install dependencies
|
|
48
|
+
run: pip install -r requirements.txt
|
|
49
|
+
|
|
50
|
+
- name: Run linting checks
|
|
51
|
+
run: scripts/lint.sh
|
|
52
|
+
|
|
53
|
+
- name: Run tests
|
|
54
|
+
run: scripts/tests.sh
|
|
55
|
+
|
|
56
|
+
- name: Enforce coverage
|
|
57
|
+
uses: codecov/codecov-action@v4
|
|
58
|
+
with:
|
|
59
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
60
|
+
|
|
61
|
+
check: # This job does nothing and is only used for the branch protection
|
|
62
|
+
name: ✅ Ensure the required checks passing
|
|
63
|
+
if: always()
|
|
64
|
+
needs:
|
|
65
|
+
- tests
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
steps:
|
|
68
|
+
- name: Decide whether the needed jobs succeeded or failed
|
|
69
|
+
uses: re-actors/alls-green@release/v1
|
|
70
|
+
with:
|
|
71
|
+
jobs: ${{ toJSON(needs) }}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Python template
|
|
2
|
+
## Byte-compiled / optimized / DLL files
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*.pyc
|
|
6
|
+
*$py.class
|
|
7
|
+
|
|
8
|
+
## Distribution / packaging
|
|
9
|
+
.Python
|
|
10
|
+
build/
|
|
11
|
+
.build/
|
|
12
|
+
_build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
|
|
28
|
+
## PyInstaller
|
|
29
|
+
## Usually these files are written by a python script from a template
|
|
30
|
+
## before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
## Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
## Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.coverage
|
|
41
|
+
.coverage.*
|
|
42
|
+
.cache
|
|
43
|
+
nosetests.xml
|
|
44
|
+
coverage.xml
|
|
45
|
+
*.cover
|
|
46
|
+
.hypothesis/
|
|
47
|
+
|
|
48
|
+
## pyenv
|
|
49
|
+
.python-version
|
|
50
|
+
|
|
51
|
+
## Environments
|
|
52
|
+
.venv
|
|
53
|
+
venv/
|
|
54
|
+
ENV/
|
|
55
|
+
|
|
56
|
+
## mkdocs documentation
|
|
57
|
+
/site
|
|
58
|
+
|
|
59
|
+
## mypy
|
|
60
|
+
.mypy_cache/
|
|
61
|
+
|
|
62
|
+
# VisualStudioCode template
|
|
63
|
+
.vscode/
|
|
64
|
+
!.vscode/settings.json
|
|
65
|
+
!.vscode/tasks.json
|
|
66
|
+
!.vscode/launch.json
|
|
67
|
+
!.vscode/extensions.json
|
|
68
|
+
|
|
69
|
+
# Emacs
|
|
70
|
+
*~
|
|
71
|
+
|
|
72
|
+
# Vim template
|
|
73
|
+
## Swap
|
|
74
|
+
[._]*.s[a-v][a-z]
|
|
75
|
+
[._]*.sw[a-p]
|
|
76
|
+
[._]s[a-v][a-z]
|
|
77
|
+
[._]sw[a-p]
|
|
78
|
+
|
|
79
|
+
## Session
|
|
80
|
+
Session.vim
|
|
81
|
+
|
|
82
|
+
# Auto-generated tag files
|
|
83
|
+
tags
|
|
84
|
+
.pytest_cache/
|
|
85
|
+
.ipython/
|
|
86
|
+
.ruff_cache/
|
|
87
|
+
|
|
88
|
+
### PyCharm
|
|
89
|
+
.idea
|
|
90
|
+
|
|
91
|
+
# Misc
|
|
92
|
+
.DS_Store
|
|
93
|
+
.directory
|
|
94
|
+
erl_crash.dump
|
|
95
|
+
*.db
|
|
96
|
+
.ropeproject/
|
|
97
|
+
.project
|
|
98
|
+
.pydevproject
|
|
99
|
+
.ve*
|
|
100
|
+
.vagrant/
|
|
101
|
+
*-cache*
|
|
102
|
+
.pyre/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
+
repos:
|
|
4
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
5
|
+
rev: v5.0.0
|
|
6
|
+
hooks:
|
|
7
|
+
- id: trailing-whitespace
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
- id: check-toml
|
|
11
|
+
- id: check-added-large-files
|
|
12
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
13
|
+
rev: v3.18.0
|
|
14
|
+
hooks:
|
|
15
|
+
- id: commitizen
|
|
16
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
17
|
+
rev: v0.12.1
|
|
18
|
+
hooks:
|
|
19
|
+
# Run the linter
|
|
20
|
+
- id: ruff-check
|
|
21
|
+
args:
|
|
22
|
+
- --fix
|
|
23
|
+
# Run the formatter
|
|
24
|
+
- id: ruff-format
|
|
25
|
+
|
|
26
|
+
# NOTE(@manawasp): uncomment when mypy restored
|
|
27
|
+
# - repo: https://github.com/pre-commit/mirrors-mypy
|
|
28
|
+
# rev: v1.8.0
|
|
29
|
+
# hooks:
|
|
30
|
+
# - id: mypy
|
|
31
|
+
# entry: mypy
|
|
32
|
+
# files: \.py$
|
|
33
|
+
# language: system
|
|
34
|
+
# exclude: ^(t|venv|env|examples|docs)/
|
|
35
|
+
# args: [--install-types, --non-interactive]
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions to mode are very welcome, feel free to open an issue to propose your ideas.
|
|
4
|
+
|
|
5
|
+
To make a contribution please create a pull request.
|
|
6
|
+
|
|
7
|
+
## Developing
|
|
8
|
+
|
|
9
|
+
First it is recommended to fork this repository into your personal Github account then clone your freshly generated fork locally.
|
|
10
|
+
|
|
11
|
+
### Setup environment
|
|
12
|
+
|
|
13
|
+
Here are some guidelines to set up your environment:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
$ cd mode/
|
|
17
|
+
$ python -m venv env # Create python virtual environment, a `env/` has been created
|
|
18
|
+
$ source env/bin/active # Activate the environment
|
|
19
|
+
(venv) $ which pip # Ensure everything is well configured
|
|
20
|
+
/some/directory/mode/env/bin/pip
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Install project dependencies
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
(venv) $ pip install -r requirements.txt
|
|
27
|
+
Obtaining file:///some/directory/mode
|
|
28
|
+
Installing build dependencies ... done
|
|
29
|
+
Checking if build backend supports build_editable ... done
|
|
30
|
+
Getting requirements to build editable ... done
|
|
31
|
+
Installing backend dependencies ... done
|
|
32
|
+
Preparing editable metadata (pyproject.toml) ... done
|
|
33
|
+
Ignoring pre-commit: markers 'python_version < "3.9"' don't match your environment
|
|
34
|
+
...
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This project apply some quality rules on code and commit, to enforce them at commit time you should install the [pre-commit](https://pre-commit.com/) hook:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
(venv) $ pre-commit install
|
|
41
|
+
pre-commit installed at .git/hooks/pre-commit
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Format & lint the code
|
|
45
|
+
|
|
46
|
+
You can run the format script to make your change compliant:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
(venv) $ ./scripts/format.sh
|
|
50
|
+
+ ruff format mode tests
|
|
51
|
+
79 files left unchanged
|
|
52
|
+
+ ruff check mode tests --fix
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
_The script uses [ruff](https://github.com/astral-sh/ruff) & [mypy](https://mypy-lang.org/)._
|
|
56
|
+
|
|
57
|
+
### Run tests
|
|
58
|
+
|
|
59
|
+
A script is also available to run them:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
(venv) $ ./scripts/tests.sh
|
|
63
|
+
+ pytest tests --cov=mode
|
|
64
|
+
Test session starts (platform: linux, Python 3.12.2, pytest 8.1.1, pytest-sugar 1.0.0)
|
|
65
|
+
...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
_The script uses [pytest](https://docs.pytest.org/en/8.0.x/contents.html)._
|
|
69
|
+
|
|
70
|
+
### Commit format
|
|
71
|
+
|
|
72
|
+
Commit should be formatted following [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
73
|
+
|
|
74
|
+
You can commit manually and respect the convention or you can use the cli to help you formatting correctly:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
(venv) $ cz commit
|
|
78
|
+
? Select the type of change you are committing docs: Documentation only changes
|
|
79
|
+
? What is the scope of this change? (class or file name): (press [enter] to skip)
|
|
80
|
+
README
|
|
81
|
+
? Write a short and imperative summary of the code changes: (lower case and no period)
|
|
82
|
+
correct spelling of README
|
|
83
|
+
? Provide additional contextual information about the code changes: (press [enter] to skip)
|
|
84
|
+
|
|
85
|
+
? Is this a BREAKING CHANGE? Correlates with MAJOR in SemVer No
|
|
86
|
+
? Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
docs(README): correct spelling of README
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
To be able to run the documentation locally you should setup your environment and install dependencies, if not already you can read the two first part of the Developing section.
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
(venv) $ mkdocs serve
|
|
98
|
+
INFO - Building documentation...
|
|
99
|
+
INFO - Cleaning site directory
|
|
100
|
+
INFO - Documentation built in 1.78 seconds
|
|
101
|
+
INFO - [19:38:48] Watching paths for changes: 'docs', 'mkdocs.yml'
|
|
102
|
+
INFO - [19:38:48] Serving on http://127.0.0.1:8000/
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Then, you can browse the documentation on http://127.0.0.1:8000.
|
|
106
|
+
|
|
107
|
+
## Maintainers
|
|
108
|
+
|
|
109
|
+
### Publish a new release
|
|
110
|
+
|
|
111
|
+
1. First create a new tag and update changelog
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
(venv) $ ./scripts/bump.sh
|
|
115
|
+
+ cz bump --changelog
|
|
116
|
+
bump: version 0.2.0 → 0.2.1
|
|
117
|
+
tag to create: 0.2.1
|
|
118
|
+
increment detected: PATCH
|
|
119
|
+
|
|
120
|
+
[master b35722f] bump: version 0.2.0 → 0.2.1
|
|
121
|
+
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
122
|
+
|
|
123
|
+
...
|
|
124
|
+
|
|
125
|
+
Done!
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
!!! note
|
|
129
|
+
If this pass it will automatically push the commit and tags to the remote server, you may want to use `cz bump --changelog --dry-run` to check generated changes.
|
|
130
|
+
|
|
131
|
+
2. Then after ensuring github pass you could publish the release via the Github interface. (An action will triggered and will publish the package to pypi and documentation to the Github pages).
|