firehot 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 (53) hide show
  1. firehot-0.1.0/.DS_Store +0 -0
  2. firehot-0.1.0/.github/workflows/ci-build.yml +158 -0
  3. firehot-0.1.0/.github/workflows/ci-lint.yml +95 -0
  4. firehot-0.1.0/.gitignore +174 -0
  5. firehot-0.1.0/Cargo.lock +1196 -0
  6. firehot-0.1.0/Cargo.toml +27 -0
  7. firehot-0.1.0/Makefile +216 -0
  8. firehot-0.1.0/PKG-INFO +106 -0
  9. firehot-0.1.0/README.md +93 -0
  10. firehot-0.1.0/dist_clean/firehot-0.1.0-cp310-cp310-macosx_11_0_arm64.whl +0 -0
  11. firehot-0.1.0/dist_clean/firehot-0.1.0-cp310-cp310-manylinux_2_39_x86_64.whl +0 -0
  12. firehot-0.1.0/dist_clean/firehot-0.1.0-cp311-cp311-macosx_11_0_arm64.whl +0 -0
  13. firehot-0.1.0/dist_clean/firehot-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl +0 -0
  14. firehot-0.1.0/dist_clean/firehot-0.1.0-cp312-cp312-macosx_11_0_arm64.whl +0 -0
  15. firehot-0.1.0/dist_clean/firehot-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl +0 -0
  16. firehot-0.1.0/dist_clean/firehot-0.1.0-cp313-cp313-macosx_11_0_arm64.whl +0 -0
  17. firehot-0.1.0/dist_clean/firehot-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl +0 -0
  18. firehot-0.1.0/dist_clean/firehot-0.1.0-cp39-cp39-macosx_11_0_arm64.whl +0 -0
  19. firehot-0.1.0/dist_clean/firehot-0.1.0-cp39-cp39-manylinux_2_39_x86_64.whl +0 -0
  20. firehot-0.1.0/firehot/__init__.py +2 -0
  21. firehot-0.1.0/firehot/__tests__/__init__.py +0 -0
  22. firehot-0.1.0/firehot/__tests__/embedded/__init__.py +0 -0
  23. firehot-0.1.0/firehot/__tests__/embedded/test_call_serializer.py +95 -0
  24. firehot-0.1.0/firehot/__tests__/embedded/test_child_entrypoint.py +62 -0
  25. firehot-0.1.0/firehot/__tests__/test_environment.py +64 -0
  26. firehot-0.1.0/firehot/embedded/call_serializer.py +55 -0
  27. firehot-0.1.0/firehot/embedded/child_entrypoint.py +53 -0
  28. firehot-0.1.0/firehot/embedded/parent_entrypoint.py +222 -0
  29. firehot-0.1.0/firehot/embedded/types.py +17 -0
  30. firehot-0.1.0/firehot/environment.py +58 -0
  31. firehot-0.1.0/firehot/isolate.py +52 -0
  32. firehot-0.1.0/media/header.png +0 -0
  33. firehot-0.1.0/mypackage/.python-version +1 -0
  34. firehot-0.1.0/mypackage/README.md +3 -0
  35. firehot-0.1.0/mypackage/external-package/.python-version +1 -0
  36. firehot-0.1.0/mypackage/external-package/README.md +0 -0
  37. firehot-0.1.0/mypackage/external-package/external_package/__init__.py +0 -0
  38. firehot-0.1.0/mypackage/external-package/external_package/mock_imports.py +13 -0
  39. firehot-0.1.0/mypackage/external-package/pyproject.toml +31 -0
  40. firehot-0.1.0/mypackage/external-package/uv.lock +184 -0
  41. firehot-0.1.0/mypackage/mypackage/__init__.py +0 -0
  42. firehot-0.1.0/mypackage/mypackage/app.py +8 -0
  43. firehot-0.1.0/mypackage/mypackage/dep.py +3 -0
  44. firehot-0.1.0/mypackage/mypackage/test_hotreload.py +75 -0
  45. firehot-0.1.0/mypackage/pyproject.toml +44 -0
  46. firehot-0.1.0/mypackage/uv.lock +215 -0
  47. firehot-0.1.0/pyproject.toml +37 -0
  48. firehot-0.1.0/src/ast.rs +703 -0
  49. firehot-0.1.0/src/environment.rs +870 -0
  50. firehot-0.1.0/src/lib.rs +274 -0
  51. firehot-0.1.0/src/messages.rs +359 -0
  52. firehot-0.1.0/src/scripts.rs +4 -0
  53. firehot-0.1.0/uv.lock +206 -0
