sega 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.
- sega-0.1.0/.gitignore +10 -0
- sega-0.1.0/.gitlab-ci.yml +78 -0
- sega-0.1.0/CHANGELOG.md +10 -0
- sega-0.1.0/Dockerfile +39 -0
- sega-0.1.0/LICENSE +704 -0
- sega-0.1.0/Makefile +42 -0
- sega-0.1.0/PKG-INFO +235 -0
- sega-0.1.0/README.md +164 -0
- sega-0.1.0/docs/gen_ref_nav.py +58 -0
- sega-0.1.0/docs/index.md +1 -0
- sega-0.1.0/docs/tutorials/getting-started.md +159 -0
- sega-0.1.0/docs/user/cli.md +147 -0
- sega-0.1.0/docs/user/conditions.md +262 -0
- sega-0.1.0/docs/user/configuration.md +217 -0
- sega-0.1.0/docs/user/index.md +50 -0
- sega-0.1.0/mkdocs.yml +67 -0
- sega-0.1.0/pyproject.toml +220 -0
- sega-0.1.0/src/sega/__init__.py +8 -0
- sega-0.1.0/src/sega/_version.py +24 -0
- sega-0.1.0/src/sega/builder.py +382 -0
- sega-0.1.0/src/sega/cli.py +362 -0
- sega-0.1.0/src/sega/conditions/__init__.py +8 -0
- sega-0.1.0/src/sega/conditions/aggregate_check.py +131 -0
- sega-0.1.0/src/sega/conditions/bit_check.py +82 -0
- sega-0.1.0/src/sega/conditions/match_mode.py +59 -0
- sega-0.1.0/src/sega/conditions/parity_check.py +65 -0
- sega-0.1.0/src/sega/conditions/sample_check.py +95 -0
- sega-0.1.0/src/sega/config.py +423 -0
- sega-0.1.0/src/sega/dqsegdb.py +233 -0
- sega-0.1.0/src/sega/expr.py +80 -0
- sega-0.1.0/src/sega/py.typed +0 -0
- sega-0.1.0/src/sega/sinks/__init__.py +7 -0
- sega-0.1.0/src/sega/sinks/dqsegdb_sink.py +158 -0
- sega-0.1.0/src/sega/tests/__init__.py +0 -0
- sega-0.1.0/src/sega/tests/test_aggregate_check.py +255 -0
- sega-0.1.0/src/sega/tests/test_bit_check.py +168 -0
- sega-0.1.0/src/sega/tests/test_builder.py +278 -0
- sega-0.1.0/src/sega/tests/test_config.py +634 -0
- sega-0.1.0/src/sega/tests/test_dqsegdb.py +195 -0
- sega-0.1.0/src/sega/tests/test_dqsegdb_sink.py +185 -0
- sega-0.1.0/src/sega/tests/test_expr.py +70 -0
- sega-0.1.0/src/sega/tests/test_match_mode.py +69 -0
- sega-0.1.0/src/sega/tests/test_parity_check.py +117 -0
- sega-0.1.0/src/sega/tests/test_sample_check.py +190 -0
- sega-0.1.0/uv.lock +3156 -0
sega-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
include:
|
|
2
|
+
# -- python
|
|
3
|
+
- component: git.ligo.org/computing/gitlab/components/python/sdist@1
|
|
4
|
+
- component: git.ligo.org/computing/gitlab/components/python/wheel@1
|
|
5
|
+
- component: git.ligo.org/computing/gitlab/components/python/code-quality@1
|
|
6
|
+
inputs:
|
|
7
|
+
analyzer: "ruff"
|
|
8
|
+
requirements: "-r requirements-lint.txt"
|
|
9
|
+
- component: git.ligo.org/computing/gitlab/components/python/dependency-scanning@1
|
|
10
|
+
- component: git.ligo.org/computing/gitlab/components/python/type-checking@1
|
|
11
|
+
inputs:
|
|
12
|
+
project_dir: "src"
|
|
13
|
+
- component: git.ligo.org/computing/gitlab/components/python/test@1
|
|
14
|
+
inputs:
|
|
15
|
+
install_extra: test
|
|
16
|
+
python_versions:
|
|
17
|
+
- "3.11"
|
|
18
|
+
- "3.12"
|
|
19
|
+
- "3.13"
|
|
20
|
+
# -- docker
|
|
21
|
+
- component: git.ligo.org/computing/gitlab/components/docker/build@1
|
|
22
|
+
inputs:
|
|
23
|
+
image_tag: $CI_COMMIT_SHA
|
|
24
|
+
- component: git.ligo.org/computing/gitlab/components/docker/push@1
|
|
25
|
+
inputs:
|
|
26
|
+
pull_image_tag: $CI_COMMIT_SHA
|
|
27
|
+
push_image_tag: $CI_COMMIT_REF_NAME
|
|
28
|
+
push_when: "all"
|
|
29
|
+
tag_latest: false
|
|
30
|
+
rules:
|
|
31
|
+
- if: $CI_COMMIT_BRANCH
|
|
32
|
+
- if: $CI_COMMIT_TAG !~ /^(\d+\.)?(\d+\.)?(\*|\d+)$/
|
|
33
|
+
- component: git.ligo.org/computing/gitlab/components/docker/push@1
|
|
34
|
+
inputs:
|
|
35
|
+
pull_image_tag: $CI_COMMIT_SHA
|
|
36
|
+
push_image_tag: $CI_COMMIT_TAG
|
|
37
|
+
push_when: "tags"
|
|
38
|
+
tag_latest: true
|
|
39
|
+
rules:
|
|
40
|
+
# tag latest only on new versions
|
|
41
|
+
- if: $CI_COMMIT_TAG =~ /^(\d+\.)?(\d+\.)?(\*|\d+)$/
|
|
42
|
+
# -- docs
|
|
43
|
+
- component: git.ligo.org/computing/gitlab/components/mkdocs/build@1
|
|
44
|
+
inputs:
|
|
45
|
+
requirements: "-r requirements-docs.txt"
|
|
46
|
+
- component: git.ligo.org/computing/gitlab/components/mkdocs/pages@1
|
|
47
|
+
inputs:
|
|
48
|
+
pages_when: "default"
|
|
49
|
+
|
|
50
|
+
# -- customizations
|
|
51
|
+
docker_push_gitlab:
|
|
52
|
+
rules:
|
|
53
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
54
|
+
when: never
|
|
55
|
+
- when: always
|
|
56
|
+
|
|
57
|
+
ruff:
|
|
58
|
+
needs:
|
|
59
|
+
- requirements
|
|
60
|
+
|
|
61
|
+
mkdocs:
|
|
62
|
+
needs:
|
|
63
|
+
- requirements
|
|
64
|
+
|
|
65
|
+
# -- requirements
|
|
66
|
+
requirements:
|
|
67
|
+
stage: build
|
|
68
|
+
image: python:3.12
|
|
69
|
+
script:
|
|
70
|
+
- python -m pip install pipx
|
|
71
|
+
- pipx ensurepath
|
|
72
|
+
- source ~/.bashrc
|
|
73
|
+
- pipx install hatch
|
|
74
|
+
- hatch dep show requirements --feature docs > requirements-docs.txt
|
|
75
|
+
- hatch dep show requirements --feature lint > requirements-lint.txt
|
|
76
|
+
artifacts:
|
|
77
|
+
paths:
|
|
78
|
+
- requirements-*.txt
|
sega-0.1.0/CHANGELOG.md
ADDED
sega-0.1.0/Dockerfile
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# build stage: export locked dependencies
|
|
2
|
+
FROM ghcr.io/astral-sh/uv:0.8-python3.13-bookworm AS build
|
|
3
|
+
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
RUN apt-get update && apt-get install -y --no-install-recommends git && \
|
|
6
|
+
rm -rf /var/lib/apt/lists/*
|
|
7
|
+
|
|
8
|
+
COPY . .
|
|
9
|
+
|
|
10
|
+
RUN uv export --no-editable --no-emit-project --locked \
|
|
11
|
+
--format requirements.txt -o requirements.txt
|
|
12
|
+
RUN uv build --wheel
|
|
13
|
+
|
|
14
|
+
# install stage: install dependencies into virtualenv
|
|
15
|
+
FROM python:3.13 AS install
|
|
16
|
+
|
|
17
|
+
WORKDIR /app
|
|
18
|
+
COPY --from=build /app/requirements.txt /app
|
|
19
|
+
COPY --from=build /app/dist/*.whl /app
|
|
20
|
+
|
|
21
|
+
RUN python -m venv /opt/venv
|
|
22
|
+
ENV PATH="/opt/venv/bin:$PATH"
|
|
23
|
+
|
|
24
|
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
25
|
+
RUN pip install --no-cache-dir --no-deps *.whl
|
|
26
|
+
|
|
27
|
+
# final stage: minimal runtime image
|
|
28
|
+
FROM python:3.13-slim
|
|
29
|
+
|
|
30
|
+
COPY --from=install /opt/venv /opt/venv
|
|
31
|
+
|
|
32
|
+
RUN groupadd --gid 1000 sega && \
|
|
33
|
+
useradd --uid 1000 --gid 1000 -m sega
|
|
34
|
+
|
|
35
|
+
USER sega
|
|
36
|
+
|
|
37
|
+
ENV PATH="/opt/venv/bin:$PATH"
|
|
38
|
+
|
|
39
|
+
ENTRYPOINT ["sega"]
|