labtasker 0.1.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.
Files changed (154) hide show
  1. labtasker-0.1.0/.coveragerc +4 -0
  2. labtasker-0.1.0/.dockerignore +12 -0
  3. labtasker-0.1.0/.gitattributes +1 -0
  4. labtasker-0.1.0/.github/workflows/deploy-doc.yml +46 -0
  5. labtasker-0.1.0/.github/workflows/push-ghcr.yml +34 -0
  6. labtasker-0.1.0/.github/workflows/release.yml +50 -0
  7. labtasker-0.1.0/.github/workflows/test-doc.yml +32 -0
  8. labtasker-0.1.0/.github/workflows/unit-test-coverage.yml +33 -0
  9. labtasker-0.1.0/.github/workflows/unit-test-matrix.yml +33 -0
  10. labtasker-0.1.0/.gitignore +186 -0
  11. labtasker-0.1.0/.pre-commit-config.yaml +41 -0
  12. labtasker-0.1.0/.pytest.ini +9 -0
  13. labtasker-0.1.0/.python-version +6 -0
  14. labtasker-0.1.0/Dockerfile +22 -0
  15. labtasker-0.1.0/MANIFEST.in +27 -0
  16. labtasker-0.1.0/PKG-INFO +89 -0
  17. labtasker-0.1.0/PRIVACY.md +1 -0
  18. labtasker-0.1.0/README.md +32 -0
  19. labtasker-0.1.0/demo/bash_demo/job_main.py +23 -0
  20. labtasker-0.1.0/demo/bash_demo/run_job.sh +5 -0
  21. labtasker-0.1.0/demo/bash_demo/submit_job.sh +11 -0
  22. labtasker-0.1.0/demo/python_demo/run_job.py +20 -0
  23. labtasker-0.1.0/demo/python_demo/submit_job.py +9 -0
  24. labtasker-0.1.0/docker/mongodb/docker-entrypoint-wrapped.sh +40 -0
  25. labtasker-0.1.0/docker/mongodb/healthcheck.sh +14 -0
  26. labtasker-0.1.0/docker/mongodb/init.d/init-keyfile.sh +27 -0
  27. labtasker-0.1.0/docker/mongodb/post-init.d/init-mongo.sh +55 -0
  28. labtasker-0.1.0/docker-compose.yml +65 -0
  29. labtasker-0.1.0/docs/Makefile +51 -0
  30. labtasker-0.1.0/docs/docs/develop/database.md +92 -0
  31. labtasker-0.1.0/docs/docs/develop/development.md +74 -0
  32. labtasker-0.1.0/docs/docs/develop/documentation.md +41 -0
  33. labtasker-0.1.0/docs/docs/develop/restful-api.md +3 -0
  34. labtasker-0.1.0/docs/docs/guide/advanced.md +31 -0
  35. labtasker-0.1.0/docs/docs/guide/assets/casts/cli-plugin.cast +338 -0
  36. labtasker-0.1.0/docs/docs/guide/assets/casts/demo-basic.cast +1572 -0
  37. labtasker-0.1.0/docs/docs/guide/basic.md +92 -0
  38. labtasker-0.1.0/docs/docs/index.md +118 -0
  39. labtasker-0.1.0/docs/docs/install/deployment.md +80 -0
  40. labtasker-0.1.0/docs/docs/install/install.md +22 -0
  41. labtasker-0.1.0/docs/mkdocs-nav.yml +13 -0
  42. labtasker-0.1.0/docs/mkdocs.yml +104 -0
  43. labtasker-0.1.0/labtasker/__init__.py +7 -0
  44. labtasker-0.1.0/labtasker/__main__.py +6 -0
  45. labtasker-0.1.0/labtasker/api_models.py +205 -0
  46. labtasker-0.1.0/labtasker/client/__init__.py +0 -0
  47. labtasker-0.1.0/labtasker/client/cli/__init__.py +26 -0
  48. labtasker-0.1.0/labtasker/client/cli/cli.py +43 -0
  49. labtasker-0.1.0/labtasker/client/cli/config.py +80 -0
  50. labtasker-0.1.0/labtasker/client/cli/loop.py +131 -0
  51. labtasker-0.1.0/labtasker/client/cli/queue.py +148 -0
  52. labtasker-0.1.0/labtasker/client/cli/task.py +435 -0
  53. labtasker-0.1.0/labtasker/client/cli/worker.py +167 -0
  54. labtasker-0.1.0/labtasker/client/client_api.py +30 -0
  55. labtasker-0.1.0/labtasker/client/core/__init__.py +0 -0
  56. labtasker-0.1.0/labtasker/client/core/api.py +400 -0
  57. labtasker-0.1.0/labtasker/client/core/cli_utils.py +238 -0
  58. labtasker-0.1.0/labtasker/client/core/cmd_parser/LabCmd.g4 +14 -0
  59. labtasker-0.1.0/labtasker/client/core/cmd_parser/LabCmd.py +620 -0
  60. labtasker-0.1.0/labtasker/client/core/cmd_parser/LabCmdLexer.g4 +15 -0
  61. labtasker-0.1.0/labtasker/client/core/cmd_parser/LabCmdLexer.py +493 -0
  62. labtasker-0.1.0/labtasker/client/core/cmd_parser/LabCmdListener.py +54 -0
  63. labtasker-0.1.0/labtasker/client/core/cmd_parser/__init__.py +5 -0
  64. labtasker-0.1.0/labtasker/client/core/cmd_parser/parser.py +294 -0
  65. labtasker-0.1.0/labtasker/client/core/config.py +156 -0
  66. labtasker-0.1.0/labtasker/client/core/context.py +54 -0
  67. labtasker-0.1.0/labtasker/client/core/exceptions.py +55 -0
  68. labtasker-0.1.0/labtasker/client/core/heartbeat.py +103 -0
  69. labtasker-0.1.0/labtasker/client/core/job_runner.py +227 -0
  70. labtasker-0.1.0/labtasker/client/core/logging.py +91 -0
  71. labtasker-0.1.0/labtasker/client/core/paths.py +64 -0
  72. labtasker-0.1.0/labtasker/client/core/plugin_utils.py +72 -0
  73. labtasker-0.1.0/labtasker/client/templates/labtasker_root/.gitignore +4 -0
  74. labtasker-0.1.0/labtasker/client/templates/labtasker_root/client.toml +14 -0
  75. labtasker-0.1.0/labtasker/client/templates/labtasker_root/logs/.gitkeep +1 -0
  76. labtasker-0.1.0/labtasker/concurrent.py +11 -0
  77. labtasker-0.1.0/labtasker/constants.py +7 -0
  78. labtasker-0.1.0/labtasker/filtering.py +82 -0
  79. labtasker-0.1.0/labtasker/security.py +26 -0
  80. labtasker-0.1.0/labtasker/server/__init__.py +0 -0
  81. labtasker-0.1.0/labtasker/server/config.py +59 -0
  82. labtasker-0.1.0/labtasker/server/database.py +1018 -0
  83. labtasker-0.1.0/labtasker/server/db_utils.py +91 -0
  84. labtasker-0.1.0/labtasker/server/dependencies.py +39 -0
  85. labtasker-0.1.0/labtasker/server/endpoints.py +458 -0
  86. labtasker-0.1.0/labtasker/server/fsm.py +258 -0
  87. labtasker-0.1.0/labtasker/server/logging.py +44 -0
  88. labtasker-0.1.0/labtasker/server/run.py +21 -0
  89. labtasker-0.1.0/labtasker/utils.py +353 -0
  90. labtasker-0.1.0/labtasker.egg-info/SOURCES.txt +152 -0
  91. labtasker-0.1.0/plugins/labtasker_plugin_task_count/.gitignore +186 -0
  92. labtasker-0.1.0/plugins/labtasker_plugin_task_count/README.md +13 -0
  93. labtasker-0.1.0/plugins/labtasker_plugin_task_count/pyproject.toml +32 -0
  94. labtasker-0.1.0/plugins/labtasker_plugin_task_count/src/labtasker_plugin_task_count/__init__.py +0 -0
  95. labtasker-0.1.0/plugins/labtasker_plugin_task_count/src/labtasker_plugin_task_count/impl.py +13 -0
  96. labtasker-0.1.0/plugins/labtasker_plugin_task_count/src/labtasker_plugin_task_count/main.py +30 -0
  97. labtasker-0.1.0/pyproject.toml +99 -0
  98. labtasker-0.1.0/server.example.env +16 -0
  99. labtasker-0.1.0/setup.cfg +22 -0
  100. labtasker-0.1.0/tests/__init__.py +0 -0
  101. labtasker-0.1.0/tests/conftest.py +133 -0
  102. labtasker-0.1.0/tests/demo_editor_with_comment_and_diff.py +105 -0
  103. labtasker-0.1.0/tests/demo_pager_iterator.py +72 -0
  104. labtasker-0.1.0/tests/dummy_jobs/job_1.py +27 -0
  105. labtasker-0.1.0/tests/fixtures/__init__.py +0 -0
  106. labtasker-0.1.0/tests/fixtures/database/__init__.py +2 -0
  107. labtasker-0.1.0/tests/fixtures/database/mock.py +61 -0
  108. labtasker-0.1.0/tests/fixtures/database/real.py +56 -0
  109. labtasker-0.1.0/tests/fixtures/logging.py +11 -0
  110. labtasker-0.1.0/tests/fixtures/mock_datetime_now.py +38 -0
  111. labtasker-0.1.0/tests/fixtures/server/__init__.py +2 -0
  112. labtasker-0.1.0/tests/fixtures/server/async_app.py +16 -0
  113. labtasker-0.1.0/tests/fixtures/server/sync_app.py +13 -0
  114. labtasker-0.1.0/tests/test_cli_utils.py +33 -0
  115. labtasker-0.1.0/tests/test_client/__init__.py +0 -0
  116. labtasker-0.1.0/tests/test_client/conftest.py +54 -0
  117. labtasker-0.1.0/tests/test_client/test_cli/__init__.py +0 -0
  118. labtasker-0.1.0/tests/test_client/test_cli/conftest.py +119 -0
  119. labtasker-0.1.0/tests/test_client/test_cli/test_basic.py +15 -0
  120. labtasker-0.1.0/tests/test_client/test_cli/test_config.py +58 -0
  121. labtasker-0.1.0/tests/test_client/test_cli/test_loop.py +68 -0
  122. labtasker-0.1.0/tests/test_client/test_cli/test_queue.py +193 -0
  123. labtasker-0.1.0/tests/test_client/test_cli/test_task.py +390 -0
  124. labtasker-0.1.0/tests/test_client/test_cli/test_worker.py +179 -0
  125. labtasker-0.1.0/tests/test_client/test_core/__init__.py +0 -0
  126. labtasker-0.1.0/tests/test_client/test_core/test_heartbeat.py +72 -0
  127. labtasker-0.1.0/tests/test_client/test_core/test_job_runner.py +139 -0
  128. labtasker-0.1.0/tests/test_client/test_core/test_job_runner_timeout.py +130 -0
  129. labtasker-0.1.0/tests/test_client/test_core/test_logging.py +57 -0
  130. labtasker-0.1.0/tests/test_client/test_core/test_pager_iterator.py +98 -0
  131. labtasker-0.1.0/tests/test_database/__init__.py +0 -0
  132. labtasker-0.1.0/tests/test_database/conftest.py +64 -0
  133. labtasker-0.1.0/tests/test_database/test_benchmark_threadpool.py +310 -0
  134. labtasker-0.1.0/tests/test_database/test_database.py +1051 -0
  135. labtasker-0.1.0/tests/test_database/test_query_dict_to_mongo_filter.py +96 -0
  136. labtasker-0.1.0/tests/test_filtering/__init__.py +0 -0
  137. labtasker-0.1.0/tests/test_filtering/exception_utils.py +48 -0
  138. labtasker-0.1.0/tests/test_filtering/test_exception_filtering.py +67 -0
  139. labtasker-0.1.0/tests/test_fsm.py +142 -0
  140. labtasker-0.1.0/tests/test_mock_time.py +37 -0
  141. labtasker-0.1.0/tests/test_parser.py +102 -0
  142. labtasker-0.1.0/tests/test_security.py +16 -0
  143. labtasker-0.1.0/tests/test_server/__init__.py +0 -0
  144. labtasker-0.1.0/tests/test_server/conftest.py +31 -0
  145. labtasker-0.1.0/tests/test_server/test_get_verified_queue_dependency.py +73 -0
  146. labtasker-0.1.0/tests/test_server/test_server.py +722 -0
  147. labtasker-0.1.0/tests/test_server/test_server_async.py +111 -0
  148. labtasker-0.1.0/tests/test_server/test_server_async_ping.py +15 -0
  149. labtasker-0.1.0/tests/test_threadpool.py +39 -0
  150. labtasker-0.1.0/tests/test_utils/__init__.py +0 -0
  151. labtasker-0.1.0/tests/test_utils/test_arg_match.py +102 -0
  152. labtasker-0.1.0/tests/test_utils/test_keys_to_query_dict.py +77 -0
  153. labtasker-0.1.0/tests/test_utils/test_utils.py +265 -0
  154. labtasker-0.1.0/tox.ini +11 -0