Binary file
@@ -0,0 +1,158 @@
1
+ name: CI Build
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ tags: [ 'v*' ]
7
+ pull_request:
8
+ branches: [ main ]
9
+ types: [ opened, synchronize, reopened, labeled ]
10
+
11
+ jobs:
12
+ # Only run this workflow when:
13
+ # - PR has "Full Build" label
14
+ # - Push to main branch
15
+ # - Release tag is pushed
16
+ check_run_condition:
17
+ runs-on: ubuntu-latest
18
+ outputs:
19
+ should_run: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) || contains(github.event.pull_request.labels.*.name, 'Full Build') }}
20
+ steps:
21
+ - name: Check if workflow should run
22
+ id: check
23
+ run: |
24
+ if [[ "${{ github.event_name }}" == "push" && ("${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" =~ ^refs/tags/v) ]]; then
25
+ echo "Running because push to main or tag"
26
+ echo "should_run=true" >> $GITHUB_OUTPUT
27
+ elif [[ "${{ github.event_name }}" == "pull_request" && "${{ contains(github.event.pull_request.labels.*.name, 'Full Build') }}" == "true" ]]; then
28
+ echo "Running because PR has Full Build label"
29
+ echo "should_run=true" >> $GITHUB_OUTPUT
30
+ else
31
+ echo "Skipping build workflow"
32
+ echo "should_run=false" >> $GITHUB_OUTPUT
33
+ fi
34
+
35
+ # Run cargo tests on each target OS
36
+ cargo_test:
37
+ needs: check_run_condition
38
+ if: ${{ needs.check_run_condition.outputs.should_run == 'true' }}
39
+ runs-on: ${{ matrix.os }}
40
+ strategy:
41
+ fail-fast: false
42
+ matrix:
43
+ os: [ubuntu-latest, macos-latest]
44
+
45
+ steps:
46
+ - uses: actions/checkout@v3
47
+
48
+ - name: Set up Rust
49
+ uses: actions-rs/toolchain@v1
50
+ with:
51
+ profile: minimal
52
+ toolchain: stable
53
+ override: true
54
+
55
+ - name: Cache Rust dependencies
56
+ uses: actions/cache@v3
57
+ with:
58
+ path: |
59
+ ~/.cargo/bin/
60
+ ~/.cargo/registry/index/
61
+ ~/.cargo/registry/cache/
62
+ ~/.cargo/git/db/
63
+ target/
64
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
65
+
66
+ - name: Run Cargo tests
67
+ run: cargo test --lib --all
68
+
69
+ # Build maturin packages for each target OS
70
+ build_wheels:
71
+ needs: [check_run_condition, cargo_test]
72
+ if: ${{ needs.check_run_condition.outputs.should_run == 'true' }}
73
+ runs-on: ${{ matrix.os }}
74
+ strategy:
75
+ fail-fast: false
76
+ matrix:
77
+ os: [ubuntu-latest, macos-latest]
78
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
79
+
80
+ steps:
81
+ - uses: actions/checkout@v3
82
+
83
+ - name: Set up Python
84
+ uses: actions/setup-python@v4
85
+ with:
86
+ python-version: ${{ matrix.python-version }}
87
+
88
+ - name: Set up Rust
89
+ uses: actions-rs/toolchain@v1
90
+ with:
91
+ profile: minimal
92
+ toolchain: stable
93
+ override: true
94
+
95
+ - name: Install maturin
96
+ run: pip install maturin
97
+
98
+ - name: Build wheels
99
+ run: maturin build --release --strip --out dist
100
+
101
+ - name: Upload wheels
102
+ uses: actions/upload-artifact@v4
103
+ with:
104
+ name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}
105
+ path: dist/*.whl
106
+
107
+ # Collate all wheels for PyPI upload
108
+ publish_wheels:
109
+ needs: build_wheels
110
+ runs-on: ubuntu-latest
111
+
112
+ permissions:
113
+ id-token: write
114
+ contents: read
115
+
116
+ steps:
117
+ - uses: actions/checkout@v3
118
+
119
+ - name: Download all wheels
120
+ uses: actions/download-artifact@v4
121
+ with:
122
+ path: dist
123
+
124
+ - name: Merge wheel directories
125
+ run: |
126
+ mkdir -p wheels
127
+ find dist -name "*.whl" -exec cp {} wheels/ \;
128
+ mkdir -p dist_clean
129
+ cp wheels/*.whl dist_clean/
130
+
131
+ - name: Build sdist
132
+ uses: PyO3/maturin-action@v1
133
+ with:
134
+ command: sdist
135
+ args: --out dist_clean
136
+
137
+ - name: Set up Python
138
+ uses: actions/setup-python@v4
139
+ with:
140
+ python-version: '3.12'
141
+
142
+ - name: Install twine
143
+ run: pip install twine
144
+
145
+ - name: Check wheel validity
146
+ run: twine check dist_clean/*.whl dist_clean/*.tar.gz
147
+
148
+ - uses: actions/upload-artifact@v4
149
+ with:
150
+ name: final_dist
151
+ path: dist_clean/
152
+
153
+ # Only upload to PyPI on tags
154
+ - name: Upload to PyPI
155
+ if: startsWith(github.ref, 'refs/tags/v')
156
+ uses: pypa/gh-action-pypi-publish@release/v1
157
+ with:
158
+ packages-dir: dist_clean/
@@ -0,0 +1,95 @@
1
+ name: CI Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ package: ['hotreload', 'mypackage', 'external']
16
+
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v4
22
+ with:
23
+ python-version: '3.12'
24
+
25
+ - name: Cache uv installation
26
+ uses: actions/cache@v3
27
+ with:
28
+ path: |
29
+ ~/.cargo/bin/uv
30
+ ~/.cargo/registry
31
+ ~/.cargo/git
32
+ key: ${{ runner.os }}-uv-${{ hashFiles('**/Cargo.lock') }}
33
+
34
+ - name: Install uv
35
+ run: |
36
+ curl -LsSf https://astral.sh/uv/install.sh | sh
37
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
38
+
39
+ - name: Cache Python dependencies
40
+ uses: actions/cache@v3
41
+ with:
42
+ path: |
43
+ ~/.cache/uv
44
+ .venv
45
+ */*/venv
46
+ */.venv
47
+ key: ${{ runner.os }}-uv-deps-${{ matrix.package }}-${{ hashFiles('**/pyproject.toml') }}
48
+
49
+ - name: Create virtual environment
50
+ run: |
51
+ uv venv
52
+ echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
53
+ echo "$PWD/.venv/bin" >> $GITHUB_PATH
54
+
55
+ - name: Install hotreload dependencies & run lint
56
+ if: matrix.package == 'hotreload'
57
+ run: make ci-lint-hotreload
58
+
59
+ - name: Install mypackage dependencies & run lint
60
+ if: matrix.package == 'mypackage'
61
+ # Our explicit uv add is necessary to override our locally set wheel. We should remove this
62
+ # once we have a way to update the built executable locally.
63
+ run: |
64
+ (cd mypackage && uv add ..)
65
+ make ci-lint-mypackage
66
+
67
+ - name: Install external dependencies & run lint
68
+ if: matrix.package == 'external'
69
+ run: make ci-lint-external
70
+
71
+ test:
72
+ runs-on: ubuntu-latest
73
+
74
+ steps:
75
+ - uses: actions/checkout@v3
76
+
77
+ - name: Set up Python
78
+ uses: actions/setup-python@v4
79
+ with:
80
+ python-version: '3.12'
81
+
82
+ - name: Install uv
83
+ run: |
84
+ curl -LsSf https://astral.sh/uv/install.sh | sh
85
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
86
+
87
+ - name: Create virtual environment
88
+ run: |
89
+ uv venv
90
+ echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
91
+ echo "$PWD/.venv/bin" >> $GITHUB_PATH
92
+
93
+ - name: Run tests
94
+ run: |
95
+ make test-hotreload
@@ -0,0 +1,174 @@
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
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc