Skip to content

Commit 749a607

Browse files
committed
renamed data to conversions
1 parent ea28044 commit 749a607

9 files changed

Lines changed: 9 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828
* Added `joints_to_process` parameter to `TimberModel.process_joinery()`, to process a subset of the model's joints instead of all of them.
2929
* Added new `compas_timber.fabrication.BirdsMouth`.
3030
* Added new module `candidate_dispatch` in `compas_timber.connections` with `get_connection_candidate(element_a, element_b, max_distance)`, the entry point used by `TimberModel.compute_topologies()` to build the right kind of joint candidate for a pair of adjacent elements based on their types.
31-
* Added new subpackage `compas_timber.proto`, merging the former `compas_timber_pb` plugin into compas_timber. It contains the protobuf IDL split by domain (`elements.proto`, `fabrication.proto`, `connections.proto`, `panel_features.proto`, `planning.proto`, `structural.proto`, `model.proto`) and `compas_timber.proto.data`, which registers the serializers via the `compas_pb.plugins` entry point. Objects can be round-tripped with `compas_pb.pb_dump_bts()` / `pb_load_bts()`.
31+
* Added new subpackage `compas_timber.proto`, merging the former `compas_timber_pb` plugin into compas_timber. It contains the protobuf IDL split by domain (`elements.proto`, `fabrication.proto`, `connections.proto`, `panel_features.proto`, `planning.proto`, `structural.proto`, `model.proto`) and `compas_timber.proto.conversions`, which registers the serializers via the `compas_pb.plugins` entry point. Objects can be round-tripped with `compas_pb.pb_dump_bts()` / `pb_load_bts()`.
3232
* Added protobuf messages for every class that implements `__data__`: all timber elements (`Beam`, `Plate`, `Panel`, `Layer`, `LayerDefinition`, `LayerStructure`, `PlateGeometry`, the fastener types), all 18 BTLx processings plus `Contour` / `DualContour`, all 28 instantiable joints, `JointCandidate`, the panel features, the building plan / sequencing / nesting types, `StructuralSegment`, and `TimberModel` itself. A whole model -- beams, plates, panels, joints and features -- round-trips without data loss.
33-
* Added `compas_timber.proto.data.register()`, which derives the mapping between a class and its protobuf message from the message descriptor, so proto field names matching `__data__` keys is all that is needed to serialize a new type.
33+
* Added `compas_timber.proto.conversions.register()`, which derives the mapping between a class and its protobuf message from the message descriptor, so proto field names matching `__data__` keys is all that is needed to serialize a new type.
3434
* Added `BuildingPlanModelContainer` to `compas_timber.planning`, a container bundling a `BuildingPlan` with its elements and geometries.
3535
* Added `invoke pre_build` task, which generates the protobuf python bindings (`*_pb2.py`) from the `.proto` files. It must be run before `invoke test` and before building a distribution.
3636
* Added `compas_pb >= 1.0.0, < 2.0` as a runtime and build dependency.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Homepage = "https://gramaziokohler.github.io/compas_timber/latest/"
8383
Repository = "https://github.com/gramaziokohler/compas_timber"
8484

8585
[project.entry-points.'compas_pb.plugins']
86-
serializers = 'compas_timber.proto.data'
86+
serializers = 'compas_timber.proto.conversions'
8787

8888
# ============================================================================
8989
# Setup and build

tests/compas_timber/test_proto_beam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@pytest.fixture(autouse=True)
1414
def load_serializers():
15-
import compas_timber.proto.data # noqa: F401
15+
import compas_timber.proto.conversions # noqa: F401
1616

1717

1818
def test_beam_roundtrip():

tests/compas_timber/test_proto_building_plan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
@pytest.fixture(autouse=True)
2121
def load_serializers():
22-
import compas_timber.proto.data # noqa: F401
22+
import compas_timber.proto.conversions # noqa: F401
2323

2424

2525
@pytest.fixture

tests/compas_timber/test_proto_connections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
@pytest.fixture(autouse=True)
2323
def load_serializers():
24-
import compas_timber.proto.data # noqa: F401
24+
import compas_timber.proto.conversions # noqa: F401
2525

2626

2727
def assert_lossless(obj):

tests/compas_timber/test_proto_elements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
@pytest.fixture(autouse=True)
2323
def load_serializers():
24-
import compas_timber.proto.data # noqa: F401
24+
import compas_timber.proto.conversions # noqa: F401
2525

2626

2727
def roundtrip(obj):

tests/compas_timber/test_proto_fabrication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
@pytest.fixture(autouse=True)
2727
def load_serializers():
28-
import compas_timber.proto.data # noqa: F401
28+
import compas_timber.proto.conversions # noqa: F401
2929

3030

3131
def assert_lossless(obj):

tests/compas_timber/test_proto_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
@pytest.fixture(autouse=True)
3131
def load_serializers():
32-
import compas_timber.proto.data # noqa: F401
32+
import compas_timber.proto.conversions # noqa: F401
3333

3434

3535
@pytest.fixture

0 commit comments

Comments
 (0)