Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
09b67c6
feat: templates/protocols/dialogues.jinja
Karrenbelt Mar 16, 2025
46d869b
tests: add test cases for primitive types and basic enums
Karrenbelt Mar 22, 2025
cb848e9
tests: add map-related test cases including nested and variant maps
Karrenbelt Mar 22, 2025
1cc6687
tests: add nested message and oneof-related test cases
Karrenbelt Mar 22, 2025
a89ab5c
tests: add recursive structure test cases
Karrenbelt Mar 22, 2025
78ae9dc
feat: first protodantic.jinja draft
Karrenbelt Mar 22, 2025
a44ac42
feat: add proto-schema-parser to pyproject.toml
Karrenbelt Mar 22, 2025
ac02f85
feat: first protodantic.py draft
Karrenbelt Mar 22, 2025
5dd5c53
feat: protocols/hypothesis.jinja
Karrenbelt Mar 24, 2025
7153cb8
feat: create and write code and tests in protodantic.py
Karrenbelt Mar 24, 2025
537073d
chore: cleanup protodantic.py
Karrenbelt Mar 24, 2025
ed75c9a
tests: add integration tests for protodantic.create
Karrenbelt Mar 24, 2025
f6cb91c
fix: import path from repo_root
Karrenbelt Mar 24, 2025
f8e286a
feat: add .encode and .decode to protodantic.jinja
Karrenbelt Mar 24, 2025
2d116d0
tests: add .encode and .decode invocation to hypothesis.jinja
Karrenbelt Mar 24, 2025
77bd673
feat: add messages_pb2 generation via protoc
Karrenbelt Mar 24, 2025
e75f51c
tests: add optional_primitives.proto
Karrenbelt Mar 25, 2025
c4eba2f
feat: update protodantic.jinja and hypothesis.jinja to handle optiona…
Karrenbelt Mar 25, 2025
9444d85
refactor: simplify protodantic.jinja .decode and .encode
Karrenbelt Mar 25, 2025
8cc27f5
chore: rename fields repeated_primitives.proto
Karrenbelt Mar 25, 2025
17599f0
tests: add repeated_primitives.proto
Karrenbelt Mar 25, 2025
c7d848c
feat: update protodantic.jinja and hypothesis.jinja to handle repeate…
Karrenbelt Mar 25, 2025
510581d
tests: add basic_enum.proto
Karrenbelt Mar 25, 2025
00b0b33
feat: update protodantic.jinja and hypothesis.jinja to handle basic e…
Karrenbelt Mar 25, 2025
5d82d19
tests: add optional_enum.proto
Karrenbelt Mar 25, 2025
1393402
feat: update protodantic.jinja to handle optional enum values
Karrenbelt Mar 25, 2025
8792f1a
chore: make enum .decode strict
Karrenbelt Mar 25, 2025
94352db
tests: add repeated_enum.proto
Karrenbelt Mar 25, 2025
91547e3
feat: update protodantic.jinja to handle repeated enum values
Karrenbelt Mar 25, 2025
0aa9e2e
fix: enum strategies based on field cardinality in hypothesis.jinja
Karrenbelt Mar 25, 2025
20e152c
refactor: introduce macros in protodantic
Karrenbelt Mar 25, 2025
f1c9455
refactor: reuse scalar marcros in optional macros
Karrenbelt Mar 25, 2025
cd73f8c
refactor: simplify repeated macros
Karrenbelt Mar 25, 2025
8ca18d0
refactor: unify scalar and enum handling in macros
Karrenbelt Mar 27, 2025
d2bbba5
tests: add simple_message.proto
Karrenbelt Mar 27, 2025
9574ce5
tests: add nested_message.proto
Karrenbelt Mar 27, 2025
972efc2
feat: introduce render_message macro for nested messages in protodant…
Karrenbelt Mar 27, 2025
fc8bad0
feat: introduce macros for nested messages in hypothesis.jinja
Karrenbelt Mar 27, 2025
abd9d5d
fix: encoding / decoding logic for nested messages in protodantic.jinja
Karrenbelt Mar 27, 2025
e4ba050
fix: nested message indentation protodantic.jinja
Karrenbelt Mar 27, 2025
8d73eea
fix: fully qualified path for nested messages in hypothesis.jinja
Karrenbelt Mar 27, 2025
c51aef9
tests: add deeply_nested_message.proto
Karrenbelt Mar 27, 2025
f428269
fix: fully qualified path for nested messages in protodantic.jinja
Karrenbelt Mar 27, 2025
d772c55
tests: add regualr, optional and repeated fields to nested_message.proto
Karrenbelt Mar 27, 2025
000fcb9
tests: add regualr, optional and repeated fields to deeply_nested_mes…
Karrenbelt Mar 27, 2025
b96459f
tests: add oneof_value.proto
Karrenbelt Mar 27, 2025
72f7d7d
feat: add oneof to protodantic.jinja
Karrenbelt Mar 27, 2025
5fe8c59
feat: custom primitives.jinja
Karrenbelt Mar 28, 2025
a1a63f0
feat: remove type_map and replace values in scalar_map with custom pr…
Karrenbelt Mar 28, 2025
da6cf01
tests: add all primitive types to oneof_value.proto
Karrenbelt Mar 28, 2025
31314d7
feat: replace values in scalar_map with st.builds of custom primitive…
Karrenbelt Mar 28, 2025
416eb80
feat: create primitives.py and pass necesary rendering variables in p…
Karrenbelt Mar 28, 2025
aa8e21b
chore: cleanup jinja templates
Karrenbelt Mar 28, 2025
daa5f08
refactor: read in custom primitive classes from generated code
Karrenbelt Mar 28, 2025
3323c76
refactor: gemerate scalar_map dynamically from custom primitive classes
Karrenbelt Mar 28, 2025
5dec497
tests: add all primitive types to map_primitive_values.proto
Karrenbelt Mar 28, 2025
267107e
feat: add map to protodantic.jinja
Karrenbelt Mar 28, 2025
124a9dc
fix: add to_float32 in custom Float for managing precision in primiti…
Karrenbelt Mar 28, 2025
0dc4d1c
tests: add all primitive types to map_optional_primitive_values.proto
Karrenbelt Mar 28, 2025
7e28191
feat: add optional map values to protodantic.jinja
Karrenbelt Mar 28, 2025
d42d6de
tests: add all primitive types and rename to map_repeated_primitive_v…
Karrenbelt Mar 29, 2025
234eed5
tests: add map_repeated_primitive_values.proto
Karrenbelt Mar 29, 2025
f750d86
tests: add map_message.proto
Karrenbelt Mar 29, 2025
b6f7ea4
feat: add direct_nested to protodantic.jinja
Karrenbelt Mar 29, 2025
a4f6f67
refactor: remove `decoded_` prefix from variable names
Karrenbelt Mar 29, 2025
78119e5
feat: proto schema parser adapters
Karrenbelt Mar 31, 2025
8c89bb2
refactor: use proto schema adapters in protodantic and hypothesis jin…
Karrenbelt Mar 31, 2025
ec74317
refactor: use Message.fully_qualified_name in protodantic.jinja
Karrenbelt Mar 31, 2025
4056f3d
feat: add qualified_type() method to protodantic MessageAdapter
Karrenbelt Mar 31, 2025
9b1f131
refactor: use Message.qualified_type to simplify protodantic.jinja te…
Karrenbelt Mar 31, 2025
f2bc2f6
fix: ensure consistent trailing commas in generated constructor
Karrenbelt Mar 31, 2025
d7c1461
feat: formatter.render_attribute
Karrenbelt Apr 1, 2025
4487598
feat: FileAdapter.file_elements, MessageAdapter.elements and MessageA…
Karrenbelt Apr 1, 2025
fc2a85e
feat: formatter.render_encoder and formatter.render
Karrenbelt Apr 1, 2025
3165af5
feat: formatter.render_decoder
Karrenbelt Apr 1, 2025
74f5d1a
refactor: remove logic from protodantic.jinja and pass formatter instead
Karrenbelt Apr 1, 2025
05e4142
tests: add message_reference.proto
Karrenbelt Apr 2, 2025
2fae96d
tests: add nested_enum.proto
Karrenbelt Apr 2, 2025
47887aa
feat: hypothesis strategy for nested enum
Karrenbelt Apr 2, 2025
5854f6d
fix: update map_enum.proto to prevent protobuf discriptor naming coll…
Karrenbelt Apr 2, 2025
e0c2c75
tests: add map_enum.proto
Karrenbelt Apr 2, 2025
cbdf741
feat: add logic for enum values in map to formatter
Karrenbelt Apr 2, 2025
fe53c8e
tests: add logic for handling map_enum test generation
Karrenbelt Apr 2, 2025
4c30350
refactor: move protoc call upward to detect .proto errors before rend…
Karrenbelt Apr 2, 2025
c0c1071
refactor: remove passing prefix in formatter
Karrenbelt Apr 2, 2025
71d44e0
feat: MessageAdapter.parent
Karrenbelt Apr 2, 2025
a5933fd
refactor: move MessageAdapter.qualified_type() -> formatter.qualified…
Karrenbelt Apr 2, 2025
798b826
refactor: simplify encode_field and decode_field
Karrenbelt Apr 2, 2025
fca1b79
refactor: primitives.jinja -> primitives.py and simplify protodantic.py
Karrenbelt Apr 2, 2025
c7161c4
fix: add `from __future__ import annotations` to jinja template
Karrenbelt Apr 2, 2025
2b754c5
fix: add FLOAT_PRIMITIVES, INTEGER_PRIMITIVES and PRIMITIVE_TYPE_MAP …
Karrenbelt Apr 2, 2025
19d8bd6
fix: encode and decode ast.Comment
Karrenbelt Apr 2, 2025
44c3390
feat: make update_protocol_tests
Karrenbelt Apr 2, 2025
121ae56
chore: tests/data/protocols/.capitalisation_station as hidden dir for…
Karrenbelt Apr 3, 2025
181e9c2
fix: remove breakpoint
Karrenbelt Apr 3, 2025
0f4a02e
feat: utils.file_swapper
Karrenbelt Apr 3, 2025
746c7bb
tests: utils.file_swapper
Karrenbelt Apr 3, 2025
5c27464
fix: message_import_path
Karrenbelt Apr 4, 2025
e6fea2b
fix: dialogues.jinja
Karrenbelt Apr 4, 2025
66900e8
tests: add empty_message.proto
Karrenbelt Apr 4, 2025
df5db51
feat: add docstrings to generated pydantic model code
Karrenbelt Apr 4, 2025
15c9d2c
feat: field.cardinality handling for message encoding / decoding
Karrenbelt Apr 5, 2025
fe5a84b
tests: add repeated_message.proto
Karrenbelt Apr 5, 2025
c94813d
refactor: repeated_message.proto
Karrenbelt Apr 5, 2025
0a3003b
tests: add optional_message.proto
Karrenbelt Apr 5, 2025
d20b40b
fix: encoding optional message
Karrenbelt Apr 5, 2025
5ec1830
chore: improve readability hypothesis.jinja rendered output
Karrenbelt Apr 5, 2025
5b700d9
feat: auto-update forward refs in protodantic.jinja
Karrenbelt Apr 5, 2025
304dd7c
fix: simplify and correct message strategies using st.from_type
Karrenbelt Apr 5, 2025
4158efb
feat: performatives.parse_annotation
Karrenbelt Apr 5, 2025
f80f122
test: performatives.parse_annotation
Karrenbelt Apr 5, 2025
433a309
tests: complex performative annotation parsing
Karrenbelt Apr 5, 2025
db8296a
fix: performatives.parse_annotation with _split_top_level
Karrenbelt Apr 5, 2025
ee1c9ce
feat: test_dialogues.jinja
Karrenbelt Apr 6, 2025
aad889b
feat: primitive_strategies.jinja
Karrenbelt Apr 6, 2025
8be53b5
refactor: render primitive_strategies.jinja and import types from the…
Karrenbelt Apr 6, 2025
faddb75
refactor: cls.update_forward_refs() -> cls.model_rebuild()
Karrenbelt Apr 6, 2025
e6d8d87
fix: test_dialogues.jinja mock skill_context and imports
Karrenbelt Apr 6, 2025
23a33ae
feat: test_message.jinja
Karrenbelt Apr 6, 2025
358bb2a
fix: type casting of performatives annotation to python
Karrenbelt Apr 6, 2025
9622486
test: updated expected result in test_parse_performative_annotation
Karrenbelt Apr 6, 2025
617e747
refactor: move protocol/scaffold.py -> behaviours/protocol_scaffolder.py
Karrenbelt Apr 6, 2025
ef764bd
fix: import path ProtocolScaffolder in behaviour/scaffold.py
Karrenbelt Apr 6, 2025
146f858
feat: protocols/README.jinja
Karrenbelt Apr 6, 2025
1218cc7
fix: update templates to pass adev lint
Karrenbelt Apr 6, 2025
c02f2de
test: adev scaffold protocol
Karrenbelt Apr 7, 2025
8ea9ba2
feat: protocol scaffolder read_protocol_spec
Karrenbelt Apr 7, 2025
c6f581d
feat: ProtocolSpecification model
Karrenbelt Apr 7, 2025
40419df
feat add computed properties to ProtocolSpecification
Karrenbelt Apr 7, 2025
d4c253f
feat initialize packages, aea generated protocol & aea publish
Karrenbelt Apr 7, 2025
19dba5c
feat: generate_readme() using Jinja template
Karrenbelt Apr 7, 2025
b7b8c79
feat: generate_custom_types() using protodantic
Karrenbelt Apr 7, 2025
04e58c7
fix: test_custom_types import patching
Karrenbelt Apr 7, 2025
a73d7a0
feat: generate_dialogues() using ProtocolSpecification
Karrenbelt Apr 7, 2025
d3510a1
feat: generate_test_dialogues() using ProtocolSpecification
Karrenbelt Apr 7, 2025
f67e749
feat: generate_test_messages() using ProtocolSpecification
Karrenbelt Apr 7, 2025
26ca126
feat: update protocol.yaml with pydantic and hypothesis dependencies
Karrenbelt Apr 7, 2025
4c79bb8
feat: adev fmt & lint, aea fingerprint on newly generated protocol code
Karrenbelt Apr 7, 2025
af1f0a4
refactor: use new protocol_scaffolder in adev command
Karrenbelt Apr 7, 2025
acd6b33
test: fix import and remove flawed capitalisation station protocol sp…
Karrenbelt Apr 7, 2025
5527149
fix: connection scaffolder to use ProtocolSpecification
Karrenbelt Apr 7, 2025
21f6d52
fix: test_scaffolder to use ProtocolSpecification
Karrenbelt Apr 7, 2025
fd222fc
chore: adev fmt lint
Karrenbelt Apr 7, 2025
3210f09
Merge branch 'main' into fix/protodantic_integration
Karrenbelt Apr 7, 2025
2c50c47
fix: use `aea push --local protocol` instead of `aea publish --local …
Karrenbelt Apr 7, 2025
9d663bc
Merge pull request #634 from 8ball030/fix/protodantic_integration
Karrenbelt Apr 7, 2025
7d34d4a
Merge pull request #633 from 8ball030/feat/protodantic_integration
Karrenbelt Apr 7, 2025
0695a15
Merge pull request #632 from 8ball030/feat/protodantic_recursion
Karrenbelt Apr 7, 2025
eeeac78
Merge pull request #631 from 8ball030/feat/protodantic_formatter
Karrenbelt Apr 7, 2025
68bcb02
Merge pull request #630 from 8ball030/feat/proto_schema_parser_adapters
Karrenbelt Apr 7, 2025
3e05420
Merge pull request #628 from 8ball030/feat/protodantic_map
Karrenbelt Apr 7, 2025
1a6745b
Merge pull request #627 from 8ball030/refactor/custom_primitive_templ…
Karrenbelt Apr 7, 2025
0c8ea78
Merge pull request #626 from 8ball030/feat/protodantic_oneof
Karrenbelt Apr 7, 2025
51c18ae
Merge pull request #625 from 8ball030/feat/nested_messages
Karrenbelt Apr 7, 2025
17b825f
Merge pull request #624 from 8ball030/feat/protodantic_macros
Karrenbelt Apr 7, 2025
6783caa
Merge pull request #623 from 8ball030/feat/basic-enum-support
Karrenbelt Apr 7, 2025
9987e6e
Merge pull request #622 from 8ball030/feat/optional-repeated-primitives
Karrenbelt Apr 7, 2025
864f9c3
Merge pull request #621 from 8ball030/feat/protodantic_encode_decode
Karrenbelt Apr 7, 2025
530d7ea
Merge pull request #619 from 8ball030/tests/protodantic
Karrenbelt Apr 7, 2025
def919f
fix: test_scaffold_protocol
Karrenbelt Apr 7, 2025
e33ff7b
fix: test_scaffold_protocol
Karrenbelt Apr 7, 2025
6ceb34f
fix: python version in pyproject <3.14 -> <3.13
Karrenbelt Apr 7, 2025
5d94254
fix: pyproject.toml.template
Karrenbelt Apr 7, 2025
c9471c7
fix: file_swapper
Karrenbelt Apr 7, 2025
466f9a2
fix: remove old test_scaffold_protocol
Karrenbelt Apr 7, 2025
39c9536
fix: update templates/python/poetry.lock & templates/autonomy/poetry.…
Karrenbelt Apr 7, 2025
e0b6716
chore: remove import
Karrenbelt Apr 7, 2025
6009bcb
chore: https://rpc.ankr.com/eth -> https://eth.drpc.org
Karrenbelt Apr 11, 2025
f79b85c
feat: module_scoped_dummy_agent_tim
Karrenbelt Apr 11, 2025
860c670
test: add map_nested.proto
Karrenbelt Apr 12, 2025
0fd5c03
fix: qualified_type via introduction of ResolvedType
Karrenbelt Apr 12, 2025
850150d
refactor: renaming and property -> cachedproperty
Karrenbelt Apr 12, 2025
b15a79b
tests: add map_of_map.proto
Karrenbelt Apr 12, 2025
96ef64d
refactor: explicit ast. reference in adapters.py
Karrenbelt Apr 12, 2025
5e3f23f
chore: make fmt lint
Karrenbelt Apr 12, 2025
76f48d5
tests: add map_scalar_keys.proto
Karrenbelt Apr 12, 2025
bff04dd
fix: point PYTHONPATH to tmp dir before `adev scaffold protocol` in t…
Karrenbelt Apr 12, 2025
fdda705
feat: protocols/performatives.jinja
Karrenbelt Apr 12, 2025
9dceeac
refactor: import from tests/performatives.py in other tests
Karrenbelt Apr 12, 2025
e79c40b
chore: remove empty protocols/tests.jinja
Karrenbelt Apr 12, 2025
d5b9281
chore: make fmt lint
Karrenbelt Apr 12, 2025
46efb90
refactor: unify template rendering with `TemplateContext` model and `…
Karrenbelt Apr 13, 2025
830b52d
refactor: remove initial_performative_types
Karrenbelt Apr 13, 2025
e872187
refactor: moved hardcoded template paths into JinjaTemplates model
Karrenbelt Apr 13, 2025
b42b11a
refactor: protodantic.py
Karrenbelt Apr 13, 2025
2f0ff1b
refactor: TemplateContext in protodantic.py
Karrenbelt Apr 13, 2025
2965899
refactor: _prepare_pb2 in protodantic.py
Karrenbelt Apr 13, 2025
87e7004
refactor: ImportPaths in protodantic.py
Karrenbelt Apr 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ clean:

