-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Replace customized zmq frames serialization with Cap'n Proto to pave the road to implement language agnostic scheduler implementation, so make C++ implementation of scheduler feasible. - Replace legacy setup.py with pyproject.toml - Add configuration for black, flake8, and mypy - Change to monotonic time for profiling - Fix mypy warnings Signed-off-by: Sharpner6 <1sc2l4qi@duck.com>
- Loading branch information
1 parent
ce84e0a
commit 7ad4519
Showing
75 changed files
with
1,905 additions
and
1,216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python application | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 mypy | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 . --count --statistics --max-line-length=127 --extend-ignore=E203 | ||
- name: Lint with MyPy | ||
run: | | ||
mypy . | ||
- name: Run python unittest | ||
run: | | ||
python -m unittest discover -v tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
__pychace__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
build/ | ||
dist/ | ||
sdist/ | ||
wheels/ | ||
eggs/ | ||
.eggs/ | ||
.idea/ | ||
*.egg-info/ | ||
*.egg | ||
.mypy_cache/ | ||
|
||
venv*/ | ||
.vscode/ | ||
|
||
dask-worker-space/* | ||
.pre-commit-config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm", "mypy", "black", "flake8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "scaler" | ||
description = "Scaler Distribution Framework" | ||
requires-python = ">=3.8" | ||
readme = { file = "README.md", content-type = "text/markdown" } | ||
license = { text = "Apache 2.0" } | ||
authors = [{ name = "Citi", email = "opensource@citi.com" }] | ||
dynamic = ["dependencies", "version"] | ||
|
||
[project.urls] | ||
Home = "https://github.com/Citi/scaler" | ||
|
||
[project.scripts] | ||
scaler_scheduler = "scaler.entry_points.scheduler:main" | ||
scaler_cluster = "scaler.entry_points.cluster:main" | ||
scaler_top = "scaler.entry_points.top:main" | ||
scaler_ui = "scaler.entry_points.webui:main" | ||
|
||
[project.optional-dependencies] | ||
uvloop = ["uvloop"] | ||
graphblas = ["python-graphblas", "numpy"] | ||
gui = ["nicegui[plotly]"] | ||
all = ["python-graphblas", "numpy", "uvloop", "nicegui[plotly]"] | ||
|
||
[tool.setuptools] | ||
packages = ["scaler"] | ||
include-package-data = true | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = { file = "requirements.txt" } | ||
version = { attr = "scaler.about.__version__" } | ||
|
||
[tool.mypy] | ||
no_strict_optional = true | ||
check_untyped_defs = true | ||
ignore_missing_imports = true | ||
exclude = [ | ||
"^docs.*$", | ||
"^benchmark.*$", | ||
"^venv.*$" | ||
] | ||
|
||
[tool.flake8] | ||
max-line-length = 120 | ||
extend-ignore = "E203" | ||
exclude = "venv312" | ||
|
||
[tool.black] | ||
line-length = 120 | ||
skip-magic-trailing-comma = true | ||
|
||
[metadata] | ||
long_description = { file = "README.md" } | ||
long_description_content_type = "text/markdown" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
pyzmq | ||
psutil | ||
bidict | ||
cloudpickle | ||
graphlib-backport; python_version < '3.9' | ||
psutil | ||
pycapnp | ||
pyzmq | ||
tblib | ||
bidict | ||
graphlib-backport; python_version < '3.9' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from scaler.entry_points.top import main | ||
from scaler.utility.debug import pdb_wrapped | ||
|
||
if __name__ == "__main__": | ||
main() | ||
pdb_wrapped(main)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.7.14" | ||
__version__ = "1.8.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.