skyrun 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 (78) hide show
  1. skyrun-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +28 -0
  2. skyrun-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +16 -0
  3. skyrun-0.1.0/.github/dependabot.yml +10 -0
  4. skyrun-0.1.0/.github/pull_request_template.md +12 -0
  5. skyrun-0.1.0/.github/workflows/ci.yml +55 -0
  6. skyrun-0.1.0/.github/workflows/publish.yml +76 -0
  7. skyrun-0.1.0/.gitignore +14 -0
  8. skyrun-0.1.0/AUTHORS.md +7 -0
  9. skyrun-0.1.0/CHANGELOG.md +43 -0
  10. skyrun-0.1.0/CODE_OF_CONDUCT.md +21 -0
  11. skyrun-0.1.0/CONTRIBUTING.md +90 -0
  12. skyrun-0.1.0/LICENSE +21 -0
  13. skyrun-0.1.0/MANIFEST.in +9 -0
  14. skyrun-0.1.0/PKG-INFO +264 -0
  15. skyrun-0.1.0/README.md +226 -0
  16. skyrun-0.1.0/SECURITY.md +24 -0
  17. skyrun-0.1.0/docs/architecture.md +103 -0
  18. skyrun-0.1.0/docs/configuration.md +165 -0
  19. skyrun-0.1.0/docs/examples.md +83 -0
  20. skyrun-0.1.0/docs/publishing.md +180 -0
  21. skyrun-0.1.0/docs/quickstart.md +138 -0
  22. skyrun-0.1.0/docs/synchronization.md +151 -0
  23. skyrun-0.1.0/docs/validation.md +110 -0
  24. skyrun-0.1.0/pyproject.toml +76 -0
  25. skyrun-0.1.0/setup.cfg +4 -0
  26. skyrun-0.1.0/src/skyrun/__init__.py +24 -0
  27. skyrun-0.1.0/src/skyrun/__main__.py +3 -0
  28. skyrun-0.1.0/src/skyrun/cli.py +185 -0
  29. skyrun-0.1.0/src/skyrun/config.py +256 -0
  30. skyrun-0.1.0/src/skyrun/default.modalignore +28 -0
  31. skyrun-0.1.0/src/skyrun/errors.py +17 -0
  32. skyrun-0.1.0/src/skyrun/examples/__init__.py +1 -0
  33. skyrun-0.1.0/src/skyrun/examples/hello/.modalignore +3 -0
  34. skyrun-0.1.0/src/skyrun/examples/hello/__init__.py +0 -0
  35. skyrun-0.1.0/src/skyrun/examples/hello/main.py +23 -0
  36. skyrun-0.1.0/src/skyrun/examples/hello/skyrun.toml +18 -0
  37. skyrun-0.1.0/src/skyrun/examples/inference/.modalignore +2 -0
  38. skyrun-0.1.0/src/skyrun/examples/inference/__init__.py +0 -0
  39. skyrun-0.1.0/src/skyrun/examples/inference/demo.py +165 -0
  40. skyrun-0.1.0/src/skyrun/examples/inference/requirements-gpu.txt +7 -0
  41. skyrun-0.1.0/src/skyrun/examples/inference/skyrun.toml +24 -0
  42. skyrun-0.1.0/src/skyrun/examples/training/.modalignore +2 -0
  43. skyrun-0.1.0/src/skyrun/examples/training/__init__.py +0 -0
  44. skyrun-0.1.0/src/skyrun/examples/training/requirements-gpu.txt +3 -0
  45. skyrun-0.1.0/src/skyrun/examples/training/skyrun.toml +23 -0
  46. skyrun-0.1.0/src/skyrun/examples/training/train.py +70 -0
  47. skyrun-0.1.0/src/skyrun/manifest.py +206 -0
  48. skyrun-0.1.0/src/skyrun/paths.py +81 -0
  49. skyrun-0.1.0/src/skyrun/providers/__init__.py +33 -0
  50. skyrun-0.1.0/src/skyrun/providers/modal.py +187 -0
  51. skyrun-0.1.0/src/skyrun/py.typed +0 -0
  52. skyrun-0.1.0/src/skyrun/remote/__init__.py +1 -0
  53. skyrun-0.1.0/src/skyrun/remote/app.py +121 -0
  54. skyrun-0.1.0/src/skyrun/remote/engine.py +196 -0
  55. skyrun-0.1.0/src/skyrun/runner.py +149 -0
  56. skyrun-0.1.0/src/skyrun/session.py +103 -0
  57. skyrun-0.1.0/src/skyrun/sync.py +163 -0
  58. skyrun-0.1.0/src/skyrun.egg-info/PKG-INFO +264 -0
  59. skyrun-0.1.0/src/skyrun.egg-info/SOURCES.txt +76 -0
  60. skyrun-0.1.0/src/skyrun.egg-info/dependency_links.txt +1 -0
  61. skyrun-0.1.0/src/skyrun.egg-info/entry_points.txt +2 -0
  62. skyrun-0.1.0/src/skyrun.egg-info/requires.txt +11 -0
  63. skyrun-0.1.0/src/skyrun.egg-info/top_level.txt +1 -0
  64. skyrun-0.1.0/tests/conftest.py +21 -0
  65. skyrun-0.1.0/tests/test_cli.py +100 -0
  66. skyrun-0.1.0/tests/test_config.py +105 -0
  67. skyrun-0.1.0/tests/test_engine.py +179 -0
  68. skyrun-0.1.0/tests/test_integration.py +62 -0
  69. skyrun-0.1.0/tests/test_manifest.py +142 -0
  70. skyrun-0.1.0/tests/test_modal.py +109 -0
  71. skyrun-0.1.0/tests/test_modal_lifecycle.py +151 -0
  72. skyrun-0.1.0/tests/test_paths.py +65 -0
  73. skyrun-0.1.0/tests/test_providers.py +34 -0
  74. skyrun-0.1.0/tests/test_remote_transport.py +104 -0
  75. skyrun-0.1.0/tests/test_runner.py +100 -0
  76. skyrun-0.1.0/tests/test_session.py +98 -0
  77. skyrun-0.1.0/tests/test_sync.py +173 -0
  78. skyrun-0.1.0/tools/check_dist.py +138 -0
@@ -0,0 +1,28 @@
1
+ name: Bug report
2
+ description: Report a reproducible problem with Skyrun.
3
+ body:
4
+ - type: textarea
5
+ id: problem
6
+ attributes:
7
+ label: Problem and expected behavior
8
+ validations:
9
+ required: true
10
+ - type: textarea
11
+ id: reproduction
12
+ attributes:
13
+ label: Minimal reproduction
14
+ description: Include the command and a sanitized configuration. Remove credentials and private paths/content.
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: environment
19
+ attributes:
20
+ label: Versions and environment
21
+ description: Skyrun, Python, Modal SDK, local OS, requested compute, and relevant run status.
22
+ validations:
23
+ required: true
24
+ - type: textarea
25
+ id: logs
26
+ attributes:
27
+ label: Relevant output
28
+ description: Share only sanitized logs. Console output can contain workload secrets.
@@ -0,0 +1,16 @@
1
+ name: Feature request
2
+ description: Propose a focused improvement or provider integration.
3
+ body:
4
+ - type: textarea
5
+ id: use_case
6
+ attributes:
7
+ label: Use case
8
+ description: What concrete task is difficult today?
9
+ validations:
10
+ required: true
11
+ - type: textarea
12
+ id: proposal
13
+ attributes:
14
+ label: Proposed behavior and alternatives
15
+ validations:
16
+ required: true
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ - package-ecosystem: pip
8
+ directory: /
9
+ schedule:
10
+ interval: weekly
@@ -0,0 +1,12 @@
1
+ ## Problem and resulting behavior
2
+
3
+ Describe the concrete trigger, the previous behavior, and what now happens.
4
+
5
+ ## Validation
6
+
7
+ List meaningful checks and their results. Distinguish offline checks from any
8
+ explicitly enabled Modal runs; include run IDs and hardware for live validation.
9
+
10
+ ## Compatibility
11
+
12
+ Describe any user-facing changes, documentation updates, or remaining limits.
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ workflow_call:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ timeout-minutes: 15
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ['3.11', '3.12', '3.13', '3.14']
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ with:
22
+ persist-credentials: false
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ cache: pip
27
+ cache-dependency-path: pyproject.toml
28
+ - run: python -m pip install -e '.[modal,dev]'
29
+ - run: python -m ruff check .
30
+ - run: python -m ruff format --check .
31
+ - run: python -m pytest
32
+
33
+ build:
34
+ needs: test
35
+ runs-on: ubuntu-latest
36
+ timeout-minutes: 15
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ with:
40
+ persist-credentials: false
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: '3.12'
44
+ cache: pip
45
+ cache-dependency-path: pyproject.toml
46
+ - run: python -m pip install -e '.[dev]'
47
+ - run: python -m build
48
+ - run: python -m twine check --strict dist/*
49
+ - run: python tools/check_dist.py
50
+ - uses: actions/upload-artifact@v4
51
+ with:
52
+ name: distributions
53
+ path: dist/*
54
+ if-no-files-found: error
55
+
@@ -0,0 +1,76 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ index:
9
+ description: Package index
10
+ type: choice
11
+ required: true
12
+ default: testpypi
13
+ options: [testpypi, pypi]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ verify-ref:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ with:
24
+ persist-credentials: false
25
+ - uses: actions/setup-python@v5
26
+ with:
27
+ python-version: '3.12'
28
+ - name: Require a matching version tag for production
29
+ env:
30
+ PUBLISH_INDEX: ${{ github.event_name == 'release' && 'pypi' || inputs.index }}
31
+ run: |
32
+ python - <<'PY'
33
+ import os
34
+ import tomllib
35
+ from pathlib import Path
36
+ version = tomllib.loads(Path('pyproject.toml').read_text())['project']['version']
37
+ ref = os.environ['GITHUB_REF']
38
+ if os.environ['PUBLISH_INDEX'] == 'pypi' or ref.startswith('refs/tags/'):
39
+ expected = 'refs/tags/v' + version
40
+ if ref != expected:
41
+ raise SystemExit(f'Release requires {expected}; got {ref}')
42
+ PY
43
+
44
+ checks:
45
+ needs: verify-ref
46
+ uses: ./.github/workflows/ci.yml
47
+
48
+ publish-testpypi:
49
+ if: github.event_name == 'workflow_dispatch' && inputs.index == 'testpypi'
50
+ needs: checks
51
+ runs-on: ubuntu-latest
52
+ environment: testpypi
53
+ permissions:
54
+ id-token: write
55
+ steps:
56
+ - uses: actions/download-artifact@v4
57
+ with:
58
+ name: distributions
59
+ path: dist/
60
+ - uses: pypa/gh-action-pypi-publish@release/v1
61
+ with:
62
+ repository-url: https://test.pypi.org/legacy/
63
+
64
+ publish-pypi:
65
+ if: github.event_name == 'release' || inputs.index == 'pypi'
66
+ needs: checks
67
+ runs-on: ubuntu-latest
68
+ environment: pypi
69
+ permissions:
70
+ id-token: write
71
+ steps:
72
+ - uses: actions/download-artifact@v4
73
+ with:
74
+ name: distributions
75
+ path: dist/
76
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,14 @@
1
+ __pycache__/
2
+ .pytest_cache/
3
+ .env*
4
+ runs/
5
+ .ruff_cache/
6
+ .coverage
7
+ .coverage.*
8
+ htmlcov/
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+ outputs/
13
+ checkpoints/
14
+ .venv*/
@@ -0,0 +1,7 @@
1
+ # Authors and contributors
2
+
3
+ - Aliaksei Kaliutau — original author and maintainer.
4
+
5
+ Contributors are also recorded in the [Git history](https://github.com/akaliutau/skyrun/graphs/contributors).
6
+ You may add your name here with your first merged contribution. A public email
7
+ address is optional. See [CONTRIBUTING.md](CONTRIBUTING.md) for the workflow.
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ All notable user-facing changes are recorded here. Skyrun uses semantic versions;
4
+ the provider extension contract may evolve between minor releases before 1.0.
5
+
6
+ ## 0.1.0 — Unreleased
7
+
8
+ ### Added
9
+
10
+ - Installable `skyrun` package, console entry point, `python -m skyrun`, and Python API.
11
+ - Provider-neutral execution/download interface and third-party entry points.
12
+ - Dedicated TOML and `[tool.skyrun]` configuration with local validation.
13
+ - Project `.modalignore`, packaged baseline rules, bounded immutable snapshots,
14
+ executable mode preservation, and content-addressed source caching on Modal.
15
+ - Optional run-boundary bidirectional sync with hash verification, local conflict
16
+ detection, explicit resolution policies, and retained remote versions.
17
+ - Wheel-distributed hello, training, and inference projects exposed by `skyrun init`.
18
+ - Offline regression suite, opt-in live CPU smoke, CI, distribution checks,
19
+ contributor files, and TestPyPI/PyPI publishing workflows and documentation.
20
+
21
+ ### Execution
22
+
23
+ - PTY output, unbuffered raw streaming, complete console logs, process-group cleanup,
24
+ graceful checkpoint allowance, and escalating stop requests.
25
+ - Workload exit codes, timeout/cancel status, isolated per-run outputs, model caching,
26
+ streamed artifact downloads, and GPU-free recovery of committed files.
27
+
28
+ ### Fixed
29
+
30
+ - Hardcoded remote source location that could diverge from the selected project.
31
+ - Predictable download temporary filenames and insufficient ancestor symlink checks.
32
+ - Source snapshots now retain executable bits and report files modified during copying.
33
+ - Trusted Modal mountpoints are resolved before applying symlink checks to their contents.
34
+
35
+ ### Repository cleanup
36
+
37
+ - Repository links, package metadata, badges, clone commands, and Trusted Publishing
38
+ settings target `akaliutau/skyrun`.
39
+ - The package CLI/API is the sole execution interface; examples have one canonical
40
+ location under `src/skyrun/examples/`.
41
+ - Removed standalone compatibility scripts, obsolete configuration aliases,
42
+ duplicate examples/dependency files, and the separate starter archive builder.
43
+ - Releases contain the standard Python wheel and source distribution.
@@ -0,0 +1,21 @@
1
+ # Code of conduct
2
+
3
+ Skyrun welcomes contributors with different backgrounds and levels of experience.
4
+ Treat participants with respect, give constructive feedback, and focus discussion
5
+ on the work. Assume good intent while taking concerns about harmful behavior
6
+ seriously.
7
+
8
+ Harassment, discriminatory remarks, threats, personal attacks, and sharing private
9
+ information without consent are unacceptable. This applies to issues, pull
10
+ requests, reviews, and other project spaces, including conduct while representing
11
+ the project elsewhere.
12
+
13
+ Maintainers may edit or remove inappropriate content, close a discussion, or
14
+ restrict participation when needed to protect the community. They should explain
15
+ the reason when appropriate and consider the impact and context of the behavior.
16
+
17
+ Report concerns privately to the repository owner through the contact methods
18
+ listed on [their GitHub profile](https://github.com/akaliutau). Avoid posting
19
+ personal details publicly. Maintainers will handle reports discreetly and seek a
20
+ fair resolution. Participants who need to challenge a decision can contact the
21
+ repository owner with the relevant context.
@@ -0,0 +1,90 @@
1
+ # Contributing to Skyrun
2
+
3
+ Thank you for helping make remote execution dependable and easy to use. Small,
4
+ well-tested fixes, clear documentation, and additional provider adapters are
5
+ welcome. Open an issue before a substantial API or behavior change so maintainers
6
+ can discuss compatibility and scope.
7
+
8
+ ## Development environment
9
+
10
+ ```bash
11
+ git clone https://github.com/akaliutau/skyrun.git
12
+ cd skyrun
13
+ python -m venv .venv
14
+ source .venv/bin/activate
15
+ python -m pip install -e '.[modal,dev]'
16
+ ```
17
+
18
+ Python 3.11+ is required. Tests run without Modal credentials or cloud compute by
19
+ default. Remote process tests use real POSIX subprocesses; CI runs on Linux across
20
+ Python 3.11–3.14. Runnable examples live in `src/skyrun/examples/` and ship with
21
+ every wheel. Update their scripts and configuration together.
22
+
23
+ ## Before opening a pull request
24
+
25
+ ```bash
26
+ python -m ruff check .
27
+ python -m ruff format --check .
28
+ python -m pytest
29
+ python -m build
30
+ python -m twine check --strict dist/*
31
+ python tools/check_dist.py
32
+ ```
33
+
34
+ Use `python -m ruff format .` to apply formatting. Add a regression test for a bug
35
+ fix or behavior change. Prefer tests of externally visible behavior: process
36
+ cleanup, saved artifacts, path boundaries, transfer interruption, and file
37
+ conflicts. Avoid tests that simply repeat implementation details. Update the
38
+ relevant guide and `CHANGELOG.md` when user behavior changes.
39
+
40
+ Tests marked `integration` are skipped unless explicitly enabled. To exercise the
41
+ live CPU sample against your own authenticated Modal account:
42
+
43
+ ```bash
44
+ SKYRUN_TEST_MODAL=1 python -m pytest -m integration -v
45
+ ```
46
+
47
+ This allocates Modal CPU compute, creates persistent Volumes, and can incur
48
+ charges. Run it deliberately. A separate bounded GPU smoke checks T4 allocation,
49
+ selected-file sync, and GPU-free recovery, without model downloads:
50
+
51
+ ```bash
52
+ SKYRUN_TEST_GPU=1 python -m pytest tests/test_integration.py::test_live_modal_gpu_sync_and_recovery -v
53
+ ```
54
+
55
+ For model/training validation, follow the training and
56
+ inference recipes in [the example catalog](docs/examples.md) and record the GPU,
57
+ SDK version, run ID, exit code, and relevant saved artifacts in your PR. Never
58
+ commit credentials, model weights, run data, or private environment output.
59
+
60
+ ## Compatibility requirements
61
+
62
+ Preserve the documented `skyrun` CLI, Python API, `skyrun.toml`, and
63
+ `[tool.skyrun]` configuration. Keep ordinary workload scripts free of runner
64
+ imports. Configuration and dry runs must work without a provider SDK or
65
+ authentication. Maintain live raw output,
66
+ first/second/third stop semantics, nonzero exit codes, process-group cleanup,
67
+ artifact recovery, and source isolation.
68
+
69
+ Two-way sync must remain opt-in, detect local changes, verify downloaded hashes,
70
+ and retain remote versions on conflict. Do not add automatic deletion or
71
+ overwriting to default sync behavior. Source and artifact paths must reject
72
+ traversal and symlinks. A backend must not retry an arbitrary workload without
73
+ explicit user configuration.
74
+
75
+ Read [architecture and extension points](docs/architecture.md) before adding a
76
+ provider. Keep SDK imports inside the provider boundary, use entry points for
77
+ extensions, and add transport contract tests. New dependencies should have a
78
+ clear purpose and support the declared Python versions.
79
+
80
+ ## Pull requests and releases
81
+
82
+ Explain the concrete problem, resulting behavior, and meaningful validation.
83
+ Include a reproduction for bug fixes and identify any remaining live-cloud checks.
84
+ Keep unrelated formatting and redesigns out of a focused change. Maintainers
85
+ review contributions under the [code of conduct](CODE_OF_CONDUCT.md).
86
+
87
+ Contributions are licensed under the repository's MIT license. Add yourself to
88
+ [AUTHORS.md](AUTHORS.md) when your first contribution is merged, if you wish.
89
+ Maintainers publish following [the release guide](docs/publishing.md); do not push
90
+ release tags or upload distributions as part of an ordinary contribution.
skyrun-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aliaksei Kaliutau
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ include LICENSE README.md CONTRIBUTING.md CODE_OF_CONDUCT.md AUTHORS.md SECURITY.md CHANGELOG.md
2
+ include .gitignore
3
+ recursive-include docs *.md
4
+ recursive-include tests *.py
5
+ recursive-include .github *.yml *.yaml *.md
6
+ recursive-include tools *.py
7
+ global-exclude __pycache__ *.py[cod]
8
+ prune runs
9
+ exclude plan.txt