rms-cloud-tasks 0.0.1__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.
- rms_cloud_tasks-0.0.1/.coveragerc +5 -0
- rms_cloud_tasks-0.0.1/.cursor/rules/python-rules.mdc +16 -0
- rms_cloud_tasks-0.0.1/.flake8 +7 -0
- rms_cloud_tasks-0.0.1/.github/workflows/publish_to_pypi.yml +33 -0
- rms_cloud_tasks-0.0.1/.github/workflows/publish_to_test_pypi.yml +35 -0
- rms_cloud_tasks-0.0.1/.github/workflows/run-tests.yml +79 -0
- rms_cloud_tasks-0.0.1/.gitignore +161 -0
- rms_cloud_tasks-0.0.1/.readthedocs.yaml +32 -0
- rms_cloud_tasks-0.0.1/.vscode/launch.json +16 -0
- rms_cloud_tasks-0.0.1/.vscode/settings.json +14 -0
- rms_cloud_tasks-0.0.1/CONTRIBUTING.md +112 -0
- rms_cloud_tasks-0.0.1/DESIGN.md +85 -0
- rms_cloud_tasks-0.0.1/LICENSE +201 -0
- rms_cloud_tasks-0.0.1/PKG-INFO +221 -0
- rms_cloud_tasks-0.0.1/README.md +174 -0
- rms_cloud_tasks-0.0.1/docs/Makefile +20 -0
- rms_cloud_tasks-0.0.1/docs/cli.rst +1071 -0
- rms_cloud_tasks-0.0.1/docs/conf.py +71 -0
- rms_cloud_tasks-0.0.1/docs/config.rst +479 -0
- rms_cloud_tasks-0.0.1/docs/example_parallel_addition.rst +286 -0
- rms_cloud_tasks-0.0.1/docs/examples.rst +10 -0
- rms_cloud_tasks-0.0.1/docs/index.rst +27 -0
- rms_cloud_tasks-0.0.1/docs/make.bat +35 -0
- rms_cloud_tasks-0.0.1/docs/provider_aws.rst +18 -0
- rms_cloud_tasks-0.0.1/docs/provider_gcp.rst +525 -0
- rms_cloud_tasks-0.0.1/docs/providers.rst +23 -0
- rms_cloud_tasks-0.0.1/docs/quickstart.rst +301 -0
- rms_cloud_tasks-0.0.1/docs/startup.sh +0 -0
- rms_cloud_tasks-0.0.1/docs/success.rst +51 -0
- rms_cloud_tasks-0.0.1/docs/worker.rst +278 -0
- rms_cloud_tasks-0.0.1/docs/worker_api.rst +12 -0
- rms_cloud_tasks-0.0.1/examples/parallel_addition/addition_tasks.json +70002 -0
- rms_cloud_tasks-0.0.1/examples/parallel_addition/config.yml +18 -0
- rms_cloud_tasks-0.0.1/examples/parallel_addition/config_exceptions.yml +21 -0
- rms_cloud_tasks-0.0.1/examples/parallel_addition/generate_addition_tasks.py +24 -0
- rms_cloud_tasks-0.0.1/examples/parallel_addition/requirements.txt +1 -0
- rms_cloud_tasks-0.0.1/examples/parallel_addition/worker_addition.py +79 -0
- rms_cloud_tasks-0.0.1/examples/parallel_addition/worker_addition_exceptions.py +91 -0
- rms_cloud_tasks-0.0.1/pyproject.toml +84 -0
- rms_cloud_tasks-0.0.1/pytest.ini +7 -0
- rms_cloud_tasks-0.0.1/requirements.txt +55 -0
- rms_cloud_tasks-0.0.1/setup.cfg +7 -0
- rms_cloud_tasks-0.0.1/src/_version.py +21 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/__init__.py +0 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/cli.py +2166 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/common/__init__.py +0 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/common/base.py +20 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/common/config.py +577 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/common/logging_config.py +80 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/instance_manager/__init__.py +47 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/instance_manager/aws.py +1133 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/instance_manager/azure.py +1030 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/instance_manager/gcp.py +2060 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/instance_manager/instance_manager.py +403 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/instance_manager/orchestrator.py +836 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/py.typed +0 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/queue_manager/__init__.py +80 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/queue_manager/aws.py +438 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/queue_manager/azure.py +288 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/queue_manager/gcp.py +746 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/queue_manager/queue_manager.py +79 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/worker/__init__.py +15 -0
- rms_cloud_tasks-0.0.1/src/cloud_tasks/worker/worker.py +1459 -0
- rms_cloud_tasks-0.0.1/src/rms_cloud_tasks.egg-info/PKG-INFO +221 -0
- rms_cloud_tasks-0.0.1/src/rms_cloud_tasks.egg-info/SOURCES.txt +97 -0
- rms_cloud_tasks-0.0.1/src/rms_cloud_tasks.egg-info/dependency_links.txt +1 -0
- rms_cloud_tasks-0.0.1/src/rms_cloud_tasks.egg-info/entry_points.txt +2 -0
- rms_cloud_tasks-0.0.1/src/rms_cloud_tasks.egg-info/requires.txt +17 -0
- rms_cloud_tasks-0.0.1/src/rms_cloud_tasks.egg-info/top_level.txt +2 -0
- rms_cloud_tasks-0.0.1/startup_script_file.sh +2 -0
- rms_cloud_tasks-0.0.1/tests/__init__.py +0 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/common/__init__.py +0 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/common/test_config.py +883 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/common/test_logging_config.py +113 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/__init__.py +0 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/__init__.py +0 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/conftest.py +584 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/test_gcp_images.py +219 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/test_gcp_instance_ops.py +1025 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/test_gcp_instance_types.py +268 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/test_gcp_optimal.py +380 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/test_gcp_pricing.py +1681 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/gcp/test_gcp_region_zone.py +258 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/test_init.py +89 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/test_instance_manager.py +360 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/instance_manager/test_orchestrator.py +230 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/queue_manager/__init__.py +0 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/queue_manager/test_aws.py +708 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/queue_manager/test_gcp.py +997 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/queue_manager/test_init.py +114 -0
- rms_cloud_tasks-0.0.1/tests/cloud_tasks/worker/test_worker.py +2084 -0
- rms_cloud_tasks-0.0.1/tests/conftest.py +66 -0
- rms_cloud_tasks-0.0.1/tests/manual/run_cli_config.yml +17 -0
- rms_cloud_tasks-0.0.1/tests/manual/run_cli_image_tests.sh +32 -0
- rms_cloud_tasks-0.0.1/tests/manual/run_cli_inst_type_tests.sh +82 -0
- rms_cloud_tasks-0.0.1/tests/manual/run_cli_queue_tests.sh +54 -0
- rms_cloud_tasks-0.0.1/tests/manual/run_cli_region_tests.sh +32 -0
- rms_cloud_tasks-0.0.1/tests/manual/run_cli_tasks.json +82 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: General Python rules
|
|
3
|
+
globs:
|
|
4
|
+
---
|
|
5
|
+
You are an expert systems-level Python programmer. All of the code that you write is carefully crafted for readability, ease of understanding, and ease of debugging.
|
|
6
|
+
|
|
7
|
+
These rules must be followed:
|
|
8
|
+
- All function and method definitions must use appropriate type annotations.
|
|
9
|
+
- All classes, methods, and functions must have docstrings.
|
|
10
|
+
- All docstrings must follow PEP257 and be in Google style. Use the word "Parameters" instead of "Arguments". If any docstrings are in a different format, convert them.
|
|
11
|
+
- Liberally use comments to explain the logic behind the code if it is not self-explanatory.
|
|
12
|
+
- Write all tests in pytest format. If any tests are in unittest format, convert them to pytest.
|
|
13
|
+
- Whenever making any modifications, also update or create new tests and update all documentation including docstrings and the README file.
|
|
14
|
+
- Never use mocks when writing the main code unless explicitly told to. It is ok to use mocks for tests.
|
|
15
|
+
|
|
16
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
run-name: Publish to PyPI triggered by ${{ github.ref_type }} ${{ github.ref_name }}
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
upload_pypi:
|
|
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.12
|
|
18
|
+
uses: actions/setup-python@v4
|
|
19
|
+
with:
|
|
20
|
+
python-version: 3.12
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install -r requirements.txt
|
|
25
|
+
|
|
26
|
+
- name: Build
|
|
27
|
+
run: |
|
|
28
|
+
python3 -m pip install --upgrade build && python3 -m build
|
|
29
|
+
|
|
30
|
+
- name: Publish package
|
|
31
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
32
|
+
with:
|
|
33
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Publish to Test PyPI
|
|
2
|
+
run-name: Publish to Test PyPI triggered by ${{ github.ref_type }} ${{ github.ref_name }}
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
upload_pypi:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Checkout
|
|
12
|
+
uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0
|
|
15
|
+
|
|
16
|
+
- name: Set up Python 3.12
|
|
17
|
+
uses: actions/setup-python@v4
|
|
18
|
+
with:
|
|
19
|
+
python-version: 3.12
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install -r requirements.txt
|
|
24
|
+
|
|
25
|
+
- name: Build
|
|
26
|
+
run: |
|
|
27
|
+
python3 -m pip install --upgrade build && python3 -m build
|
|
28
|
+
|
|
29
|
+
- name: Publish package
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
31
|
+
with:
|
|
32
|
+
user: __token__
|
|
33
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
34
|
+
repository-url: https://test.pypi.org/legacy/
|
|
35
|
+
verify-metadata: false
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Run Tests
|
|
2
|
+
run-name: Run Tests triggered by ${{ github.ref_type }} ${{ github.ref_name }} or ${{ github.triggering_actor }}
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
schedule:
|
|
11
|
+
- cron: "21 11 * * 0"
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
flake8:
|
|
15
|
+
name: Lint cloud_tasks
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
22
|
+
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install -r requirements.txt
|
|
31
|
+
|
|
32
|
+
- name: Flake8
|
|
33
|
+
run: |
|
|
34
|
+
flake8 src tests
|
|
35
|
+
|
|
36
|
+
# - name: Mypy
|
|
37
|
+
# run: |
|
|
38
|
+
# mypy src tests
|
|
39
|
+
|
|
40
|
+
test:
|
|
41
|
+
name: Test cloud_tasks
|
|
42
|
+
runs-on: ${{ matrix.os }}
|
|
43
|
+
strategy:
|
|
44
|
+
matrix:
|
|
45
|
+
os: [ubuntu-latest]
|
|
46
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
47
|
+
fail-fast: false
|
|
48
|
+
permissions:
|
|
49
|
+
contents: read
|
|
50
|
+
id-token: write
|
|
51
|
+
steps:
|
|
52
|
+
- name: Checkout
|
|
53
|
+
uses: actions/checkout@v4
|
|
54
|
+
with:
|
|
55
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
56
|
+
|
|
57
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
58
|
+
uses: actions/setup-python@v4
|
|
59
|
+
with:
|
|
60
|
+
python-version: ${{ matrix.python-version }}
|
|
61
|
+
|
|
62
|
+
- name: Install dependencies
|
|
63
|
+
run: |
|
|
64
|
+
python -m pip install -r requirements.txt
|
|
65
|
+
|
|
66
|
+
- name: Test with coverage
|
|
67
|
+
run: |
|
|
68
|
+
pytest --cov
|
|
69
|
+
|
|
70
|
+
- name: Print coverage report
|
|
71
|
+
run: |
|
|
72
|
+
coverage report -m
|
|
73
|
+
|
|
74
|
+
- name: Upload coverage report to codecov
|
|
75
|
+
uses: codecov/codecov-action@v5
|
|
76
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
|
|
77
|
+
with:
|
|
78
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
79
|
+
verbose: true
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
**/_version.py
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# poetry
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
103
|
+
#poetry.lock
|
|
104
|
+
|
|
105
|
+
# pdm
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
107
|
+
#pdm.lock
|
|
108
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
109
|
+
# in version control.
|
|
110
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
111
|
+
.pdm.toml
|
|
112
|
+
|
|
113
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
114
|
+
__pypackages__/
|
|
115
|
+
|
|
116
|
+
# Celery stuff
|
|
117
|
+
celerybeat-schedule
|
|
118
|
+
celerybeat.pid
|
|
119
|
+
|
|
120
|
+
# SageMath parsed files
|
|
121
|
+
*.sage.py
|
|
122
|
+
|
|
123
|
+
# Environments
|
|
124
|
+
.env
|
|
125
|
+
.venv
|
|
126
|
+
env/
|
|
127
|
+
*venv*/
|
|
128
|
+
ENV/
|
|
129
|
+
env.bak/
|
|
130
|
+
venv.bak/
|
|
131
|
+
|
|
132
|
+
# Spyder project settings
|
|
133
|
+
.spyderproject
|
|
134
|
+
.spyproject
|
|
135
|
+
|
|
136
|
+
# Rope project settings
|
|
137
|
+
.ropeproject
|
|
138
|
+
|
|
139
|
+
# mkdocs documentation
|
|
140
|
+
/site
|
|
141
|
+
|
|
142
|
+
# mypy
|
|
143
|
+
.mypy_cache/
|
|
144
|
+
.dmypy.json
|
|
145
|
+
dmypy.json
|
|
146
|
+
|
|
147
|
+
# Pyre type checker
|
|
148
|
+
.pyre/
|
|
149
|
+
|
|
150
|
+
# pytype static type analyzer
|
|
151
|
+
.pytype/
|
|
152
|
+
|
|
153
|
+
# Cython debug symbols
|
|
154
|
+
cython_debug/
|
|
155
|
+
|
|
156
|
+
# PyCharm
|
|
157
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
158
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
159
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
160
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
161
|
+
#.idea/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the OS, Python version and other tools you might need
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-22.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.12"
|
|
13
|
+
# You can also specify other tool versions:
|
|
14
|
+
# nodejs: "19"
|
|
15
|
+
# rust: "1.64"
|
|
16
|
+
# golang: "1.19"
|
|
17
|
+
|
|
18
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
19
|
+
sphinx:
|
|
20
|
+
configuration: docs/conf.py
|
|
21
|
+
|
|
22
|
+
# Optionally build your docs in additional formats such as PDF and ePub
|
|
23
|
+
# formats:
|
|
24
|
+
# - pdf
|
|
25
|
+
# - epub
|
|
26
|
+
|
|
27
|
+
# Optional but recommended, declare the Python requirements required
|
|
28
|
+
# to build your documentation
|
|
29
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
30
|
+
python:
|
|
31
|
+
install:
|
|
32
|
+
- requirements: requirements.txt
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Python Debugger: Current File with Arguments",
|
|
9
|
+
"type": "debugpy",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"program": "${file}",
|
|
12
|
+
"console": "integratedTerminal",
|
|
13
|
+
"args": "${command:pickArgs}"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"[python]": {
|
|
3
|
+
"editor.defaultFormatter": "ms-python.black-formatter",
|
|
4
|
+
"editor.formatOnSave": true
|
|
5
|
+
},
|
|
6
|
+
"python.analysis.diagnosticSeverityOverrides": {
|
|
7
|
+
"reportInvalidTypeForm": "none"
|
|
8
|
+
},
|
|
9
|
+
"python.testing.pytestArgs": [
|
|
10
|
+
"."
|
|
11
|
+
],
|
|
12
|
+
"python.testing.unittestEnabled": false,
|
|
13
|
+
"python.testing.pytestEnabled": true
|
|
14
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Information for Potential Contributors
|
|
2
|
+
|
|
3
|
+
First off, thanks for taking the time to contribute!
|
|
4
|
+
|
|
5
|
+
This software is maintained by the [Ring-Moon Systems Node](https://pds-rings.seti.org) of NASA's [Planetary Data System](https://pds.nasa.gov). All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them; please read the relevant section before making your contribution.
|
|
6
|
+
|
|
7
|
+
> If you like the project, but just don't have time to contribute, there are other easy ways to support the project and show your appreciation!
|
|
8
|
+
> - Star the project on GitHub
|
|
9
|
+
> - Post about it on social media
|
|
10
|
+
> - Refer to this project in your project's README
|
|
11
|
+
> - Mention the project at conferences and workshops and tell your friends/colleagues
|
|
12
|
+
> - Cite the project in your papers and posters
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Table of Contents
|
|
16
|
+
|
|
17
|
+
- [Code of Conduct](#code-of-conduct)
|
|
18
|
+
- [I Have a Question](#i-have-a-question)
|
|
19
|
+
- [I Want to Report a Bug](#i-want-to-report-a-bug)
|
|
20
|
+
- [I Want to Suggest an Enhancement](#i-want-to-suggest-an-enhancement)
|
|
21
|
+
- [I Want To Contribute Code](#i-want-to-contribute-code)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Code of Conduct
|
|
25
|
+
|
|
26
|
+
This project and everyone participating in it are governed by the
|
|
27
|
+
[Code of Conduct](CODE_OF_CONDUCT.md).
|
|
28
|
+
By participating, you are expected to uphold this code. Please report unacceptable behavior
|
|
29
|
+
to <matt@seti.org>.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## I Have a Question
|
|
33
|
+
|
|
34
|
+
> Please read the available documentation!
|
|
35
|
+
|
|
36
|
+
Before asking a question, you can search for existing [issues](https://github.com/SETI/rms-cloud-tasks/issues) that might help you. If you find a suitable issue and still need clarification, you can write your question in that issue.
|
|
37
|
+
|
|
38
|
+
If you can't find an appropriate issue and still want to ask a question, we recommend the following:
|
|
39
|
+
|
|
40
|
+
- Open an [issue](https://github.com/SETI/rms-cloud-tasks/issues/new).
|
|
41
|
+
- Provide as much context and detail as you can.
|
|
42
|
+
- Provide project and platform versions (operating system, Python version, etc.), depending on what seems relevant.
|
|
43
|
+
|
|
44
|
+
We will try to answer your question as soon as possible.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## I Want to Report a Bug
|
|
48
|
+
|
|
49
|
+
### Before Submitting a Bug Report
|
|
50
|
+
|
|
51
|
+
A good bug report shouldn't leave others needing to chase you for more information. Therefore, we ask you to investigate carefully and collect all appropriate information in advance.
|
|
52
|
+
|
|
53
|
+
- Make sure that you are using the latest version of this software and its supporting packages.
|
|
54
|
+
- Make sure that you have read the documentation.
|
|
55
|
+
- Determine that your bug really is a bug and not an error in your code or a misunderstanding in how to use our software.
|
|
56
|
+
- To see if other users have experienced (and potentially solved) the same issue you're having, check if there is an existing issue for your bug or error in the [bug tracker](https://github.com/SETI/rms-cloud-tasks/issues).
|
|
57
|
+
- Collect information about the bug:
|
|
58
|
+
- Stack trace (Traceback)
|
|
59
|
+
- OS and version (Windows/Linux/macOS), processor (x86/ARM/M1), Python version
|
|
60
|
+
- Detailed information on how to reproduce the bug, including function parameters, command line arguments, and input given/output received.
|
|
61
|
+
|
|
62
|
+
### How Do I Submit a Good Bug Report?
|
|
63
|
+
|
|
64
|
+
> You must never report security-related issues, vulnerabilities, or bugs that include sensitive information to the issue tracker or elsewhere in public. Instead, sensitive bugs must be sent by email to <matt@seti.org>.
|
|
65
|
+
|
|
66
|
+
We use GitHub Issues to track bugs and errors. If you run into an issue with the project:
|
|
67
|
+
|
|
68
|
+
- Open an [issue](https://github.com/SETI/rms-cloud-tasks/issues/new) with a **clear and descriptive title**. Please label the issue as `A-Bug` with no other labels.
|
|
69
|
+
- Explain the **behavior you would expect** and the **behavior observed**.
|
|
70
|
+
- Provide as much context as possible and describe the **detailed steps** that someone can follow to reproduce the problem. This usually includes providing your code; for a good bug report you should isolate the problem and create a reduced test case.
|
|
71
|
+
- Provide other information collected in the previous section, such as the operating system and language version.
|
|
72
|
+
|
|
73
|
+
Once it's filed:
|
|
74
|
+
|
|
75
|
+
- The project team will label the issue accordingly.
|
|
76
|
+
- A team member will try to reproduce the issue with your provided steps. If there are no steps given and no obvious way to reproduce the issue, the team will ask you for clarification.
|
|
77
|
+
- If the team is able to reproduce the issue, it will be appropriately labeled and either assigned to a team member to fix, or left unassigned to be [implemented by someone else](#i-want-to-contribute-code).
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## I Want to Suggest an Enhancement
|
|
81
|
+
|
|
82
|
+
This section guides you through submitting an enhancement, **including completely new features and minor improvements to existing functionality**.
|
|
83
|
+
|
|
84
|
+
### Before Submitting an Enhancement
|
|
85
|
+
|
|
86
|
+
- Make sure that you are using the latest version of this software and its supporting packages.
|
|
87
|
+
- Make sure that you have read the documentation to see if the desired functionality is already provided.
|
|
88
|
+
- Perform a [search](https://github.com/SETI/rms-cloud-tasks/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
|
89
|
+
- Find out whether your idea fits within the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
|
90
|
+
|
|
91
|
+
### How Do I Submit a Good Enhancement Suggestion?
|
|
92
|
+
|
|
93
|
+
We use GitHub Issues to track enhancement requests. If you want to suggest an enhancement:
|
|
94
|
+
|
|
95
|
+
- Open an [issue](https://github.com/SETI/rms-cloud-tasks/issues/new) with a **clear and descriptive title**. Please label the issue as `A-Enhancement` with no other labels.
|
|
96
|
+
- Provide a **detailed** description of the suggested enhancement.
|
|
97
|
+
- **Explain why this enhancement would be useful** to most users.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## I Want To Contribute Code
|
|
101
|
+
|
|
102
|
+
> ### Legal Notice
|
|
103
|
+
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content, and that the content you contribute may be provided under the project license.
|
|
104
|
+
|
|
105
|
+
We welcome all code contributions, including bug fixes, new features, and improvements to documentation.
|
|
106
|
+
|
|
107
|
+
- All suggested changes must be submitted using GitHub's "Pull Request" functionality.
|
|
108
|
+
- All code changes must include appropriate new or updated tests to verify the changes made.
|
|
109
|
+
- Existing documentation, including function- and file-level docstrings, must be updated as necessary, and new features fully described.
|
|
110
|
+
- Code style must conform to that of the existing code; for Python this is generally a variant of PEP8 and PEP257.
|
|
111
|
+
|
|
112
|
+
All submissions will be reviewed in detail by a project team member and changes may be suggested. Once the reviewer approves the changes, they will be merged into the main project branch and made a permanent part of the software. Your efforts to improve the software are greatly appreciated!
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Multi-Cloud Task Processing System Design Document
|
|
2
|
+
|
|
3
|
+
## System Overview
|
|
4
|
+
|
|
5
|
+
A scalable, multi-cloud task processing system that distributes independent tasks across compute instances, optimizing for cost and reliability with minimal overhead.
|
|
6
|
+
|
|
7
|
+
## Core Components
|
|
8
|
+
|
|
9
|
+
### 1. Task Queue Manager
|
|
10
|
+
- Uses native queue services (AWS SQS, GCP Pub/Sub, Azure Service Bus)
|
|
11
|
+
- Handles visibility timeout/locking to prevent duplicate processing
|
|
12
|
+
- Automatically requeues failed tasks
|
|
13
|
+
|
|
14
|
+
### 2. Instance Orchestrator
|
|
15
|
+
- Monitors queue depth
|
|
16
|
+
- Provisions instances based on workload
|
|
17
|
+
- Terminates instances when no longer needed
|
|
18
|
+
- Selects optimal instance types based on cost
|
|
19
|
+
|
|
20
|
+
### 3. Worker Module
|
|
21
|
+
- Downloads processing code from GitHub on startup
|
|
22
|
+
- Polls for available tasks
|
|
23
|
+
- Processes task input (JSON)
|
|
24
|
+
- Handles graceful exit for spot instances
|
|
25
|
+
|
|
26
|
+
## Architectural Decisions
|
|
27
|
+
|
|
28
|
+
### Queue Management
|
|
29
|
+
- **Task Visibility**: Use queue-native visibility timeout mechanisms to "lock" tasks during processing
|
|
30
|
+
- **Completion Handling**: Workers delete/acknowledge tasks only after successful processing
|
|
31
|
+
- **Failure Handling**: Failed tasks automatically return to queue after visibility timeout
|
|
32
|
+
|
|
33
|
+
### Instance Management
|
|
34
|
+
- **Instance Selection**: System will analyze requirements (CPU, memory, disk) and select the lowest-cost instance type that meets requirements
|
|
35
|
+
- **Scaling Logic**: Scale up when queue depth exceeds threshold, scale down when queue depletes
|
|
36
|
+
- **Spot Instance Handling**: Implement handlers for spot termination notices to exit gracefully
|
|
37
|
+
|
|
38
|
+
### Worker Implementation
|
|
39
|
+
- **Initialization**: Pull worker code from GitHub on startup
|
|
40
|
+
- **Processing Loop**: Poll queue → Process → Mark complete → Repeat
|
|
41
|
+
- **Termination**: Worker self-terminates when queue is empty for a specified duration
|
|
42
|
+
- **Spot Instance Awareness**: Periodic checks for imminent termination
|
|
43
|
+
|
|
44
|
+
## Implementation Considerations
|
|
45
|
+
|
|
46
|
+
### Platform Abstraction
|
|
47
|
+
- Implement thin abstraction layer over cloud provider APIs
|
|
48
|
+
- Standardize instance provisioning/termination interfaces
|
|
49
|
+
- Standardize queue operations across providers
|
|
50
|
+
|
|
51
|
+
### Cost Optimization
|
|
52
|
+
- System will calculate and display estimated costs before execution
|
|
53
|
+
- Only use the specified maximum number of instances
|
|
54
|
+
- Terminate instances as soon as tasks complete
|
|
55
|
+
|
|
56
|
+
### Deployment Flow
|
|
57
|
+
1. User configures task inputs and execution parameters
|
|
58
|
+
2. System initializes queue with all task inputs
|
|
59
|
+
3. Orchestrator provisions initial instances
|
|
60
|
+
4. Workers process tasks until queue is empty
|
|
61
|
+
5. Instances self-terminate when no work remains
|
|
62
|
+
|
|
63
|
+
## Operational Considerations
|
|
64
|
+
|
|
65
|
+
### Monitoring
|
|
66
|
+
- Implement basic job progress tracking (tasks queued/completed)
|
|
67
|
+
- Expose logs from worker instances
|
|
68
|
+
- Track instance lifecycle events
|
|
69
|
+
|
|
70
|
+
### Security
|
|
71
|
+
- Use user-provided credentials for all cloud operations
|
|
72
|
+
- Store credentials securely during execution
|
|
73
|
+
|
|
74
|
+
### Error Handling
|
|
75
|
+
- Gracefully handle cloud API failures
|
|
76
|
+
- Report batch-level errors to user
|
|
77
|
+
|
|
78
|
+
## Next Steps for Implementation
|
|
79
|
+
|
|
80
|
+
1. Define cloud provider abstraction interfaces
|
|
81
|
+
2. Implement queue adapters for each platform
|
|
82
|
+
3. Develop instance selection algorithm
|
|
83
|
+
4. Create worker initialization and processing logic
|
|
84
|
+
5. Build orchestration controller
|
|
85
|
+
6. Implement basic monitoring and reporting
|