@@ -0,0 +1,4 @@
1
+ [run]
2
+ omit =
3
+ # skip those auto-generated codes by antlr
4
+ labtasker/client/core/cmd_parser/LabCmd*
@@ -0,0 +1,12 @@
1
+ # exclude all,
2
+ **
3
+
4
+ # except
5
+ !pyproject.toml
6
+ !MANIFEST.in
7
+ !setup.cfg
8
+ !setup.py
9
+ !labtasker/
10
+
11
+ # also exclude run caches
12
+ **/__pycache__/
@@ -0,0 +1 @@
1
+ * text eol=lf
@@ -0,0 +1,46 @@
1
+ name: deploy-doc
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ tags:
7
+ - 'v*' # version number
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: write
12
+
13
+ jobs:
14
+ deploy:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: checkout
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: configure git credentials
23
+ run: |
24
+ git config user.name github-actions[bot]
25
+ git config user.email github-actions[bot]@users.noreply.github.com
26
+
27
+ - name: setup python environment
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: 3.11
31
+
32
+ - run: pwd
33
+ - run: ls -la
34
+ - run: pip install -e ".[doc]"
35
+
36
+ - name: deploy release doc
37
+ if: ${{ github.ref_type == 'tag' }}
38
+ run: |
39
+ cd docs
40
+ mike deploy --update-alias ${{ github.ref_name }} latest --push --message "Deploy release docs for ${{ github.ref_name }}"
41
+
42
+ - name: deploy dev doc
43
+ if: ${{ github.ref_type == 'branch' }}
44
+ run: |
45
+ cd docs
46
+ mike deploy dev --push
@@ -0,0 +1,34 @@
1
+ name: push-ghcr-latest
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+ packages: write
12
+ attestations: write
13
+ id-token: write
14
+
15
+ jobs:
16
+ push-store-image:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0
23
+
24
+ - name: Login to GitHub Container Registry
25
+ uses: docker/login-action@v3
26
+ with:
27
+ registry: ghcr.io
28
+ username: ${{github.actor}}
29
+ password: ${{secrets.GITHUB_TOKEN}}
30
+
31
+ - name: Build Inventory Image
32
+ run: |
33
+ docker build --tag ghcr.io/fkcptlst/labtasker-api:latest .
34
+ docker push ghcr.io/fkcptlst/labtasker-api:latest
@@ -0,0 +1,50 @@
1
+ name: release to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [ published ]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ release-build:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.13"
21
+
22
+ - name: Build release distributions
23
+ run: |
24
+ python -m pip install build
25
+ python -m build
26
+
27
+ - name: Upload distributions
28
+ uses: actions/upload-artifact@v4
29
+ with:
30
+ name: release-dists
31
+ path: dist/
32
+
33
+ pypi-publish:
34
+ name: upload release to PyPI
35
+ runs-on: ubuntu-latest
36
+ needs:
37
+ - release-build
38
+ environment: pypi
39
+ permissions:
40
+ # IMPORTANT: this permission is mandatory for Trusted Publishing
41
+ id-token: write
42
+ steps:
43
+ - name: Retrieve release distributions
44
+ uses: actions/download-artifact@v4
45
+ with:
46
+ name: release-dists
47
+ path: dist/
48
+
49
+ - name: Publish package distributions to PyPI
50
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,32 @@
1
+ name: test-doc
2
+ on:
3
+ pull_request:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ deploy:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: checkout
11
+ uses: actions/checkout@v4
12
+ with:
13
+ fetch-depth: 0
14
+
15
+ - name: configure git credentials
16
+ run: |
17
+ git config user.name github-actions[bot]
18
+ git config user.email github-actions[bot]@users.noreply.github.com
19
+
20
+ - name: setup python environment
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: 3.11
24
+
25
+ - run: pwd
26
+ - run: ls -la
27
+ - run: pip install -e ".[doc]"
28
+
29
+ - name: build dev doc
30
+ run: |
31
+ cd docs
32
+ mike deploy dev
@@ -0,0 +1,33 @@
1
+ name: unit-test-coverage
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: checkout
13
+ uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0
16
+
17
+ - name: Set up Python 3.10
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.10"
21
+
22
+ - name: Install Dependencies
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install ".[dev]"
26
+
27
+ - name: Test and Coverage
28
+ run: pytest -m "unit" --cov=labtasker --cov-report=term-missing --cov-report=xml
29
+
30
+ - name: Upload coverage reports to Codecov
31
+ uses: codecov/codecov-action@v5
32
+ with:
33
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,33 @@
1
+ name: unit-test-matrix
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ - dev
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: Install Dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ pip install ".[dev]"
31
+
32
+ - name: Run Unit Tests
33
+ run: pytest -m "unit"
@@ -0,0 +1,186 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/python
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python
3
+
4
+ # Antlr intermediate files
5
+ **/*.interp
6
+ **/*.tokens
7
+
8
+ tmp/
9
+
10
+ .idea/
11
+
12
+ ### Python ###
13
+ # Byte-compiled / optimized / DLL files
14
+ __pycache__/
15
+ *.py[cod]
16
+ *$py.class
17
+
18
+ # C extensions
19
+ *.so
20
+
21
+ # Distribution / packaging
22
+ .Python
23
+ build/
24
+ develop-eggs/
25
+ dist/
26
+ downloads/
27
+ eggs/
28
+ .eggs/
29
+ lib/
30
+ lib64/
31
+ parts/
32
+ sdist/
33
+ var/
34
+ wheels/
35
+ share/python-wheels/
36
+ *.egg-info/
37
+ .installed.cfg
38
+ *.egg
39
+ MANIFEST
40
+
41
+ # PyInstaller
42
+ # Usually these files are written by a python script from a template
43
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
44
+ *.manifest
45
+ *.spec
46
+
47
+ # Installer logs
48
+ pip-log.txt
49
+ pip-delete-this-directory.txt
50
+
51
+ # Unit test / coverage reports
52
+ htmlcov/
53
+ .tox/
54
+ .nox/
55
+ .coverage
56
+ .coverage.*
57
+ .cache
58
+ nosetests.xml
59
+ coverage.xml
60
+ *.cover
61
+ *.py,cover
62
+ .hypothesis/
63
+ .pytest_cache/
64
+ cover/
65
+
66
+ # Translations
67
+ *.mo
68
+ *.pot
69
+
70
+ # Django stuff:
71
+ *.log
72
+ local_settings.py
73
+ db.sqlite3
74
+ db.sqlite3-journal
75
+
76
+ # Flask stuff:
77
+ instance/
78
+ .webassets-cache
79
+
80
+ # Scrapy stuff:
81
+ .scrapy
82
+
83
+ # Sphinx documentation
84
+ docs/_build/
85
+
86
+ # PyBuilder
87
+ .pybuilder/
88
+ target/
89
+
90
+ # Jupyter Notebook
91
+ .ipynb_checkpoints
92
+
93
+ # IPython
94
+ profile_default/
95
+ ipython_config.py
96
+
97
+ # pyenv
98
+ # For a library or package, you might want to ignore these files since the code is
99
+ # intended to run in multiple environments; otherwise, check them in:
100
+ # .python-version
101
+
102
+ # pipenv
103
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
105
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
106
+ # install all needed dependencies.
107
+ #Pipfile.lock
108
+
109
+ # poetry
110
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114
+ #poetry.lock
115
+
116
+ # pdm
117
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118
+ #pdm.lock
119
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
120
+ # in version control.
121
+ # https://pdm.fming.dev/#use-with-ide
122
+ .pdm.toml
123
+
124
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
125
+ __pypackages__/
126
+
127
+ # Celery stuff
128
+ celerybeat-schedule
129
+ celerybeat.pid
130
+
131
+ # SageMath parsed files
132
+ *.sage.py
133
+
134
+ # Environments
135
+ *.env
136
+ .env
137
+ .venv
138
+ env/
139
+ venv/
140
+ ENV/
141
+ env.bak/
142
+ venv.bak/
143
+
144
+ # Spyder project settings
145
+ .spyderproject
146
+ .spyproject
147
+
148
+ # Rope project settings
149
+ .ropeproject
150
+
151
+ # mkdocs documentation
152
+ /site
153
+
154
+ # mypy
155
+ .mypy_cache/
156
+ .dmypy.json
157
+ dmypy.json
158
+
159
+ # Pyre type checker
160
+ .pyre/
161
+
162
+ # pytype static type analyzer
163
+ .pytype/
164
+
165
+ # Cython debug symbols
166
+ cython_debug/
167
+
168
+ # PyCharm
169
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
170
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
171
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
172
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
173
+ #.idea/
174
+
175
+ ### Python Patch ###
176
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
177
+ poetry.toml
178
+
179
+ # ruff
180
+ .ruff_cache/
181
+
182
+ # LSP config files
183
+ pyrightconfig.json
184
+
185
+ # End of https://www.toptal.com/developers/gitignore/api/python
186
+ .DS_Store
@@ -0,0 +1,41 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-added-large-files
9
+ exclude: ^docs/docs/assets/
10
+ - id: mixed-line-ending
11
+ args: [--fix=lf]
12
+
13
+ - repo: https://github.com/psf/black
14
+ rev: 24.8.0
15
+ hooks:
16
+ - id: black
17
+
18
+ - repo: https://github.com/pycqa/isort
19
+ rev: 5.13.2
20
+ hooks:
21
+ - id: isort
22
+
23
+ # - repo: https://github.com/pycqa/flake8
24
+ # rev: 6.0.0
25
+ # hooks:
26
+ # - id: flake8
27
+ # additional_dependencies: [
28
+ # 'flake8-docstrings',
29
+ # 'flake8-bugbear',
30
+ # 'flake8-comprehensions',
31
+ # 'flake8-simplify',
32
+ # ]
33
+
34
+ # - repo: https://github.com/pre-commit/mirrors-mypy
35
+ # rev: v1.3.0
36
+ # hooks:
37
+ # - id: mypy
38
+ # additional_dependencies:
39
+ # - types-requests
40
+ # args: [--ignore-missing-imports]
41
+ # exclude: ^tests/
@@ -0,0 +1,9 @@
1
+ [pytest]
2
+ minversion = 6.0
3
+ addopts = -ra -q -s -v --cov=labtasker
4
+ testpaths = tests
5
+ markers =
6
+ unit: marks tests as unit tests
7
+ integration: marks tests as integration tests
8
+ e2e: marks tests as end-to-end tests
9
+ asyncio_default_fixture_loop_scope=function
@@ -0,0 +1,6 @@
1
+ 3.8
2
+ 3.9
3
+ 3.10
4
+ 3.11
5
+ 3.12
6
+ 3.13
@@ -0,0 +1,22 @@
1
+ FROM python:3.13.1-slim-bullseye
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies and clean up in one layer
6
+ RUN apt-get update && apt-get install -y \
7
+ curl \
8
+ && rm -rf /var/lib/apt/lists/* \
9
+ && pip install --no-cache-dir pip --upgrade
10
+
11
+ # Copy project files first
12
+ COPY . .
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --no-cache-dir "."
16
+
17
+ # Health check
18
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
19
+ CMD curl -f http://localhost:${API_PORT:-8080}/health || exit 1
20
+
21
+ # Run the application
22
+ CMD ["python", "-m", "labtasker.server.run"]
@@ -0,0 +1,27 @@
1
+ graft labtasker
2
+ graft tests
3
+
4
+ include tox.ini
5
+
6
+ exclude build/*
7
+ exclude dist/*
8
+ exclude labtasker.egg-info/*
9
+
10
+ exclude .venv/*
11
+ exclude .tox/*
12
+ exclude .benchmarks/*
13
+
14
+ exclude Makefile
15
+ exclude coverage.xml
16
+
17
+ exclude poetry.lock
18
+ exclude poetry.toml
19
+
20
+ exclude .vscode/*
21
+ exclude .github/*
22
+
23
+ exclude plugins/*
24
+
25
+ global-exclude *~ *.py[cod] *.so *.coverage
26
+
27
+ prune __pycache__
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.2
2
+ Name: labtasker
3
+ Version: 0.1.0
4
+ Summary: A task queue system for lab experiments
5
+ Author-email: Your Name <your.email@example.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/fkcptlst/labtasker
8
+ Project-URL: Documentation, https://fkcptlst.github.io/labtasker
9
+ Project-URL: Repository, https://github.com/fkcptlst/labtasker.git
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: <4.0,>=3.8.1
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: python-dotenv<2.0.0,>=1.0.1
23
+ Requires-Dist: pymongo<5.0.0,>=4.0.0
24
+ Requires-Dist: fastapi<0.116.0,>=0.115.0
25
+ Requires-Dist: uvicorn[standard]<0.35.0,>=0.15.0
26
+ Requires-Dist: click<9.0.0,>=8.1.0
27
+ Requires-Dist: passlib<2.0.0,>=1.7.0
28
+ Requires-Dist: antlr4-python3-runtime<5.0.0,>=4.13.0
29
+ Requires-Dist: pydantic-settings<3.0.0,>=2.8.0
30
+ Requires-Dist: httpx[socks]<0.29.0,>=0.28.0
31
+ Requires-Dist: typer<0.16.0,>=0.15.0
32
+ Requires-Dist: loguru<0.8.0,>=0.7.0
33
+ Requires-Dist: ruamel-yaml<0.19.0,>=0.18.10
34
+ Requires-Dist: pyyaml<7.0.0,>=6.0.0
35
+ Requires-Dist: tomlkit<0.14.0,>=0.13.2
36
+ Requires-Dist: importlib-metadata<9.0.0,>=8.5.0
37
+ Requires-Dist: packaging<25.0,>=24.2
38
+ Provides-Extra: dev
39
+ Requires-Dist: pytest<9.0.0,>=8.0.0; extra == "dev"
40
+ Requires-Dist: pytest-cov<7.0.0,>=5.0.0; extra == "dev"
41
+ Requires-Dist: mongomock<4.4.0,>=4.3.0; extra == "dev"
42
+ Requires-Dist: black<26.0.0,>=24.0.0; extra == "dev"
43
+ Requires-Dist: isort<7.0.0,>=5.13.0; extra == "dev"
44
+ Requires-Dist: mypy<2.0.0,>=1.14.0; extra == "dev"
45
+ Requires-Dist: flake8<8.0.0,>=7.0.0; extra == "dev"
46
+ Requires-Dist: pre-commit<5.0.0,>=3.0.0; extra == "dev"
47
+ Requires-Dist: freezegun<2.0.0,>=1.5.0; extra == "dev"
48
+ Requires-Dist: pytest-docker<4.0.0,>=3.0.0; extra == "dev"
49
+ Requires-Dist: pytest-benchmark<6.0.0,>=4.0.0; extra == "dev"
50
+ Requires-Dist: pytest-asyncio<0.26.0,>=0.24.0; extra == "dev"
51
+ Requires-Dist: asgi-lifespan<3.0.0,>=2.1.0; extra == "dev"
52
+ Requires-Dist: tox<4.25.0,>=4.24.0; extra == "dev"
53
+ Requires-Dist: pytest-dependency<0.7.0,>=0.6.0; extra == "dev"
54
+ Provides-Extra: doc
55
+ Requires-Dist: mkdocs-material<9.7.0,>=9.6.5; extra == "doc"
56
+ Requires-Dist: mike<2.2.0,>=2.1.3; extra == "doc"
57
+
58
+ # Labtasker
59
+
60
+ ![unit-test-matrix](https://github.com/fkcptlst/labtasker/actions/workflows/unit-test-matrix.yml/badge.svg)
61
+ [![codecov](https://codecov.io/gh/fkcptlst/labtasker/graph/badge.svg?token=KQFBV3QRPY)](https://codecov.io/gh/fkcptlst/labtasker)
62
+ ![Python version](https://img.shields.io/badge/Python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20|%203.13-blue)
63
+
64
+ A easy-to-use task management tool for lab experiments.
65
+
66
+ ## Features
67
+
68
+ - Easy configuration and setup.
69
+ - Versatile and minimalistic design.
70
+ - Supports both CLI and Python API for task scheduling.
71
+ - Customizable plugin system.
72
+
73
+ ## Installation
74
+
75
+ To install client tools:
76
+
77
+ ```bash
78
+ pip install labtasker
79
+ ```
80
+
81
+ or
82
+
83
+ ```bash
84
+ pip install git+https://github.com/fkcptlst/labtasker.git
85
+ ```
86
+
87
+ ## Documentation
88
+
89
+ For extra information on demo, tutorial, deployment, usage, please refer to the [documentation](https://fkcptlst.github.io/labtasker/).
@@ -0,0 +1 @@
1
+ # Privacy Policy
@@ -0,0 +1,32 @@
1
+ # Labtasker
2
+
3
+ ![unit-test-matrix](https://github.com/fkcptlst/labtasker/actions/workflows/unit-test-matrix.yml/badge.svg)
4
+ [![codecov](https://codecov.io/gh/fkcptlst/labtasker/graph/badge.svg?token=KQFBV3QRPY)](https://codecov.io/gh/fkcptlst/labtasker)
5
+ ![Python version](https://img.shields.io/badge/Python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20|%203.13-blue)
6
+
7
+ A easy-to-use task management tool for lab experiments.
8
+
9
+ ## Features
10
+
11
+ - Easy configuration and setup.
12
+ - Versatile and minimalistic design.
13
+ - Supports both CLI and Python API for task scheduling.
14
+ - Customizable plugin system.
15
+
16
+ ## Installation
17
+
18
+ To install client tools:
19
+
20
+ ```bash
21
+ pip install labtasker
22
+ ```
23
+
24
+ or
25
+
26
+ ```bash
27
+ pip install git+https://github.com/fkcptlst/labtasker.git
28
+ ```
29
+
30
+ ## Documentation
31
+
32
+ For extra information on demo, tutorial, deployment, usage, please refer to the [documentation](https://fkcptlst.github.io/labtasker/).