disco-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.
- disco_engine-0.0.1/.github/CLA/CCLA.md +35 -0
- disco_engine-0.0.1/.github/CLA/CONTRIBUTING.md +18 -0
- disco_engine-0.0.1/.github/CLA/ICLA.md +37 -0
- disco_engine-0.0.1/.github/workflows/build-windows.yml +42 -0
- disco_engine-0.0.1/.github/workflows/build.yml +68 -0
- disco_engine-0.0.1/.github/workflows/release-publish.yml +95 -0
- disco_engine-0.0.1/.github/workflows/test.yml +54 -0
- disco_engine-0.0.1/.gitignore +228 -0
- disco_engine-0.0.1/CMakeLists.txt +55 -0
- disco_engine-0.0.1/ENGINEERING_SPEC.md +4468 -0
- disco_engine-0.0.1/LICENSE +13 -0
- disco_engine-0.0.1/NOTICE +5 -0
- disco_engine-0.0.1/PKG-INFO +91 -0
- disco_engine-0.0.1/README.md +53 -0
- disco_engine-0.0.1/cmake/extension_helpers.cmake +56 -0
- disco_engine-0.0.1/config.toml +76 -0
- disco_engine-0.0.1/docs/simulation_engine.rst +87 -0
- disco_engine-0.0.1/pyproject.toml +143 -0
- disco_engine-0.0.1/sample/my-model/pyproject.toml +21 -0
- disco_engine-0.0.1/sample/my-model/src/my_model_pkg/__init__.py +0 -0
- disco_engine-0.0.1/sample/my-model/src/my_model_pkg/model.yml +16 -0
- disco_engine-0.0.1/sample/my-model/src/my_model_pkg/nodes/__init__.py +5 -0
- disco_engine-0.0.1/sample/my-model/src/my_model_pkg/nodes/stockingpoint.py +130 -0
- disco_engine-0.0.1/sample/my-model/src/my_model_pkg/orm.py +36 -0
- disco_engine-0.0.1/sample/my-model/src/my_model_pkg/plugin.py +2 -0
- disco_engine-0.0.1/sample/my-model/src/my_model_pkg/sampling.py +62 -0
- disco_engine-0.0.1/sample/my-model/tests/config.toml +71 -0
- disco_engine-0.0.1/sample/my-model/tests/conftest.py +14 -0
- disco_engine-0.0.1/sample/my-model/tests/my-model.db +0 -0
- disco_engine-0.0.1/sample/my-model/tests/test_my_model.py +43 -0
- disco_engine-0.0.1/src/disco/__init__.py +9 -0
- disco_engine-0.0.1/src/disco/__main__.py +30 -0
- disco_engine-0.0.1/src/disco/cli/__init__.py +4 -0
- disco_engine-0.0.1/src/disco/cli/argparse_model.py +123 -0
- disco_engine-0.0.1/src/disco/cli/server.py +63 -0
- disco_engine-0.0.1/src/disco/client.py +306 -0
- disco_engine-0.0.1/src/disco/cluster.py +454 -0
- disco_engine-0.0.1/src/disco/config.py +376 -0
- disco_engine-0.0.1/src/disco/database.py +77 -0
- disco_engine-0.0.1/src/disco/envelopes.py +38 -0
- disco_engine-0.0.1/src/disco/event_queue/CMakeLists.txt +9 -0
- disco_engine-0.0.1/src/disco/event_queue/EventQueue.cpp +363 -0
- disco_engine-0.0.1/src/disco/event_queue/EventQueue.h +118 -0
- disco_engine-0.0.1/src/disco/event_queue/PredecessorEventQueue.cpp +341 -0
- disco_engine-0.0.1/src/disco/event_queue/PredecessorEventQueue.h +103 -0
- disco_engine-0.0.1/src/disco/event_queue/__init__.py +3 -0
- disco_engine-0.0.1/src/disco/event_queue/_core.cpp +156 -0
- disco_engine-0.0.1/src/disco/event_queue/_core.pyi +39 -0
- disco_engine-0.0.1/src/disco/event_queue/py.typed +0 -0
- disco_engine-0.0.1/src/disco/exceptions.py +146 -0
- disco_engine-0.0.1/src/disco/experiments/__init__.py +37 -0
- disco_engine-0.0.1/src/disco/experiments/experiment.py +353 -0
- disco_engine-0.0.1/src/disco/experiments/store.py +226 -0
- disco_engine-0.0.1/src/disco/graph/__init__.py +67 -0
- disco_engine-0.0.1/src/disco/graph/core.py +570 -0
- disco_engine-0.0.1/src/disco/graph/db.py +517 -0
- disco_engine-0.0.1/src/disco/graph/extract.py +631 -0
- disco_engine-0.0.1/src/disco/graph/graph_mask.py +165 -0
- disco_engine-0.0.1/src/disco/graph/labels.py +121 -0
- disco_engine-0.0.1/src/disco/graph/schema.py +102 -0
- disco_engine-0.0.1/src/disco/graph_data.py +256 -0
- disco_engine-0.0.1/src/disco/helpers/__init__.py +11 -0
- disco_engine-0.0.1/src/disco/helpers/gb.py +130 -0
- disco_engine-0.0.1/src/disco/metastore/__init__.py +13 -0
- disco_engine-0.0.1/src/disco/metastore/helpers.py +245 -0
- disco_engine-0.0.1/src/disco/metastore/leader.py +130 -0
- disco_engine-0.0.1/src/disco/metastore/store.py +542 -0
- disco_engine-0.0.1/src/disco/model/__init__.py +60 -0
- disco_engine-0.0.1/src/disco/model/loader.py +355 -0
- disco_engine-0.0.1/src/disco/model/orm.py +531 -0
- disco_engine-0.0.1/src/disco/model/spec.py +331 -0
- disco_engine-0.0.1/src/disco/node.py +141 -0
- disco_engine-0.0.1/src/disco/orchestrator.py +434 -0
- disco_engine-0.0.1/src/disco/partitioner.py +136 -0
- disco_engine-0.0.1/src/disco/partitioning.py +479 -0
- disco_engine-0.0.1/src/disco/py.typed +0 -0
- disco_engine-0.0.1/src/disco/router.py +161 -0
- disco_engine-0.0.1/src/disco/runtime.py +352 -0
- disco_engine-0.0.1/src/disco/server.py +410 -0
- disco_engine-0.0.1/src/disco/simproc.py +564 -0
- disco_engine-0.0.1/src/disco/testrun.py +253 -0
- disco_engine-0.0.1/src/disco/transports/__init__.py +7 -0
- disco_engine-0.0.1/src/disco/transports/base.py +20 -0
- disco_engine-0.0.1/src/disco/transports/grpc_ingress.py +241 -0
- disco_engine-0.0.1/src/disco/transports/grpc_transport.py +338 -0
- disco_engine-0.0.1/src/disco/transports/inprocess.py +38 -0
- disco_engine-0.0.1/src/disco/transports/ipc_egress.py +141 -0
- disco_engine-0.0.1/src/disco/transports/ipc_messages.py +32 -0
- disco_engine-0.0.1/src/disco/transports/ipc_receiver.py +101 -0
- disco_engine-0.0.1/src/disco/transports/proto/__init__.py +5 -0
- disco_engine-0.0.1/src/disco/transports/proto/transport.proto +37 -0
- disco_engine-0.0.1/src/disco/transports/proto/transport_pb2.py +46 -0
- disco_engine-0.0.1/src/disco/transports/proto/transport_pb2.pyi +60 -0
- disco_engine-0.0.1/src/disco/transports/proto/transport_pb2_grpc.py +142 -0
- disco_engine-0.0.1/src/disco/worker.py +1173 -0
- disco_engine-0.0.1/tests/cli/test_argparse_model.py +62 -0
- disco_engine-0.0.1/tests/cli/test_cli_entrypoints.py +83 -0
- disco_engine-0.0.1/tests/conftest.py +30 -0
- disco_engine-0.0.1/tests/graph/test_db.py +312 -0
- disco_engine-0.0.1/tests/graph/test_distinct_labels.py +69 -0
- disco_engine-0.0.1/tests/graph/test_extract.py +429 -0
- disco_engine-0.0.1/tests/graph/test_graph_basic.py +321 -0
- disco_engine-0.0.1/tests/metastore/test_connection_manager.py +188 -0
- disco_engine-0.0.1/tests/metastore/test_leader.py +283 -0
- disco_engine-0.0.1/tests/metastore/test_metastore.py +646 -0
- disco_engine-0.0.1/tests/model/test_loader.py +327 -0
- disco_engine-0.0.1/tests/model/test_orm.py +341 -0
- disco_engine-0.0.1/tests/model/test_spec.py +211 -0
- disco_engine-0.0.1/tests/test_client.py +106 -0
- disco_engine-0.0.1/tests/test_cluster.py +351 -0
- disco_engine-0.0.1/tests/test_event_queue.py +347 -0
- disco_engine-0.0.1/tests/test_exceptions.py +93 -0
- disco_engine-0.0.1/tests/test_experiments.py +228 -0
- disco_engine-0.0.1/tests/test_grpc_transport.py +252 -0
- disco_engine-0.0.1/tests/test_ipc_transport.py +328 -0
- disco_engine-0.0.1/tests/test_orchestrator.py +392 -0
- disco_engine-0.0.1/tests/test_partitioner.py +185 -0
- disco_engine-0.0.1/tests/test_partitioning.py +315 -0
- disco_engine-0.0.1/tests/test_routing.py +158 -0
- disco_engine-0.0.1/tests/test_runtime.py +354 -0
- disco_engine-0.0.1/tests/test_server.py +343 -0
- disco_engine-0.0.1/tests/test_simproc.py +371 -0
- disco_engine-0.0.1/tests/test_testrun.py +426 -0
- disco_engine-0.0.1/tests/test_worker.py +449 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Corporate Contributor License Agreement (CCLA)
|
|
2
|
+
|
|
3
|
+
This Corporate Contributor License Agreement ("Agreement") is entered
|
|
4
|
+
into between the contributing organization ("Corporation") and the
|
|
5
|
+
project owner ("Project").
|
|
6
|
+
|
|
7
|
+
## 1. Grant of Copyright License
|
|
8
|
+
|
|
9
|
+
The Corporation hereby grants the Project a perpetual, worldwide,
|
|
10
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license
|
|
11
|
+
to reproduce, prepare derivative works of, publicly display, publicly
|
|
12
|
+
perform, sublicense, and distribute contributions made by its employees.
|
|
13
|
+
|
|
14
|
+
## 2. Grant of Patent License
|
|
15
|
+
|
|
16
|
+
The Corporation hereby grants the Project a perpetual, worldwide,
|
|
17
|
+
non-exclusive, no-charge, royalty-free, irrevocable patent license
|
|
18
|
+
covering patent claims necessarily infringed by the contributions.
|
|
19
|
+
|
|
20
|
+
## 3. Authority
|
|
21
|
+
|
|
22
|
+
The Corporation represents that it has the legal authority to grant
|
|
23
|
+
these licenses and that contributions are made by authorized employees.
|
|
24
|
+
|
|
25
|
+
## 4. No Warranty
|
|
26
|
+
|
|
27
|
+
Contributions are provided on an "AS IS" basis.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
Authorized Signature:
|
|
32
|
+
Name:
|
|
33
|
+
Title:
|
|
34
|
+
Organization:
|
|
35
|
+
Date:
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
We welcome contributions from the community.
|
|
4
|
+
|
|
5
|
+
## License and CLA
|
|
6
|
+
|
|
7
|
+
This project is licensed under the Apache License 2.0.
|
|
8
|
+
|
|
9
|
+
By submitting a pull request, you agree that:
|
|
10
|
+
- Your contribution is your own work or you have the right to submit it
|
|
11
|
+
- Your contribution will be licensed under Apache 2.0
|
|
12
|
+
- You agree to the Contributor License Agreement (CLA)
|
|
13
|
+
|
|
14
|
+
The CLA is a lightweight Apache-style CLA intended to protect both
|
|
15
|
+
contributors and users of the project.
|
|
16
|
+
|
|
17
|
+
If you are contributing on behalf of a company, a Corporate CLA may
|
|
18
|
+
be required.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Individual Contributor License Agreement (ICLA)
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to this project.
|
|
4
|
+
|
|
5
|
+
This Contributor License Agreement ("Agreement") is entered into between
|
|
6
|
+
you ("Contributor") and the project owner ("Project").
|
|
7
|
+
|
|
8
|
+
## 1. Grant of Copyright License
|
|
9
|
+
|
|
10
|
+
You hereby grant to the Project a perpetual, worldwide, non-exclusive,
|
|
11
|
+
no-charge, royalty-free, irrevocable copyright license to reproduce,
|
|
12
|
+
prepare derivative works of, publicly display, publicly perform,
|
|
13
|
+
sublicense, and distribute your contributions and such derivative works.
|
|
14
|
+
|
|
15
|
+
## 2. Grant of Patent License
|
|
16
|
+
|
|
17
|
+
You hereby grant to the Project a perpetual, worldwide, non-exclusive,
|
|
18
|
+
no-charge, royalty-free, irrevocable patent license to make, have made,
|
|
19
|
+
use, offer to sell, sell, import, and otherwise transfer your
|
|
20
|
+
contributions, where such license applies only to those patent claims
|
|
21
|
+
necessarily infringed by your contribution.
|
|
22
|
+
|
|
23
|
+
## 3. Authority
|
|
24
|
+
|
|
25
|
+
You represent that you are legally entitled to grant the above licenses.
|
|
26
|
+
If your employer has rights to intellectual property that you create,
|
|
27
|
+
you represent that you have received permission to make contributions
|
|
28
|
+
on behalf of that employer.
|
|
29
|
+
|
|
30
|
+
## 4. No Warranty
|
|
31
|
+
|
|
32
|
+
You provide your contributions on an "AS IS" basis, without warranties
|
|
33
|
+
or conditions of any kind.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
By submitting a contribution, you agree to the terms of this Agreement.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Build Windows
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
build-wheels:
|
|
8
|
+
name: Build wheels (${{ matrix.os }})
|
|
9
|
+
runs-on: ${{ matrix.os }}
|
|
10
|
+
timeout-minutes: 90
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [windows-latest]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out release tag
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
ref: ${{ inputs.tag_name }}
|
|
22
|
+
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.12"
|
|
26
|
+
|
|
27
|
+
- name: Set up MSVC dev tools (Windows)
|
|
28
|
+
if: runner.os == 'Windows'
|
|
29
|
+
uses: ilammy/msvc-dev-cmd@v1
|
|
30
|
+
|
|
31
|
+
- name: Build wheels
|
|
32
|
+
timeout-minutes: 75
|
|
33
|
+
run: |
|
|
34
|
+
python -m pip install -U pip cibuildwheel
|
|
35
|
+
python -m cibuildwheel --output-dir wheelhouse
|
|
36
|
+
|
|
37
|
+
- name: Upload wheels
|
|
38
|
+
uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: wheels-${{ matrix.os }}
|
|
41
|
+
path: wheelhouse/*.whl
|
|
42
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-wheels:
|
|
10
|
+
name: Build wheels (${{ matrix.os }})
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
timeout-minutes: 90
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-22.04, macos-14, windows-latest]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Check out release tag
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
ref: ${{ inputs.tag_name }}
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
|
|
29
|
+
- name: Set up MSVC dev tools (Windows)
|
|
30
|
+
if: runner.os == 'Windows'
|
|
31
|
+
uses: ilammy/msvc-dev-cmd@v1
|
|
32
|
+
|
|
33
|
+
- name: Build wheels
|
|
34
|
+
timeout-minutes: 75
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install -U pip cibuildwheel
|
|
37
|
+
python -m cibuildwheel --output-dir wheelhouse
|
|
38
|
+
|
|
39
|
+
- name: Upload wheels
|
|
40
|
+
uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: wheels-${{ matrix.os }}
|
|
43
|
+
path: wheelhouse/*.whl
|
|
44
|
+
|
|
45
|
+
build-sdist:
|
|
46
|
+
name: Build sdist
|
|
47
|
+
runs-on: ubuntu-22.04
|
|
48
|
+
steps:
|
|
49
|
+
- name: Check out release tag
|
|
50
|
+
uses: actions/checkout@v4
|
|
51
|
+
with:
|
|
52
|
+
fetch-depth: 0
|
|
53
|
+
ref: ${{ inputs.tag_name }}
|
|
54
|
+
|
|
55
|
+
- uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: "3.12"
|
|
58
|
+
|
|
59
|
+
- name: Build sdist
|
|
60
|
+
run: |
|
|
61
|
+
python -m pip install -U build
|
|
62
|
+
python -m build --sdist
|
|
63
|
+
|
|
64
|
+
- name: Upload sdist
|
|
65
|
+
uses: actions/upload-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: sdist
|
|
68
|
+
path: dist/*.tar.gz
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Build & Publish (on Release)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-wheels:
|
|
10
|
+
name: Build wheels (${{ matrix.os }})
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
timeout-minutes: 90
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-22.04, macos-14, windows-latest]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Check out release tag
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
ref: ${{ github.event.release.tag_name }}
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
|
|
29
|
+
- name: Set up MSVC dev tools (Windows)
|
|
30
|
+
if: runner.os == 'Windows'
|
|
31
|
+
uses: ilammy/msvc-dev-cmd@v1
|
|
32
|
+
|
|
33
|
+
- name: Build wheels
|
|
34
|
+
timeout-minutes: 75
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install -U pip cibuildwheel
|
|
37
|
+
python -m cibuildwheel --output-dir wheelhouse
|
|
38
|
+
|
|
39
|
+
- name: Upload wheels
|
|
40
|
+
uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: wheels-${{ matrix.os }}
|
|
43
|
+
path: wheelhouse/*.whl
|
|
44
|
+
|
|
45
|
+
build-sdist:
|
|
46
|
+
name: Build sdist
|
|
47
|
+
runs-on: ubuntu-22.04
|
|
48
|
+
steps:
|
|
49
|
+
- name: Check out release tag
|
|
50
|
+
uses: actions/checkout@v4
|
|
51
|
+
with:
|
|
52
|
+
fetch-depth: 0
|
|
53
|
+
ref: ${{ github.event.release.tag_name }}
|
|
54
|
+
|
|
55
|
+
- uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: "3.12"
|
|
58
|
+
|
|
59
|
+
- name: Build sdist
|
|
60
|
+
run: |
|
|
61
|
+
python -m pip install -U build
|
|
62
|
+
python -m build --sdist
|
|
63
|
+
|
|
64
|
+
- name: Upload sdist
|
|
65
|
+
uses: actions/upload-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: sdist
|
|
68
|
+
path: dist/*.tar.gz
|
|
69
|
+
|
|
70
|
+
publish:
|
|
71
|
+
name: Publish to PyPI
|
|
72
|
+
needs: [build-wheels, build-sdist]
|
|
73
|
+
runs-on: ubuntu-22.04
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write
|
|
76
|
+
contents: read
|
|
77
|
+
|
|
78
|
+
steps:
|
|
79
|
+
- name: Download wheels
|
|
80
|
+
uses: actions/download-artifact@v4
|
|
81
|
+
with:
|
|
82
|
+
pattern: wheels-*
|
|
83
|
+
merge-multiple: true
|
|
84
|
+
path: dist
|
|
85
|
+
|
|
86
|
+
- name: Download sdist
|
|
87
|
+
uses: actions/download-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: sdist
|
|
90
|
+
path: dist
|
|
91
|
+
|
|
92
|
+
- name: Upload to PyPI (Trusted Publisher)
|
|
93
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
94
|
+
with:
|
|
95
|
+
skip-existing: true
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-22.04
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
# Speed up installs and ensure NumPy comes from wheels
|
|
18
|
+
PIP_ONLY_BINARY: "numpy"
|
|
19
|
+
# Faster CMake builds
|
|
20
|
+
CMAKE_GENERATOR: "Ninja"
|
|
21
|
+
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0 # setuptools-scm needs tags for dynamic version
|
|
27
|
+
|
|
28
|
+
- uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Cache pip
|
|
33
|
+
uses: actions/cache@v4
|
|
34
|
+
with:
|
|
35
|
+
path: ~/.cache/pip
|
|
36
|
+
key: pip-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
|
|
37
|
+
restore-keys: |
|
|
38
|
+
pip-${{ runner.os }}-${{ matrix.python-version }}-
|
|
39
|
+
pip-${{ runner.os }}-
|
|
40
|
+
|
|
41
|
+
- name: Upgrade pip & install build tooling
|
|
42
|
+
run: |
|
|
43
|
+
python -m pip install -U pip
|
|
44
|
+
pip install -U wheel ninja
|
|
45
|
+
|
|
46
|
+
- name: Install package (editable) with dev extras
|
|
47
|
+
run: |
|
|
48
|
+
pip install -e '.[dev]'
|
|
49
|
+
|
|
50
|
+
- name: Run tests
|
|
51
|
+
run: pytest -q
|
|
52
|
+
|
|
53
|
+
- name: Type check
|
|
54
|
+
run: mypy src/disco
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
*.pyd
|
|
9
|
+
*.dll
|
|
10
|
+
*.dylib
|
|
11
|
+
|
|
12
|
+
# Native build artifacts
|
|
13
|
+
*.o
|
|
14
|
+
*.obj
|
|
15
|
+
*.a
|
|
16
|
+
*.lib
|
|
17
|
+
*.exp
|
|
18
|
+
*.pdb
|
|
19
|
+
*.pch
|
|
20
|
+
*.lo
|
|
21
|
+
*.la
|
|
22
|
+
*.mod
|
|
23
|
+
*.asm
|
|
24
|
+
*.s
|
|
25
|
+
|
|
26
|
+
# macOS / Xcode debug symbols
|
|
27
|
+
*.dSYM/
|
|
28
|
+
|
|
29
|
+
# Distribution / packaging
|
|
30
|
+
.Python
|
|
31
|
+
build/
|
|
32
|
+
develop-eggs/
|
|
33
|
+
dist/
|
|
34
|
+
downloads/
|
|
35
|
+
eggs/
|
|
36
|
+
.eggs/
|
|
37
|
+
lib/
|
|
38
|
+
lib64/
|
|
39
|
+
parts/
|
|
40
|
+
sdist/
|
|
41
|
+
var/
|
|
42
|
+
wheels/
|
|
43
|
+
share/python-wheels/
|
|
44
|
+
*.egg-info/
|
|
45
|
+
.installed.cfg
|
|
46
|
+
*.egg
|
|
47
|
+
MANIFEST
|
|
48
|
+
wheelhouse/
|
|
49
|
+
|
|
50
|
+
# scikit-build / CMake (classic & core)
|
|
51
|
+
_skbuild/
|
|
52
|
+
CMakeCache.txt
|
|
53
|
+
CMakeFiles/
|
|
54
|
+
cmake-build-*/
|
|
55
|
+
CMakeUserPresets.json
|
|
56
|
+
CMakeScripts/
|
|
57
|
+
Makefile
|
|
58
|
+
cmake_install.cmake
|
|
59
|
+
install_manifest.txt
|
|
60
|
+
|
|
61
|
+
# PyInstaller
|
|
62
|
+
*.manifest
|
|
63
|
+
*.spec
|
|
64
|
+
|
|
65
|
+
# Installer logs
|
|
66
|
+
pip-log.txt
|
|
67
|
+
pip-delete-this-directory.txt
|
|
68
|
+
|
|
69
|
+
# Unit test / coverage reports
|
|
70
|
+
htmlcov/
|
|
71
|
+
.tox/
|
|
72
|
+
.nox/
|
|
73
|
+
.coverage
|
|
74
|
+
.coverage.*
|
|
75
|
+
.cache
|
|
76
|
+
nosetests.xml
|
|
77
|
+
coverage.xml
|
|
78
|
+
*.cover
|
|
79
|
+
*.py.cover
|
|
80
|
+
.hypothesis/
|
|
81
|
+
.pytest_cache/
|
|
82
|
+
cover/
|
|
83
|
+
# C/C++ coverage
|
|
84
|
+
*.gcda
|
|
85
|
+
*.gcno
|
|
86
|
+
*.gcov
|
|
87
|
+
|
|
88
|
+
# Translations
|
|
89
|
+
*.mo
|
|
90
|
+
*.pot
|
|
91
|
+
|
|
92
|
+
# Django stuff:
|
|
93
|
+
*.log
|
|
94
|
+
local_settings.py
|
|
95
|
+
db.sqlite3
|
|
96
|
+
db.sqlite3-journal
|
|
97
|
+
|
|
98
|
+
# Flask stuff:
|
|
99
|
+
instance/
|
|
100
|
+
.webassets-cache
|
|
101
|
+
|
|
102
|
+
# Scrapy stuff:
|
|
103
|
+
.scrapy
|
|
104
|
+
|
|
105
|
+
# Sphinx documentation
|
|
106
|
+
docs/_build/
|
|
107
|
+
|
|
108
|
+
# PyBuilder
|
|
109
|
+
.pybuilder/
|
|
110
|
+
target/
|
|
111
|
+
|
|
112
|
+
# Jupyter Notebook
|
|
113
|
+
.ipynb_checkpoints
|
|
114
|
+
|
|
115
|
+
# IPython
|
|
116
|
+
profile_default/
|
|
117
|
+
ipython_config.py
|
|
118
|
+
|
|
119
|
+
# pyenv
|
|
120
|
+
# .python-version
|
|
121
|
+
|
|
122
|
+
# pipenv
|
|
123
|
+
#Pipfile.lock
|
|
124
|
+
|
|
125
|
+
# UV
|
|
126
|
+
#uv.lock
|
|
127
|
+
|
|
128
|
+
# poetry
|
|
129
|
+
#poetry.lock
|
|
130
|
+
#poetry.toml
|
|
131
|
+
|
|
132
|
+
# pdm
|
|
133
|
+
#pdm.lock
|
|
134
|
+
#pdm.toml
|
|
135
|
+
.pdm-python
|
|
136
|
+
.pdm-build/
|
|
137
|
+
|
|
138
|
+
# pixi
|
|
139
|
+
#pixi.lock
|
|
140
|
+
.pixi
|
|
141
|
+
|
|
142
|
+
# PEP 582
|
|
143
|
+
__pypackages__/
|
|
144
|
+
|
|
145
|
+
# Celery stuff
|
|
146
|
+
celerybeat-schedule
|
|
147
|
+
celerybeat.pid
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
.venv-*
|
|
157
|
+
env/
|
|
158
|
+
venv/
|
|
159
|
+
ENV/
|
|
160
|
+
env.bak/
|
|
161
|
+
venv.bak/
|
|
162
|
+
|
|
163
|
+
# Spyder project settings
|
|
164
|
+
.spyderproject
|
|
165
|
+
.spyproject
|
|
166
|
+
|
|
167
|
+
# Rope project settings
|
|
168
|
+
.ropeproject
|
|
169
|
+
|
|
170
|
+
# mkdocs documentation
|
|
171
|
+
/site
|
|
172
|
+
|
|
173
|
+
# mypy
|
|
174
|
+
.mypy_cache/
|
|
175
|
+
.dmypy.json
|
|
176
|
+
dmypy.json
|
|
177
|
+
|
|
178
|
+
# Pyre type checker
|
|
179
|
+
.pyre/
|
|
180
|
+
|
|
181
|
+
# pytype static type analyzer
|
|
182
|
+
.pytype/
|
|
183
|
+
|
|
184
|
+
# Cython debug symbols
|
|
185
|
+
cython_debug/
|
|
186
|
+
|
|
187
|
+
# PyCharm / JetBrains (keep project-specific files if you prefer)
|
|
188
|
+
# See: https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
.idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
.abstra/
|
|
193
|
+
|
|
194
|
+
# Visual Studio Code
|
|
195
|
+
# .vscode/
|
|
196
|
+
|
|
197
|
+
# Ruff
|
|
198
|
+
.ruff_cache/
|
|
199
|
+
|
|
200
|
+
# PyPI configuration
|
|
201
|
+
.pypirc
|
|
202
|
+
|
|
203
|
+
# Cursor
|
|
204
|
+
.cursorignore
|
|
205
|
+
.cursorindexingignore
|
|
206
|
+
|
|
207
|
+
# Marimo
|
|
208
|
+
marimo/_static/
|
|
209
|
+
marimo/_lsp/
|
|
210
|
+
__marimo__/
|
|
211
|
+
|
|
212
|
+
# OS cruft
|
|
213
|
+
.DS_Store
|
|
214
|
+
Thumbs.db
|
|
215
|
+
Icon?
|
|
216
|
+
|
|
217
|
+
# setuptools-scm generated version file
|
|
218
|
+
src/disco/_version.py
|
|
219
|
+
|
|
220
|
+
# tmp segments generated in tests
|
|
221
|
+
tmp_segments/
|
|
222
|
+
|
|
223
|
+
# local scripts not to include
|
|
224
|
+
scripts/
|
|
225
|
+
|
|
226
|
+
# local development environment
|
|
227
|
+
/docker-compose.yaml
|
|
228
|
+
/local_tests
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# CMakeLists.txt
|
|
2
|
+
cmake_minimum_required(VERSION 3.18)
|
|
3
|
+
project(disco LANGUAGES CXX C)
|
|
4
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
7
|
+
|
|
8
|
+
# ── macOS minimum deployment target ───────────────────────────────────────────
|
|
9
|
+
# std::variant (used in Headers) requires macOS 10.14+; 10.15 is a safe baseline.
|
|
10
|
+
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
|
11
|
+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum macOS deployment version")
|
|
12
|
+
endif()
|
|
13
|
+
|
|
14
|
+
# ── Shared toolchain setup ────────────────────────────────────────────────────
|
|
15
|
+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
|
|
16
|
+
|
|
17
|
+
execute_process(
|
|
18
|
+
COMMAND "${Python_EXECUTABLE}" -c "import numpy; print(numpy.get_include())"
|
|
19
|
+
OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
|
|
20
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
21
|
+
RESULT_VARIABLE _numpy_missing
|
|
22
|
+
)
|
|
23
|
+
if(_numpy_missing)
|
|
24
|
+
message(FATAL_ERROR "NumPy not found — add numpy to build-system.requires")
|
|
25
|
+
endif()
|
|
26
|
+
message(STATUS "NumPy include dir: ${NUMPY_INCLUDE_DIR}")
|
|
27
|
+
|
|
28
|
+
find_package(pybind11 CONFIG QUIET)
|
|
29
|
+
if(NOT pybind11_FOUND)
|
|
30
|
+
include(FetchContent)
|
|
31
|
+
# Use a URL tarball instead of GIT_REPOSITORY so that CMAKE_DOWNLOAD_TIMEOUT
|
|
32
|
+
# (set in pyproject.toml) applies and git is not required at build time.
|
|
33
|
+
FetchContent_Declare(pybind11
|
|
34
|
+
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.12.0.tar.gz
|
|
35
|
+
URL_HASH SHA256=bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7
|
|
36
|
+
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
|
|
37
|
+
)
|
|
38
|
+
FetchContent_MakeAvailable(pybind11)
|
|
39
|
+
endif()
|
|
40
|
+
|
|
41
|
+
find_program(CYTHON_EXECUTABLE NAMES cython cython3 REQUIRED)
|
|
42
|
+
|
|
43
|
+
find_package(OpenMP COMPONENTS C)
|
|
44
|
+
if(OpenMP_C_FOUND)
|
|
45
|
+
message(STATUS "OpenMP found — Cython prange targets will be parallel")
|
|
46
|
+
else()
|
|
47
|
+
message(WARNING "OpenMP not found — Cython targets will be single-threaded")
|
|
48
|
+
endif()
|
|
49
|
+
|
|
50
|
+
# ── Shared macros ─────────────────────────────────────────────────────────────
|
|
51
|
+
include(cmake/extension_helpers.cmake)
|
|
52
|
+
|
|
53
|
+
# ── Subpackages ───────────────────────────────────────────────────────────────
|
|
54
|
+
add_subdirectory(src/disco/event_queue)
|
|
55
|
+
# add_subdirectory(src/toolbox/future_package) ← one line to add a new one
|