omle 0.1.0rc1__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.
- omle-0.1.0rc1/.github/workflows/publish.yml +207 -0
- omle-0.1.0rc1/.github/workflows/test.yml +31 -0
- omle-0.1.0rc1/.gitignore +212 -0
- omle-0.1.0rc1/.pre-commit-config.yaml +59 -0
- omle-0.1.0rc1/CODE_OF_CONDUCT.md +69 -0
- omle-0.1.0rc1/CONTRIBUTING.md +205 -0
- omle-0.1.0rc1/LICENSE +201 -0
- omle-0.1.0rc1/PKG-INFO +222 -0
- omle-0.1.0rc1/README.md +176 -0
- omle-0.1.0rc1/docs/README.md +24 -0
- omle-0.1.0rc1/docs/functions/omle.functions.md +1780 -0
- omle-0.1.0rc1/docs/operators/omle.core.md +958 -0
- omle-0.1.0rc1/docs/operators/omle.feature.md +1530 -0
- omle-0.1.0rc1/docs/operators/omle.ml.md +406 -0
- omle-0.1.0rc1/docs/operators/omle.text.md +524 -0
- omle-0.1.0rc1/protobuf/omle.proto +3289 -0
- omle-0.1.0rc1/pyproject.toml +120 -0
- omle-0.1.0rc1/registries/functions/functions.json +57 -0
- omle-0.1.0rc1/registries/functions/namespaces/omle.functions.json +1085 -0
- omle-0.1.0rc1/registries/functions/schema/functions.namespace.schema.json +6 -0
- omle-0.1.0rc1/registries/functions/schema/functions.schema.json +264 -0
- omle-0.1.0rc1/registries/operators/namespaces/omle.core.json +1049 -0
- omle-0.1.0rc1/registries/operators/namespaces/omle.feature.json +1932 -0
- omle-0.1.0rc1/registries/operators/namespaces/omle.ml.json +539 -0
- omle-0.1.0rc1/registries/operators/namespaces/omle.text.json +667 -0
- omle-0.1.0rc1/registries/operators/operators.json +77 -0
- omle-0.1.0rc1/registries/operators/schema/operators.namespace.schema.json +6 -0
- omle-0.1.0rc1/registries/operators/schema/operators.schema.json +361 -0
- omle-0.1.0rc1/scripts/gen_proto.sh +21 -0
- omle-0.1.0rc1/setup.cfg +4 -0
- omle-0.1.0rc1/setup.py +139 -0
- omle-0.1.0rc1/spec/README.md +55 -0
- omle-0.1.0rc1/spec/composite-scoping.md +370 -0
- omle-0.1.0rc1/spec/validation-rules.md +418 -0
- omle-0.1.0rc1/src/omle/__init__.py +248 -0
- omle-0.1.0rc1/src/omle/_version.py +24 -0
- omle-0.1.0rc1/src/omle/cli.py +654 -0
- omle-0.1.0rc1/src/omle/io.py +133 -0
- omle-0.1.0rc1/src/omle/ir/__init__.py +140 -0
- omle-0.1.0rc1/src/omle/ir/_util.py +79 -0
- omle-0.1.0rc1/src/omle/ir/bodies.py +562 -0
- omle-0.1.0rc1/src/omle/ir/domain.py +102 -0
- omle-0.1.0rc1/src/omle/ir/enums.py +220 -0
- omle-0.1.0rc1/src/omle/ir/expression.py +69 -0
- omle-0.1.0rc1/src/omle/ir/function.py +58 -0
- omle-0.1.0rc1/src/omle/ir/interface.py +84 -0
- omle-0.1.0rc1/src/omle/ir/metadata.py +80 -0
- omle-0.1.0rc1/src/omle/ir/model.py +109 -0
- omle-0.1.0rc1/src/omle/ir/node.py +268 -0
- omle-0.1.0rc1/src/omle/ir/predicate.py +164 -0
- omle-0.1.0rc1/src/omle/ir/schema.py +152 -0
- omle-0.1.0rc1/src/omle/ir/tensor.py +208 -0
- omle-0.1.0rc1/src/omle/ir/types.py +203 -0
- omle-0.1.0rc1/src/omle/ir/verification.py +131 -0
- omle-0.1.0rc1/src/omle/proto/__init__.py +11 -0
- omle-0.1.0rc1/src/omle/proto/convert.py +693 -0
- omle-0.1.0rc1/src/omle/registry.py +282 -0
- omle-0.1.0rc1/src/omle/validation.py +727 -0
- omle-0.1.0rc1/src/omle.egg-info/PKG-INFO +222 -0
- omle-0.1.0rc1/src/omle.egg-info/SOURCES.txt +74 -0
- omle-0.1.0rc1/src/omle.egg-info/dependency_links.txt +1 -0
- omle-0.1.0rc1/src/omle.egg-info/entry_points.txt +2 -0
- omle-0.1.0rc1/src/omle.egg-info/requires.txt +25 -0
- omle-0.1.0rc1/src/omle.egg-info/scm_file_list.json +69 -0
- omle-0.1.0rc1/src/omle.egg-info/scm_version.json +8 -0
- omle-0.1.0rc1/src/omle.egg-info/top_level.txt +1 -0
- omle-0.1.0rc1/tests/__init__.py +0 -0
- omle-0.1.0rc1/tests/conftest.py +17 -0
- omle-0.1.0rc1/tests/test_cli.py +314 -0
- omle-0.1.0rc1/tests/test_ir.py +360 -0
- omle-0.1.0rc1/tests/test_proto_convert.py +355 -0
- omle-0.1.0rc1/tests/test_registry_validation.py +875 -0
- omle-0.1.0rc1/tests/test_validation.py +411 -0
- omle-0.1.0rc1/tools/check_docs_current.py +66 -0
- omle-0.1.0rc1/tools/gen_docs.py +492 -0
- omle-0.1.0rc1/tools/validate_registry.py +492 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
# Publishes omle to PyPI.
|
|
4
|
+
#
|
|
5
|
+
# Two ways to run:
|
|
6
|
+
# 1. Push a version tag → builds, verifies, publishes to PyPI.
|
|
7
|
+
# git tag v0.1.0 && git push origin v0.1.0
|
|
8
|
+
# 2. Run manually → builds, verifies, publishes to TestPyPI
|
|
9
|
+
# (Actions → Publish → Run workflow)
|
|
10
|
+
#
|
|
11
|
+
# Authentication uses PyPI Trusted Publishing (OIDC) — no API tokens or
|
|
12
|
+
# secrets. Before the first run, register this workflow as a trusted publisher:
|
|
13
|
+
# PyPI: https://pypi.org/manage/account/publishing/
|
|
14
|
+
# TestPyPI: https://test.pypi.org/manage/account/publishing/
|
|
15
|
+
# with owner "omle", repository "omle", workflow "publish.yml", and
|
|
16
|
+
# environment "pypi" / "testpypi" respectively.
|
|
17
|
+
|
|
18
|
+
on:
|
|
19
|
+
push:
|
|
20
|
+
tags: ["v*"]
|
|
21
|
+
workflow_dispatch:
|
|
22
|
+
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
name: Build distributions
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4.2.2
|
|
32
|
+
with:
|
|
33
|
+
# setuptools-scm derives the version from git tags — a shallow
|
|
34
|
+
# checkout yields 0.0.x or a dev version with a local segment.
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
|
|
37
|
+
- name: Set up Python
|
|
38
|
+
uses: actions/setup-python@v5.6.0
|
|
39
|
+
with:
|
|
40
|
+
python-version: "3.12"
|
|
41
|
+
|
|
42
|
+
- name: Install build tooling
|
|
43
|
+
run: pip install build twine
|
|
44
|
+
|
|
45
|
+
- name: Build sdist and wheel
|
|
46
|
+
run: |
|
|
47
|
+
rm -rf build dist
|
|
48
|
+
python -m build
|
|
49
|
+
|
|
50
|
+
- name: Check metadata
|
|
51
|
+
run: twine check dist/*
|
|
52
|
+
|
|
53
|
+
- name: Reject versions PyPI will not accept
|
|
54
|
+
run: |
|
|
55
|
+
python - <<'PY'
|
|
56
|
+
import glob
|
|
57
|
+
import os
|
|
58
|
+
import sys
|
|
59
|
+
|
|
60
|
+
wheels = glob.glob("dist/*.whl")
|
|
61
|
+
if len(wheels) != 1:
|
|
62
|
+
sys.exit(f"::error::Expected exactly one wheel in dist/, found {wheels}")
|
|
63
|
+
|
|
64
|
+
# Wheel filenames are {name}-{version}-{python}-{abi}-{platform}.whl;
|
|
65
|
+
# parse the basename so a '-' in the workspace path cannot shift fields.
|
|
66
|
+
version = os.path.basename(wheels[0]).split("-")[1]
|
|
67
|
+
print(f"Built version: {version}")
|
|
68
|
+
|
|
69
|
+
if "+" in version:
|
|
70
|
+
print(
|
|
71
|
+
f"::error::Version '{version}' carries a local segment, which PyPI "
|
|
72
|
+
"rejects. Publish from a checkout of a version tag (e.g. git tag v0.1.0)."
|
|
73
|
+
)
|
|
74
|
+
sys.exit(1)
|
|
75
|
+
PY
|
|
76
|
+
|
|
77
|
+
- name: Verify the wheel bundles the registries
|
|
78
|
+
run: |
|
|
79
|
+
for f in omle/registry/operators.json omle/registry/functions.json; do
|
|
80
|
+
if ! unzip -l dist/*.whl | grep -q "$f"; then
|
|
81
|
+
echo "::error::$f is missing from the wheel — the registry merge in setup.py did not run."
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
done
|
|
85
|
+
|
|
86
|
+
- uses: actions/upload-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: dist
|
|
89
|
+
path: dist/
|
|
90
|
+
|
|
91
|
+
verify:
|
|
92
|
+
name: Verify install (${{ matrix.python-version }})
|
|
93
|
+
needs: build
|
|
94
|
+
runs-on: ubuntu-latest
|
|
95
|
+
strategy:
|
|
96
|
+
matrix:
|
|
97
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
98
|
+
steps:
|
|
99
|
+
- uses: actions/checkout@v4.2.2
|
|
100
|
+
|
|
101
|
+
- uses: actions/download-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: dist
|
|
104
|
+
path: dist/
|
|
105
|
+
|
|
106
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
107
|
+
uses: actions/setup-python@v5.6.0
|
|
108
|
+
with:
|
|
109
|
+
python-version: ${{ matrix.python-version }}
|
|
110
|
+
|
|
111
|
+
- name: Install the built wheel
|
|
112
|
+
run: pip install pytest dist/*.whl
|
|
113
|
+
|
|
114
|
+
- name: Run the test suite against the installed wheel
|
|
115
|
+
# -o pythonpath= drops the src/ entry from pyproject.toml so the tests
|
|
116
|
+
# exercise the wheel that is about to be published, not the checkout.
|
|
117
|
+
run: |
|
|
118
|
+
python -c "import omle; print('testing:', omle.__file__)"
|
|
119
|
+
pytest tests/ -o pythonpath=
|
|
120
|
+
|
|
121
|
+
- name: Smoke-test the installed package
|
|
122
|
+
# Run from a scratch directory so the repo checkout cannot satisfy
|
|
123
|
+
# imports or the registry source fallback.
|
|
124
|
+
run: |
|
|
125
|
+
mkdir -p /tmp/smoke && cd /tmp/smoke
|
|
126
|
+
python - <<'PY'
|
|
127
|
+
import tempfile
|
|
128
|
+
|
|
129
|
+
import omle
|
|
130
|
+
from omle.registry import get_operator_registry, get_function_registry
|
|
131
|
+
|
|
132
|
+
print("version:", omle.__version__)
|
|
133
|
+
|
|
134
|
+
ops = get_operator_registry()
|
|
135
|
+
fns = get_function_registry()
|
|
136
|
+
print("registries loaded from the installed package")
|
|
137
|
+
|
|
138
|
+
model = omle.OMLEModel(metadata=omle.ModelMetadata(name="smoke"))
|
|
139
|
+
path = tempfile.mktemp(suffix=".omle")
|
|
140
|
+
omle.save(model, path)
|
|
141
|
+
assert omle.load(path).metadata.name == "smoke"
|
|
142
|
+
print("protobuf round-trip ok")
|
|
143
|
+
PY
|
|
144
|
+
omle --version
|
|
145
|
+
|
|
146
|
+
publish-testpypi:
|
|
147
|
+
name: Publish to TestPyPI
|
|
148
|
+
if: github.event_name == 'workflow_dispatch'
|
|
149
|
+
needs: verify
|
|
150
|
+
runs-on: ubuntu-latest
|
|
151
|
+
environment:
|
|
152
|
+
name: testpypi
|
|
153
|
+
url: https://test.pypi.org/p/omle
|
|
154
|
+
permissions:
|
|
155
|
+
id-token: write
|
|
156
|
+
steps:
|
|
157
|
+
- uses: actions/download-artifact@v4
|
|
158
|
+
with:
|
|
159
|
+
name: dist
|
|
160
|
+
path: dist/
|
|
161
|
+
|
|
162
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
163
|
+
with:
|
|
164
|
+
repository-url: https://test.pypi.org/legacy/
|
|
165
|
+
# TestPyPI often already holds a build of this version from an
|
|
166
|
+
# earlier dry run; don't fail the workflow over it.
|
|
167
|
+
skip-existing: true
|
|
168
|
+
|
|
169
|
+
publish-pypi:
|
|
170
|
+
name: Publish to PyPI
|
|
171
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
172
|
+
needs: verify
|
|
173
|
+
runs-on: ubuntu-latest
|
|
174
|
+
environment:
|
|
175
|
+
name: pypi
|
|
176
|
+
url: https://pypi.org/p/omle
|
|
177
|
+
permissions:
|
|
178
|
+
id-token: write
|
|
179
|
+
steps:
|
|
180
|
+
- uses: actions/download-artifact@v4
|
|
181
|
+
with:
|
|
182
|
+
name: dist
|
|
183
|
+
path: dist/
|
|
184
|
+
|
|
185
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
186
|
+
|
|
187
|
+
github-release:
|
|
188
|
+
name: Attach artifacts to the GitHub release
|
|
189
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
190
|
+
needs: publish-pypi
|
|
191
|
+
runs-on: ubuntu-latest
|
|
192
|
+
permissions:
|
|
193
|
+
contents: write
|
|
194
|
+
steps:
|
|
195
|
+
- uses: actions/download-artifact@v4
|
|
196
|
+
with:
|
|
197
|
+
name: dist
|
|
198
|
+
path: dist/
|
|
199
|
+
|
|
200
|
+
- name: Create the release
|
|
201
|
+
env:
|
|
202
|
+
GH_TOKEN: ${{ github.token }}
|
|
203
|
+
run: |
|
|
204
|
+
gh release create "${GITHUB_REF_NAME}" dist/* \
|
|
205
|
+
--repo "${GITHUB_REPOSITORY}" \
|
|
206
|
+
--title "${GITHUB_REF_NAME}" \
|
|
207
|
+
--generate-notes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["**"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4.2.2
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v5.6.0
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install package with dev dependencies
|
|
25
|
+
run: pip install -e ".[dev]"
|
|
26
|
+
|
|
27
|
+
- name: Lint
|
|
28
|
+
run: ruff check .
|
|
29
|
+
|
|
30
|
+
- name: Run tests
|
|
31
|
+
run: pytest tests/
|
omle-0.1.0rc1/.gitignore
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
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
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
# Custom
|
|
210
|
+
/src/omle/proto/omle_pb2.py
|
|
211
|
+
**/.DS_Store
|
|
212
|
+
/src/omle/_version.py
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Optional but recommended:
|
|
2
|
+
# pip install pre-commit && pre-commit install
|
|
3
|
+
#
|
|
4
|
+
# The local hooks below run with `language: system`, so they use whatever Python
|
|
5
|
+
# is on PATH — activate the dev environment first (see CONTRIBUTING.md).
|
|
6
|
+
#
|
|
7
|
+
# Deliberately absent: an autoformatter. `ruff check` enforces the Google Python
|
|
8
|
+
# Style Guide rules listed in pyproject.toml, but `ruff format` would rewrite the
|
|
9
|
+
# manual alignment this codebase uses (aligned dict values, section dividers).
|
|
10
|
+
# Adopting a formatter is a reasonable decision, but a separate one.
|
|
11
|
+
|
|
12
|
+
exclude: '^(docs/|src/omle/proto/omle_pb2\.py)'
|
|
13
|
+
|
|
14
|
+
repos:
|
|
15
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
16
|
+
rev: v5.0.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: trailing-whitespace
|
|
19
|
+
- id: end-of-file-fixer
|
|
20
|
+
- id: check-merge-conflict
|
|
21
|
+
- id: check-case-conflict
|
|
22
|
+
- id: check-yaml
|
|
23
|
+
- id: check-json
|
|
24
|
+
- id: check-added-large-files
|
|
25
|
+
args: [--maxkb=1024]
|
|
26
|
+
|
|
27
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
28
|
+
rev: v0.16.7
|
|
29
|
+
hooks:
|
|
30
|
+
- id: ruff-check
|
|
31
|
+
args: [--fix]
|
|
32
|
+
|
|
33
|
+
- repo: local
|
|
34
|
+
hooks:
|
|
35
|
+
# The registries are the spec. Catch a malformed operator entry here
|
|
36
|
+
# rather than at build time.
|
|
37
|
+
- id: validate-registry
|
|
38
|
+
name: validate operator and function registries
|
|
39
|
+
entry: python tools/validate_registry.py
|
|
40
|
+
language: system
|
|
41
|
+
pass_filenames: false
|
|
42
|
+
files: ^registries/
|
|
43
|
+
|
|
44
|
+
# docs/ is generated from the registries and checked in. It has drifted
|
|
45
|
+
# before; this keeps the published reference honest.
|
|
46
|
+
- id: registry-docs-current
|
|
47
|
+
name: docs/ regenerated from registries
|
|
48
|
+
entry: python tools/check_docs_current.py
|
|
49
|
+
language: system
|
|
50
|
+
pass_filenames: false
|
|
51
|
+
files: ^(registries/|tools/gen_docs\.py)
|
|
52
|
+
|
|
53
|
+
# The suite runs in well under a second, so it is cheap to gate on.
|
|
54
|
+
- id: pytest
|
|
55
|
+
name: pytest
|
|
56
|
+
entry: pytest tests/ -q
|
|
57
|
+
language: system
|
|
58
|
+
pass_filenames: false
|
|
59
|
+
types: [python]
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Attribution
|
|
60
|
+
|
|
61
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
62
|
+
version 2.1, available at
|
|
63
|
+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
|
|
64
|
+
|
|
65
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
66
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
67
|
+
https://www.contributor-covenant.org/translations.
|
|
68
|
+
|
|
69
|
+
[homepage]: https://www.contributor-covenant.org
|