scythe-engine 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.
@@ -0,0 +1,30 @@
1
+ name: "setup-python-env"
2
+ description: "Set up Python environment for the given Python version"
3
+
4
+ inputs:
5
+ python-version:
6
+ description: "Python version to use"
7
+ required: true
8
+ default: "3.12"
9
+ uv-version:
10
+ description: "uv version to use"
11
+ required: true
12
+ default: "0.6.14"
13
+
14
+ runs:
15
+ using: "composite"
16
+ steps:
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ inputs.python-version }}
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v2
23
+ with:
24
+ version: ${{ inputs.uv-version }}
25
+ enable-cache: "true"
26
+ cache-suffix: ${{ matrix.python-version }}
27
+
28
+ - name: Install Python dependencies
29
+ run: uv sync --frozen --all-extras --all-groups
30
+ shell: bash
@@ -0,0 +1,71 @@
1
+ name: Main
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ types: [opened, synchronize, reopened, ready_for_review]
9
+
10
+ jobs:
11
+ quality:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Check out
15
+ uses: actions/checkout@v4
16
+
17
+ - uses: actions/cache@v4
18
+ with:
19
+ path: ~/.cache/pre-commit
20
+ key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
21
+
22
+ - name: Set up the environment
23
+ uses: ./.github/actions/setup-python-env
24
+
25
+ # - name: Generate Prisma client
26
+ # run: make prisma-generate
27
+
28
+ - name: Run checks
29
+ run: make check
30
+
31
+ tests-and-type-check:
32
+ runs-on: ubuntu-latest
33
+ strategy:
34
+ matrix:
35
+ python-version: ["3.10", "3.11", "3.12"]
36
+ fail-fast: false
37
+ defaults:
38
+ run:
39
+ shell: bash
40
+ steps:
41
+ - name: Check out
42
+ uses: actions/checkout@v4
43
+
44
+ - name: Set up the environment
45
+ uses: ./.github/actions/setup-python-env
46
+ with:
47
+ python-version: ${{ matrix.python-version }}
48
+
49
+ - name: Check typing
50
+ run: uv run pyright
51
+
52
+ - name: Run tests
53
+ run: uv run pytest tests --cov --cov-config=pyproject.toml --cov-report=xml
54
+
55
+ - name: Upload coverage reports to Codecov with GitHub Action on Python 3.12
56
+ uses: codecov/codecov-action@v4
57
+ if: ${{ matrix.python-version == '3.12' }}
58
+ with:
59
+ token: ${{ secrets.CODECOV_TOKEN }}
60
+
61
+ check-docs:
62
+ runs-on: ubuntu-latest
63
+ steps:
64
+ - name: Check out
65
+ uses: actions/checkout@v4
66
+
67
+ - name: Set up the environment
68
+ uses: ./.github/actions/setup-python-env
69
+
70
+ - name: Check if documentation can be built
71
+ run: uv run mkdocs build -s
@@ -0,0 +1,66 @@
1
+ name: release-main
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ branches: [main]
7
+
8
+ jobs:
9
+ set-version:
10
+ runs-on: ubuntu-24.04
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Export tag
15
+ id: vars
16
+ run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
17
+ if: ${{ github.event_name == 'release' }}
18
+
19
+ - name: Update project version
20
+ run: |
21
+ sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
22
+ env:
23
+ RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
24
+ if: ${{ github.event_name == 'release' }}
25
+
26
+ - name: Upload updated pyproject.toml
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: pyproject-toml
30
+ path: pyproject.toml
31
+
32
+ publish:
33
+ runs-on: ubuntu-latest
34
+ needs: [set-version]
35
+ steps:
36
+ - name: Check out
37
+ uses: actions/checkout@v4
38
+
39
+ - name: Set up the environment
40
+ uses: ./.github/actions/setup-python-env
41
+
42
+ - name: Download updated pyproject.toml
43
+ uses: actions/download-artifact@v4
44
+ with:
45
+ name: pyproject-toml
46
+
47
+ - name: Build package
48
+ run: uv build
49
+
50
+ - name: Publish package
51
+ run: uv publish
52
+ env:
53
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
54
+
55
+ deploy-docs:
56
+ needs: publish
57
+ runs-on: ubuntu-latest
58
+ steps:
59
+ - name: Check out
60
+ uses: actions/checkout@v4
61
+
62
+ - name: Set up the environment
63
+ uses: ./.github/actions/setup-python-env
64
+
65
+ - name: Deploy documentation
66
+ run: uv run mkdocs gh-deploy --force
@@ -0,0 +1,15 @@
1
+ name: validate-codecov-config
2
+
3
+ on:
4
+ pull_request:
5
+ paths: [codecov.yaml]
6
+ push:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ validate-codecov-config:
11
+ runs-on: ubuntu-22.04
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Validate codecov configuration
15
+ run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
@@ -0,0 +1,170 @@
1
+ docs/source
2
+
3
+ # From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # poetry
102
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106
+ #poetry.lock
107
+
108
+ # pdm
109
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110
+ #pdm.lock
111
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112
+ # in version control.
113
+ # https://pdm.fming.dev/#use-with-ide
114
+ .pdm.toml
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+
160
+ # PyCharm
161
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
162
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
163
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
164
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
165
+ #.idea/
166
+
167
+ .env.dev
168
+ .env.copilot
169
+ data/cache
170
+ cache/
@@ -0,0 +1,34 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: "v5.0.0"
4
+ hooks:
5
+ - id: check-case-conflict
6
+ - id: check-merge-conflict
7
+ - id: check-toml
8
+ - id: check-yaml
9
+ # - id: check-json
10
+ # exclude: ^.devcontainer/devcontainer.json
11
+ # - id: pretty-format-json
12
+ # exclude: ^.devcontainer/devcontainer.json
13
+ # args: [--autofix, --no-sort-keys]
14
+ - id: end-of-file-fixer
15
+ - id: trailing-whitespace
16
+
17
+ - repo: https://github.com/RobertCraigie/pyright-python
18
+ rev: v1.1.392
19
+ hooks:
20
+ - id: pyright
21
+
22
+ - repo: https://github.com/astral-sh/ruff-pre-commit
23
+ rev: "v0.11.5"
24
+ hooks:
25
+ - id: ruff
26
+ args: [--exit-non-zero-on-fix, --show-fixes]
27
+ - id: ruff-format
28
+
29
+ - repo: https://github.com/pre-commit/mirrors-prettier
30
+ rev: "v3.0.3"
31
+ hooks:
32
+ - id: prettier
33
+
34
+ exclude: "copilot/"
@@ -0,0 +1 @@
1
+ copilot/
@@ -0,0 +1,19 @@
1
+ {
2
+ "python.analysis.typeCheckingMode": "standard",
3
+ "[python]": {
4
+ "editor.formatOnSave": true,
5
+ "editor.defaultFormatter": "charliermarsh.ruff",
6
+ "editor.codeActionsOnSave": {
7
+ "source.organizeImports": "explicit",
8
+ "source.fixAll": "explicit"
9
+ }
10
+ },
11
+ "notebook.formatOnSave.enabled": true,
12
+ "notebook.codeActionsOnSave": {
13
+ "notebook.source.fixAll": "explicit",
14
+ "notebook.source.organizeImports": "explicit"
15
+ },
16
+ "ruff.lineLength": 88,
17
+ "python.analysis.autoImportCompletions": true,
18
+ "editor.rulers": [88]
19
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025, Sam Wolk
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,70 @@
1
+ .PHONY: install
2
+ install: ## Install the poetry environment and install the pre-commit hooks
3
+ @echo "🚀 Creating virtual environment using uv"
4
+ @uv sync --all-groups --all-extras
5
+ @uv run pre-commit install
6
+
7
+ .PHONY: clean-env
8
+ clean-env: ## Clean the uv environment
9
+ @echo "🚀 Removing .venv directory created by uv (if exists)"
10
+ @rm -rf .venv
11
+
12
+ .PHONY: check
13
+ check: ## Run code quality tools.
14
+ @echo "🚀 Checking lock file consistency with 'pyproject.toml'"
15
+ @uv lock --locked
16
+ @echo "🚀 Linting code: Running pre-commit"
17
+ @uv run pre-commit run -a
18
+ @echo "🚀 Static type checking: Running pyright"
19
+ @uv run pyright
20
+
21
+ .PHONY: test
22
+ test: ## Test the code with pytest
23
+ @echo "🚀 Testing code: Running pytest"
24
+ @uv run pytest --cov --cov-config=pyproject.toml --cov-report=xml
25
+
26
+
27
+ .PHONY: build
28
+ build: clean-build ## Build wheel file
29
+ @echo "🚀 Creating wheel file"
30
+ @uvx --from build pyproject-build --installer uv
31
+
32
+ .PHONY: clean-build
33
+ clean-build: ## Clean build artifacts
34
+ @echo "🚀 Removing build artifacts"
35
+ @uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
36
+
37
+ .PHONY: publish
38
+ publish: ## Publish a release to PyPI.
39
+ @echo "🚀 Publishing."
40
+ @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
41
+
42
+ .PHONY: build-and-publish
43
+ build-and-publish: build publish ## Build and publish.
44
+
45
+ .PHONY: docs-test
46
+ docs-test: ## Test if documentation can be built without warnings or errors
47
+ @uv run mkdocs build -s
48
+
49
+ .PHONY: docs
50
+ docs: ## Build and serve the documentation
51
+ @uv run mkdocs serve
52
+
53
+ .PHONY: docs-deploy
54
+ docs-deploy: ## Build and serve the documentation
55
+ @uv run mkdocs gh-deploy
56
+
57
+ .PHONY: help
58
+ help:
59
+ @uv run python -c "import re; \
60
+ [[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"
61
+
62
+ .PHONY: create-copilot-app
63
+ create-copilot-app: ## Create the entire stack with copilot
64
+ @copilot app init
65
+ @copilot env init --name prod
66
+ @copilot env deploy --name prod
67
+ @copilot secret init --name HATCHET_CLIENT_TOKEN
68
+ @copilot deploy --init-wkld --env prod --all
69
+
70
+ .DEFAULT_GOAL := help
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: scythe-engine
3
+ Version: 0.0.1
4
+ Summary: This is a repository for managing embarassingly parallel experiments with Hatchet.
5
+ Project-URL: Homepage, https://github.com/szvsw/scythe
6
+ Project-URL: Documentation, https://szvsw.github.io/scythe
7
+ Project-URL: Repository, https://github.com/szvsw/scythe
8
+ Project-URL: Issues, https://github.com/szvsw/scythe/issues
9
+ Author-email: Sam Wolk <mail@samwolk.info>
10
+ License-File: LICENSE
11
+ Requires-Python: <3.13,>=3.10
12
+ Requires-Dist: boto3<2.0,>=1.35
13
+ Requires-Dist: fastparquet~=2024.11.0
14
+ Requires-Dist: hatchet-sdk<2,>=1
15
+ Requires-Dist: numpy<2.3,>=2.2
16
+ Requires-Dist: pandas<2.3,>=2.2.2
17
+ Requires-Dist: pyarrow~=19.0.1
18
+ Requires-Dist: pydantic<3.0,>=2.9.2
19
+ Requires-Dist: tables<4.0,>=3.9
20
+ Requires-Dist: tqdm<5.0,>=4.66
File without changes
@@ -0,0 +1,9 @@
1
+ coverage:
2
+ range: 70..90
3
+ round: down
4
+ precision: 1
5
+ status:
6
+ project:
7
+ default:
8
+ target: 90%
9
+ threshold: 0.5%
@@ -0,0 +1 @@
1
+ # Scythe
@@ -0,0 +1,66 @@
1
+ site_name: Scythe
2
+ repo_url: https://github.com/szvsw/scythe
3
+ site_url: https://szvsw.github.io/scythe
4
+ site_description: This is a repository for managing embarassingly parallel experiments with Hatchet.
5
+ site_author: Sam Wolk
6
+ edit_uri: edit/main/docs/
7
+ repo_name: szvsw/scythe
8
+ copyright: Maintained by <a href="https://github.com/szvsw">Sam Wolk</a>.
9
+
10
+ nav:
11
+ - Home: index.md
12
+ plugins:
13
+ - search
14
+ - mkdocstrings:
15
+ handlers:
16
+ python:
17
+ setup_commands:
18
+ - import sys
19
+ - sys.path.append('../')
20
+ options:
21
+ show_source: false
22
+ theme:
23
+ name: material
24
+ feature:
25
+ tabs: true
26
+ features:
27
+ # - toc.follow
28
+ # - toc.integrate
29
+ - navigation.top
30
+ - navigation.path
31
+ - navigation.indexes
32
+ - navigation.sections
33
+ - navigation.tracking
34
+ - navigation.instant
35
+ - navigation.instant.prefetch
36
+ - navigation.instant.progress
37
+ palette:
38
+ - media: "(prefers-color-scheme: light)"
39
+ scheme: default
40
+ primary: white
41
+ accent: deep orange
42
+ toggle:
43
+ icon: material/brightness-7
44
+ name: Switch to dark mode
45
+ - media: "(prefers-color-scheme: dark)"
46
+ scheme: slate
47
+ primary: black
48
+ accent: deep orange
49
+ toggle:
50
+ icon: material/brightness-4
51
+ name: Switch to light mode
52
+ icon:
53
+ repo: fontawesome/brands/github
54
+
55
+ extra:
56
+ social:
57
+ - icon: fontawesome/brands/github
58
+ link: https://github.com/szvsw/scythe
59
+ - icon: fontawesome/brands/python
60
+ link: https://pypi.org/project/scythe-py
61
+
62
+ markdown_extensions:
63
+ - toc:
64
+ permalink: "#"
65
+ - pymdownx.arithmatex:
66
+ generic: true