bitflicker64 commented on code in PR #392:
URL: https://github.com/apache/hugegraph-ai/pull/392#discussion_r4439593355


##########
hugegraph-python-client/MIGRATION.md:
##########
@@ -0,0 +1,102 @@
+# Python API migration
+
+The new API uses snake_case consistently. No CamelCase aliases are installed.
+Server JSON keys and graph IDs keep their original spelling and types.
+Update application code together with this client upgrade.
+
+| Previous name | Current name |
+| --- | --- |
+| `addEdge` | `add_edge` |
+| `addEdges` | `add_edges` |
+| `addVertex` | `add_vertex` |
+| `addVertices` | `add_vertices` |
+| `appendEdge` | `append_edge` |
+| `appendVertex` | `append_vertex` |
+| `asBlob` | `as_blob` |
+| `asBool` | `as_bool` |
+| `asByte` | `as_byte` |
+| `asDate` | `as_date` |
+| `asDouble` | `as_double` |
+| `asFloat` | `as_float` |
+| `asInt` | `as_int` |
+| `asLong` | `as_long` |
+| `asObject` | `as_object` |
+| `asText` | `as_text` |
+| `baseType` | `base_type` |
+| `baseValue` | `base_value` |
+| `calcMax` | `calc_max` |
+| `calcMin` | `calc_min` |
+| `calcOld` | `calc_old` |
+| `calcSum` | `calc_sum` |
+| `dataType` | `data_type` |
+| `edgeLabel` | `edge_label` |
+| `eliminateEdge` | `eliminate_edge` |
+| `eliminateVertex` | `eliminate_vertex` |
+| `enableLabelIndex` | `enable_label_index` |
+| `getEdgeById` | `get_edge_by_id` |
+| `getEdgeByPage` | `get_edge_by_page` |
+| `getEdgeLabel` | `get_edge_label` |
+| `getEdgeLabels` | `get_edge_labels` |
+| `getEdgesById` | `get_edges_by_id` |
+| `getIndexLabel` | `get_index_label` |
+| `getIndexLabels` | `get_index_labels` |
+| `getPropertyKey` | `get_property_key` |
+| `getPropertyKeys` | `get_property_keys` |
+| `getRelations` | `get_relations` |
+| `getSchema` | `get_schema` |
+| `getVertexByCondition` | `get_vertex_by_condition` |
+| `getVertexByConditionWithPage` | `get_vertex_by_condition_with_page` |
+| `getVertexById` | `get_vertex_by_id` |
+| `getVertexByPage` | `get_vertex_by_page` |
+| `getVertexLabel` | `get_vertex_label` |
+| `getVertexLabels` | `get_vertex_labels` |
+| `getVerticesById` | `get_vertices_by_id` |
+| `idStrategy` | `id_strategy` |
+| `ifNotExist` | `if_not_exist` |
+| `inV` | `in_v` |
+| `inVLabel` | `in_v_label` |
+| `indexLabel` | `index_label` |
+| `indexLabels` | `index_labels` |
+| `indexType` | `index_type` |
+| `multiTimes` | `multi_times` |
+| `nullableKeys` | `nullable_keys` |
+| `onE` | `on_e` |
+| `onV` | `on_v` |
+| `outV` | `out_v` |
+| `outVLabel` | `out_v_label` |
+| `primaryKeys` | `primary_keys` |
+| `propertyKey` | `property_key` |
+| `removeEdgeById` | `remove_edge_by_id` |
+| `removeVertexById` | `remove_vertex_by_id` |
+| `singleTime` | `single_time` |
+| `sortKeys` | `sort_keys` |
+| `sourceLabel` | `source_label` |
+| `targetLabel` | `target_label` |
+| `useAutomaticId` | `use_automatic_id` |
+| `useCustomizeNumberId` | `use_customize_number_id` |
+| `useCustomizeStringId` | `use_customize_string_id` |
+| `usePrimaryKeyId` | `use_primary_key_id` |
+| `valueList` | `value_list` |
+| `valueSet` | `value_set` |
+| `valueSingle` | `value_single` |
+| `vertexLabel` | `vertex_label` |
+
+`weighted_shortest_path(source_id, target_id, weight, *, ...)` and
+`single_source_shortest_path(source_id, *, weight=None, ...)` do not accept 
`max_depth`:
+these server endpoints use capacity/degree/limit controls instead. 
Neighbourhood and unweighted
+shortest-path APIs still accept the depth controls offered by their server 
endpoints.
+
+`client.graphs().get_all_graphs()` returns the native `{"graphs": [...]}` 
envelope.

Review Comment:
   Minor: `get_version()` and `get_graph_info()` also return dicts instead of 
JSON text, so callers that `json.loads` the old result raise `TypeError` after 
upgrading. List both next to `get_all_graphs()` here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to