install:
poetry run bash auto_dev/data/repo/templates/autonomy/install.sh
make update_protocol_tests

lint:
poetry run adev -v -n 0 lint -p . -co
Expand All @@ -19,6 +20,7 @@ fmt:
poetry run adev -n 0 fmt -p . -co

test:
make update_protocol_tests
poetry run adev -v test -p tests

.PHONY: docs
Expand All @@ -41,3 +43,18 @@ new_env:
git pull
poetry env remove --all
make install


PROTOCOLS_URL = https://github.com/StationsStation/capitalisation_station/archive/main.zip
PROTOCOLS_DIR = ${ROOT_DIR}tests/data/protocols/.capitalisation_station
TEMP_ZIP = .capitalisation_station.zip

update_protocol_tests:
@echo "Downloading protocol specification for testing..."
@curl -L $(PROTOCOLS_URL) -o $(TEMP_ZIP)
@echo "Extracting protocol specification..."
@mkdir -p $(PROTOCOLS_DIR)
@unzip -q $(TEMP_ZIP) "capitalisation_station-main/specs/protocols/*" -d .tmp_protocols
@mv .tmp_protocols/capitalisation_station-main/specs/protocols/* $(PROTOCOLS_DIR)/
@rm -rf .tmp_protocols $(TEMP_ZIP)
@echo "Protocols updated in $(PROTOCOLS_DIR)"
Loading
Loading