Skip to content

Commit 07aea3e

Browse files
authored
Merge pull request #790 from compas-dev/stable-api-fixes
Stable API fixes
2 parents b6c0490 + c7b597e commit 07aea3e

File tree

9 files changed

+1582
-130
lines changed

9 files changed

+1582
-130
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
### Removed
1616

17+
* Fixed API removals from 1.0.0 -> 1.2.0
18+
1719

1820
## [1.2.0] 2021-03-18
1921

src/compas/datastructures/__init__.py

Lines changed: 155 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -131,71 +131,102 @@
131131

132132
from .datastructure import Datastructure
133133
from .network import (
134+
BaseNetwork, # NOTE: this class being in the stable API is something we should deprecate before 2.x release
134135
Graph,
135136
Network,
136-
network_join_edges,
137-
network_polylines,
138-
network_split_edge,
139-
network_is_connected,
140137
network_complement,
141-
network_find_cycles,
142-
network_disconnected_nodes,
138+
network_count_crossings,
143139
network_disconnected_edges,
140+
network_disconnected_nodes,
141+
network_embed_in_plane_proxy,
142+
network_embed_in_plane,
144143
network_explode,
145-
network_is_crossed,
146-
network_count_crossings,
147144
network_find_crossings,
148-
network_is_xy,
149-
network_is_planar,
145+
network_find_cycles,
146+
network_is_connected,
147+
network_is_crossed,
150148
network_is_planar_embedding,
151-
network_embed_in_plane,
152-
network_embed_in_plane_proxy,
149+
network_is_planar,
150+
network_is_xy,
151+
network_join_edges,
152+
network_polylines,
153+
network_shortest_path,
153154
network_smooth_centroid,
155+
network_split_edge,
154156
network_transform,
155157
network_transformed,
156-
network_shortest_path
157158
)
158159
from .mesh import (
160+
BaseMesh, # NOTE: this class being in the stable API is something we should deprecate before 2.x release
159161
HalfEdge,
160162
Mesh,
161-
trimesh_collapse_edge,
162163
mesh_add_vertex_to_face_edge,
163-
mesh_insert_vertex_on_edge,
164-
mesh_merge_faces,
165-
trimesh_split_edge,
166-
mesh_substitute_vertex_in_faces,
167-
trimesh_swap_edge,
168-
mesh_unweld_vertices,
169-
mesh_unweld_edges,
164+
mesh_bounding_box_xy,
165+
mesh_bounding_box,
166+
mesh_collapse_edge,
167+
mesh_connected_components,
168+
mesh_conway_ambo,
169+
mesh_conway_bevel,
170170
mesh_conway_dual,
171+
mesh_conway_expand,
172+
mesh_conway_gyro,
171173
mesh_conway_join,
172-
mesh_conway_ambo,
173174
mesh_conway_kis,
175+
mesh_conway_meta,
174176
mesh_conway_needle,
175-
mesh_conway_zip,
176-
mesh_conway_truncate,
177177
mesh_conway_ortho,
178-
mesh_conway_expand,
179-
mesh_conway_gyro,
180178
mesh_conway_snub,
181-
mesh_conway_meta,
182-
mesh_conway_bevel,
183-
trimesh_mean_curvature,
184-
trimesh_gaussian_curvature,
185-
mesh_disconnected_vertices,
179+
mesh_conway_truncate,
180+
mesh_conway_zip,
181+
mesh_delete_duplicate_vertices,
186182
mesh_disconnected_faces,
183+
mesh_disconnected_vertices,
184+
mesh_dual,
187185
mesh_explode,
188-
trimesh_face_circle,
189-
mesh_weld,
190-
meshes_join,
191-
meshes_join_and_weld,
192-
mesh_offset,
193-
mesh_thicken,
186+
mesh_face_adjacency,
194187
mesh_flatness,
188+
mesh_flip_cycles,
189+
mesh_insert_vertex_on_edge,
190+
mesh_is_connected,
191+
mesh_merge_faces,
192+
mesh_offset,
195193
mesh_planarize_faces,
196-
trimesh_remesh
194+
mesh_quads_to_triangles,
195+
mesh_slice_plane,
196+
mesh_smooth_area,
197+
mesh_smooth_centerofmass,
198+
mesh_smooth_centroid,
199+
mesh_split_edge,
200+
mesh_split_face,
201+
mesh_subdivide_catmullclark,
202+
mesh_subdivide_corner,
203+
mesh_subdivide_doosabin,
204+
mesh_subdivide_frames,
205+
mesh_subdivide_quad,
206+
mesh_subdivide_tri,
207+
mesh_subdivide,
208+
mesh_substitute_vertex_in_faces,
209+
mesh_thicken,
210+
mesh_transform,
211+
mesh_transformed,
212+
mesh_unify_cycles,
213+
mesh_unweld_edges,
214+
mesh_unweld_vertices,
215+
mesh_weld,
216+
meshes_join_and_weld,
217+
meshes_join,
218+
trimesh_collapse_edge,
219+
trimesh_face_circle,
220+
trimesh_gaussian_curvature,
221+
trimesh_mean_curvature,
222+
trimesh_remesh,
223+
trimesh_split_edge,
224+
trimesh_subdivide_loop,
225+
trimesh_swap_edge,
197226
)
198227
from .volmesh import (
228+
BaseVolMesh, # NOTE: this class being in the stable API is something we should deprecate before 2.x release
229+
HalfFace,
199230
VolMesh,
200231
volmesh_bounding_box,
201232
volmesh_transform,
@@ -205,97 +236,128 @@
205236
if not compas.IPY:
206237
from .network import (
207238
network_adjacency_matrix,
208-
network_degree_matrix,
209239
network_connectivity_matrix,
240+
network_degree_matrix,
210241
network_laplacian_matrix,
211242
)
212243
from .mesh import (
213244
mesh_adjacency_matrix,
214245
mesh_connectivity_matrix,
246+
mesh_contours_numpy,
215247
mesh_degree_matrix,
216248
mesh_face_matrix,
249+
mesh_geodesic_distances_numpy,
250+
mesh_isolines_numpy,
217251
mesh_laplacian_matrix,
218-
trimesh_cotangent_laplacian_matrix,
219-
trimesh_vertexarea_matrix,
220252
mesh_oriented_bounding_box_numpy,
221253
mesh_oriented_bounding_box_xy_numpy,
222-
mesh_isolines_numpy,
223-
mesh_contours_numpy,
224-
trimesh_descent,
225-
mesh_geodesic_distances_numpy,
226-
trimesh_smooth_laplacian_cotangent,
227-
trimesh_pull_points_numpy,
228254
mesh_transform_numpy,
229255
mesh_transformed_numpy,
256+
trimesh_cotangent_laplacian_matrix,
257+
trimesh_descent,
258+
trimesh_pull_points_numpy,
230259
trimesh_samplepoints_numpy,
260+
trimesh_smooth_laplacian_cotangent,
261+
trimesh_vertexarea_matrix,
231262
)
232263

233264
__all__ = [
234265
'Datastructure',
235266
# Networks
267+
'BaseNetwork',
236268
'Graph',
237269
'Network',
238-
'network_join_edges',
239-
'network_polylines',
240-
'network_split_edge',
241-
'network_is_connected',
242270
'network_complement',
243-
'network_find_cycles',
244-
'network_disconnected_nodes',
271+
'network_count_crossings',
245272
'network_disconnected_edges',
273+
'network_disconnected_nodes',
274+
'network_embed_in_plane_proxy',
275+
'network_embed_in_plane',
246276
'network_explode',
247-
'network_is_crossed',
248-
'network_count_crossings',
249277
'network_find_crossings',
250-
'network_is_xy',
251-
'network_is_planar',
278+
'network_find_cycles',
279+
'network_is_connected',
280+
'network_is_crossed',
252281
'network_is_planar_embedding',
253-
'network_embed_in_plane',
254-
'network_embed_in_plane_proxy',
282+
'network_is_planar',
283+
'network_is_xy',
284+
'network_join_edges',
285+
'network_polylines',
286+
'network_shortest_path',
255287
'network_smooth_centroid',
288+
'network_split_edge',
256289
'network_transform',
257290
'network_transformed',
258-
'network_shortest_path',
259291
# Meshes
292+
'BaseMesh',
260293
'HalfEdge',
261294
'Mesh',
262-
'trimesh_collapse_edge',
263295
'mesh_add_vertex_to_face_edge',
264-
'mesh_insert_vertex_on_edge',
265-
'mesh_merge_faces',
266-
'trimesh_split_edge',
267-
'mesh_substitute_vertex_in_faces',
268-
'trimesh_swap_edge',
269-
'mesh_unweld_vertices',
270-
'mesh_unweld_edges',
296+
'mesh_bounding_box_xy',
297+
'mesh_bounding_box',
298+
'mesh_collapse_edge',
299+
'mesh_connected_components',
300+
'mesh_conway_ambo',
301+
'mesh_conway_bevel',
271302
'mesh_conway_dual',
303+
'mesh_conway_expand',
304+
'mesh_conway_gyro',
272305
'mesh_conway_join',
273-
'mesh_conway_ambo',
274306
'mesh_conway_kis',
307+
'mesh_conway_meta',
275308
'mesh_conway_needle',
276-
'mesh_conway_zip',
277-
'mesh_conway_truncate',
278309
'mesh_conway_ortho',
279-
'mesh_conway_expand',
280-
'mesh_conway_gyro',
281310
'mesh_conway_snub',
282-
'mesh_conway_meta',
283-
'mesh_conway_bevel',
284-
'trimesh_mean_curvature',
285-
'trimesh_gaussian_curvature',
286-
'mesh_disconnected_vertices',
311+
'mesh_conway_truncate',
312+
'mesh_conway_zip',
313+
'mesh_delete_duplicate_vertices',
287314
'mesh_disconnected_faces',
315+
'mesh_disconnected_vertices',
316+
'mesh_dual',
288317
'mesh_explode',
289-
'trimesh_face_circle',
290-
'mesh_weld',
291-
'meshes_join',
292-
'meshes_join_and_weld',
293-
'mesh_offset',
294-
'mesh_thicken',
318+
'mesh_face_adjacency',
295319
'mesh_flatness',
320+
'mesh_flip_cycles',
321+
'mesh_insert_vertex_on_edge',
322+
'mesh_is_connected',
323+
'mesh_merge_faces',
324+
'mesh_offset',
296325
'mesh_planarize_faces',
326+
'mesh_quads_to_triangles',
327+
'mesh_slice_plane',
328+
'mesh_smooth_area',
329+
'mesh_smooth_centerofmass',
330+
'mesh_smooth_centroid',
331+
'mesh_split_edge',
332+
'mesh_split_face',
333+
'mesh_subdivide_catmullclark',
334+
'mesh_subdivide_corner',
335+
'mesh_subdivide_doosabin',
336+
'mesh_subdivide_frames',
337+
'mesh_subdivide_quad',
338+
'mesh_subdivide_tri',
339+
'mesh_subdivide',
340+
'mesh_substitute_vertex_in_faces',
341+
'mesh_thicken',
342+
'mesh_transform',
343+
'mesh_transformed',
344+
'mesh_unify_cycles',
345+
'mesh_unweld_edges',
346+
'mesh_unweld_vertices',
347+
'mesh_weld',
348+
'meshes_join_and_weld',
349+
'meshes_join',
350+
'trimesh_collapse_edge',
351+
'trimesh_face_circle',
352+
'trimesh_gaussian_curvature',
353+
'trimesh_mean_curvature',
297354
'trimesh_remesh',
355+
'trimesh_split_edge',
356+
'trimesh_subdivide_loop',
357+
'trimesh_swap_edge',
298358
# Volumetric Meshes
359+
'BaseVolMesh',
360+
'HalfFace',
299361
'VolMesh',
300362
'volmesh_bounding_box',
301363
'volmesh_transform',
@@ -306,26 +368,26 @@
306368
__all__ += [
307369
# Networks
308370
'network_adjacency_matrix',
309-
'network_degree_matrix',
310371
'network_connectivity_matrix',
372+
'network_degree_matrix',
311373
'network_laplacian_matrix',
312374
# Meshes
313375
'mesh_adjacency_matrix',
314376
'mesh_connectivity_matrix',
377+
'mesh_contours_numpy',
315378
'mesh_degree_matrix',
316379
'mesh_face_matrix',
380+
'mesh_geodesic_distances_numpy',
381+
'mesh_isolines_numpy',
317382
'mesh_laplacian_matrix',
318-
'trimesh_cotangent_laplacian_matrix',
319-
'trimesh_vertexarea_matrix',
320383
'mesh_oriented_bounding_box_numpy',
321384
'mesh_oriented_bounding_box_xy_numpy',
322-
'mesh_isolines_numpy',
323-
'mesh_contours_numpy',
324-
'trimesh_descent',
325-
'mesh_geodesic_distances_numpy',
326-
'trimesh_smooth_laplacian_cotangent',
327-
'trimesh_pull_points_numpy',
328385
'mesh_transform_numpy',
329386
'mesh_transformed_numpy',
387+
'trimesh_cotangent_laplacian_matrix',
388+
'trimesh_descent',
389+
'trimesh_pull_points_numpy',
330390
'trimesh_samplepoints_numpy',
391+
'trimesh_smooth_laplacian_cotangent',
392+
'trimesh_vertexarea_matrix',
331393
]

src/compas/files/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@
150150
XML,
151151
XMLElement,
152152
XMLReader,
153-
XMLWriter
153+
XMLWriter,
154+
prettify_string
154155
)
155156

156157
__all__ = [
@@ -196,5 +197,6 @@
196197
'XML',
197198
'XMLElement',
198199
'XMLReader',
199-
'XMLWriter'
200+
'XMLWriter',
201+
'prettify_string',
200202
]

0 commit comments

Comments
 (0)