Skip to content

Commit 8023769

Browse files
authored
Merge branch 'main' into fix/502-ver-validation-spec
2 parents 0b5fd61 + b421ea7 commit 8023769

File tree

135 files changed

+6375
-1895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+6375
-1895
lines changed

.config/dictionaries/project.dic

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ adminer
88
admon
99
anypolicy
1010
apskhem
11+
asat
1112
Arissara
1213
asyncio
1314
Attributes
@@ -33,6 +34,7 @@ Cabe
3334
cantopen
3435
cardano
3536
carryforward
37+
catid
3638
CBOR
3739
cbork
3840
cddlc
@@ -52,6 +54,7 @@ ciphertexts
5254
Coap
5355
codegen
5456
codepoints
57+
Collab
5558
connexa
5659
coti
5760
coverallsapp
@@ -250,13 +253,15 @@ pubk
250253
pubkey
251254
publickey
252255
pubspec
256+
pycardano
253257
pwrite
254258
pycodestyle
255259
pydantic
256260
pydot
257261
pyenv
258262
Pyflakes
259263
pypackages
264+
pyproject
260265
pytest
261266
pytype
262267
qpsg

.earthlyignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git
2+
**/target

.github/workflows/semantic_pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ jobs:
3232
docs
3333
general
3434
deps
35+
catalyst-python

AGENTS.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# AGENTS – Guidelines for Automated Assistants
2+
3+
This file provides repo‑wide guidance for automated coding assistants working in
4+
`catalyst-libs`.
5+
It applies to the entire repository unless a more specific
6+
`AGENTS.md` exists in a subdirectory.
7+
8+
## General Principles
9+
10+
* Make **small, targeted changes** that directly address the user’s request.
11+
* Prefer **clarity and correctness** over cleverness; do not refactor broadly
12+
unless explicitly asked.
13+
* Keep existing project structure, naming, and file layout intact unless there
14+
is a strong reason to change it.
15+
* When in doubt about intent (spec vs implementation vs docs), **ask the user**
16+
rather than guessing.
17+
18+
## Documentation & Specs
19+
20+
* For architecture/spec docs under `docs/src/architecture` that have a matching
21+
Jinja source under `specs/generators/pages`, treat the **Jinja template as the
22+
source of truth**.
23+
* Example: if both
24+
`specs/generators/pages/signed_doc/voting_process/foo.md.jinja` and
25+
`docs/src/architecture/08_concepts/signed_doc/voting_process/foo.md`
26+
exist, edit the `.md.jinja` file, not the generated `.md`.
27+
* Follow existing Markdown style:
28+
* Respect the “one sentence per line” convention where it is used.
29+
* Keep headings, link styles, and admonitions consistent with nearby text.
30+
* When adding terminology that is likely to trigger the spell checker, add it
31+
to `.config/dictionaries/project.dic` in **sorted order**.
32+
* If the user asks for validation, suggest or run (with their consent):
33+
* `just check-markdown`
34+
* `just check-spelling`
35+
36+
## Python (spec generators and tooling)
37+
38+
* Python code lives primarily under `specs/generators` and is linted/formatted
39+
with `ruff` (see `ruff.toml`).
40+
* Conform to the existing style:
41+
* Use double quotes for strings.
42+
* Keep line length within the configured limit.
43+
* Do not introduce new global `ignore` rules in `ruff.toml` unless the user
44+
requests it.
45+
* Where sensible, keep functions small and focused; avoid introducing new
46+
dependencies without discussing with the user.
47+
* When the user wants checks run, prefer:
48+
* `just format-python-code`
49+
* `just lint-python`
50+
51+
## Rust Workspace
52+
53+
* The Rust workspace is in `rust/`.
54+
Follow the existing module layout and
55+
crate boundaries; do not split or merge crates without explicit direction.
56+
* Match the existing style and patterns:
57+
* Use `cargo fmt` / the configured `fmtfix` and lint commands indirectly
58+
via `rust/Justfile` where possible.
59+
* Avoid adding new crates to the workspace unless clearly justified.
60+
* For validation, and only when the user is ready for longer commands, suggest
61+
or run:
62+
* `cd rust && just code-format`
63+
* `cd rust && just code-lint`
64+
* `cd rust && just pre-push` (heavier, CI‑like checks)
65+
66+
## CUE/CDDL Specs and Generated JSON
67+
68+
* Specification source is primarily in `specs/definitions` (CUE, CDDL, etc.).
69+
Treat these as **normative** and make changes carefully and incrementally.
70+
* Where both a CUE definition and a JSON spec exist (e.g. `specs/signed_doc.json`),
71+
assume the JSON is **generated** from the CUE/source definitions.
72+
* Prefer editing the source definitions and let the project’s existing
73+
tooling regenerate derived artifacts.
74+
* Do not hand‑edit large generated JSON files unless explicitly instructed.
75+
76+
## Earthly, Just, and CI
77+
78+
* This repo uses Earthly (`Earthfile`s) and `just` for repeatable workflows.
79+
* Respect the intended execution context:
80+
* Targets or functions marked as `LOCALLY` are meant to run on the host, not
81+
inside container builds.
82+
* Do not try to retrofit such targets into containerized steps without a
83+
clear reason and user confirmation.
84+
* When adding new Earthly targets or Just recipes, mirror the style of
85+
existing ones and keep names short and descriptive.
86+
87+
## Things to Avoid
88+
89+
* Do not:
90+
* Change licensing files, `CODE_OF_CONDUCT.md`, or security policies.
91+
* Introduce breaking API changes (in Rust or Python) without calling that
92+
out explicitly to the user.
93+
* Mass‑reformat the entire repo; limit formatting to files you touch.
94+
* Avoid speculative “cleanup” in areas unrelated to the user’s request, even
95+
if you notice possible improvements; mention them in your summary instead.

Earthfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.6.1 AS mdlint-ci
4-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.6.1 AS cspell-ci
5-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.6.1 AS python-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.6.6 AS mdlint-ci
4+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.6.6 AS cspell-ci
5+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.6.6 AS python-ci
66
IMPORT github.com/input-output-hk/catalyst-ci:v3.6.0 AS cat-ci
77

88
FROM debian:stable-slim

catalyst-python/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

catalyst-python/Earthfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
VERSION 0.8
2+
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.6.6 AS python-ci
4+
5+
builder:
6+
FROM python-ci+python-base
7+
8+
COPY pyproject.toml uv.lock .
9+
COPY src .
10+
COPY tests .
11+
12+
RUN uv update
13+
14+
build:
15+
FROM +builder
16+
17+
RUN uv run pytest

catalyst-python/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Catalyst Python library
2+
3+
A collection of reusable python code of Catalyst specific entities
4+
like RBAC, Catalyst Signed Documents, Catalyst API etc.

catalyst-python/pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# cspell: words bitcoinlib
2+
3+
[project]
4+
name = "catalyst-python"
5+
version = "0.1.0"
6+
description = "Catalyst python library"
7+
readme = "README.md"
8+
authors = [
9+
{ name = "Mr-Leshiy", email = "[email protected]" }
10+
]
11+
requires-python = ">=3.13"
12+
dependencies = [
13+
"cryptography>=46.0.3",
14+
"pycardano>=0.18.0",
15+
"python-bitcoinlib>=0.12.2",
16+
"requests>=2.32.5",
17+
]
18+
19+
[build-system]
20+
requires = ["uv_build>=0.8.5,<0.9.0"]
21+
build-backend = "uv_build"
22+
23+
[dependency-groups]
24+
dev = [
25+
"pytest>=9.0.1",
26+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Catalyst Python Package."""

0 commit comments

Comments
 (0)