Skip to content

James/python docstrings#2273

Merged
miratepuffin merged 44 commits intomasterfrom
james/python-docstrings
Sep 30, 2025
Merged

James/python docstrings#2273
miratepuffin merged 44 commits intomasterfrom
james/python-docstrings

Conversation

@jbaross-pometry
Copy link
Contributor

@jbaross-pometry jbaross-pometry commented Sep 9, 2025

What changes were proposed in this pull request?

Outstanding stubs-gen errors

Some additional types, such as MetadataView should also be exposed.

WARNING:raphtory.Graph.create_index_in_ram_with_spec:missing parameter py_spec in docs.
ERROR:raphtory.Graph.create_index_in_ram_with_spec:parameter IndexSpec appears in documentation but does not exist.
ERROR:raphtory.PersistentGraph.create_index_in_ram_with_spec:parameter IndexSpec appears in documentation but does not exist.
ERROR:raphtory.Nodes.metadata:Invalid return type 'MetadataView': Unknown type MetadataView
ERROR:raphtory.PathFromNode.metadata:Invalid return type 'MetadataView': Unknown type MetadataView
ERROR:raphtory.PathFromGraph.metadata:Invalid return type 'MetadataListList': Unknown type MetadataListList
ERROR:raphtory.PathFromGraph.properties:Invalid return type 'NestedPropsIterable': Unknown type NestedPropsIterable
ERROR:raphtory.Edge.explode:Invalid return type 'Exploded': Unknown type Exploded
ERROR:raphtory.Edge.explode_layers:Invalid return type 'Exploded': Unknown type Exploded
ERROR:raphtory.Edges.deletions:Invalid return type 'PyGenericIterable': Unknown type PyGenericIterable
ERROR:raphtory.Edges.explode:Invalid return type 'Exploded': Unknown type Exploded
ERROR:raphtory.Edges.explode_layers:Invalid return type 'Exploded': Unknown type Exploded
ERROR:raphtory.Edges.history:Invalid return type 'PyGenericIterable': Unknown type PyGenericIterable
ERROR:raphtory.Edges.metadata:Invalid return type 'MetadataView': Unknown type MetadataView
ERROR:raphtory.Edges.time:Invalid return type 'I64Iterable': Unknown type I64Iterable
ERROR:raphtory.NestedEdges.explode:Invalid return type 'Exploded': Unknown type Exploded
ERROR:raphtory.NestedEdges.explode_layers:Invalid return type 'Exploded': Unknown type Exploded
ERROR:raphtory.NestedEdges.layer_name:Invalid return type 'NestedArcStringIterable': Unknown type NestedArcStringIterable
ERROR:raphtory.NestedEdges.metadata:Invalid return type 'MetadataListList': Unknown type MetadataListList
ERROR:raphtory.NestedEdges.properties:Invalid return type 'PyNestedPropsIterable': Unknown type PyNestedPropsIterable

The new itterables need documenting, I have not been able to identify where this should be done.

WARNING:raphtory.iterables.NestedUtcDateTimeIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedGIDIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedGIDIterable.max:Missing documentation
WARNING:raphtory.iterables.NestedGIDIterable.min:Missing documentation
WARNING:raphtory.iterables.GIDIterable.collect:Missing documentation
WARNING:raphtory.iterables.GIDIterable.max:Missing documentation
WARNING:raphtory.iterables.GIDIterable.min:Missing documentation
WARNING:raphtory.iterables.StringIterable.collect:Missing documentation
WARNING:raphtory.iterables.OptionArcStringIterable.collect:Missing documentation
WARNING:raphtory.iterables.UsizeIterable.collect:Missing documentation
WARNING:raphtory.iterables.UsizeIterable.max:Missing documentation
WARNING:raphtory.iterables.UsizeIterable.mean:Missing documentation
WARNING:raphtory.iterables.UsizeIterable.min:Missing documentation
WARNING:raphtory.iterables.UsizeIterable.sum:Missing documentation
WARNING:raphtory.iterables.OptionI64Iterable.collect:Missing documentation
WARNING:raphtory.iterables.OptionI64Iterable.max:Missing documentation
WARNING:raphtory.iterables.OptionI64Iterable.min:Missing documentation
WARNING:raphtory.iterables.NestedOptionArcStringIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedStringIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedOptionI64Iterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedOptionI64Iterable.max:Missing documentation
WARNING:raphtory.iterables.NestedOptionI64Iterable.min:Missing documentation
WARNING:raphtory.iterables.NestedI64VecIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedUsizeIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedUsizeIterable.max:Missing documentation
WARNING:raphtory.iterables.NestedUsizeIterable.mean:Missing documentation
WARNING:raphtory.iterables.NestedUsizeIterable.min:Missing documentation
WARNING:raphtory.iterables.NestedUsizeIterable.sum:Missing documentation
WARNING:raphtory.iterables.BoolIterable.collect:Missing documentation
WARNING:raphtory.iterables.ArcStringIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedVecUtcDateTimeIterable.collect:Missing documentation
WARNING:raphtory.iterables.OptionVecUtcDateTimeIterable.collect:Missing documentation
WARNING:raphtory.iterables.GIDGIDIterable.collect:Missing documentation
WARNING:raphtory.iterables.GIDGIDIterable.max:Missing documentation
WARNING:raphtory.iterables.GIDGIDIterable.min:Missing documentation
WARNING:raphtory.iterables.NestedGIDGIDIterable.collect:Missing documentation
WARNING:raphtory.iterables.NestedGIDGIDIterable.max:Missing documentation
WARNING:raphtory.iterables.NestedGIDGIDIterable.min:Missing documentation
WARNING:raphtory.iterables.NestedBoolIterable.collect:Missing documentation
WARNING:raphtory.iterables.U64Iterable.collect:Missing documentation
WARNING:raphtory.iterables.U64Iterable.max:Missing documentation
WARNING:raphtory.iterables.U64Iterable.mean:Missing documentation
WARNING:raphtory.iterables.U64Iterable.min:Missing documentation
WARNING:raphtory.iterables.U64Iterable.sum:Missing documentation
WARNING:raphtory.iterables.OptionUtcDateTimeIterable.collect:Missing documentation
WARNING:raphtory.iterables.ArcStringVecIterable.collect:Missing documentation

For operators a lot of the python return types are unclear, this includes many of the entries that were previously 'value'

ERROR:raphtory.filter.PropertyFilterOps.contains:Invalid return type 'FilterExpr': Unknown type FilterExpr
WARNING:raphtory.filter.PropertyFilterOps.contains:missing parameter value in docs.
ERROR:raphtory.filter.PropertyFilterOps.contains:parameter PropValue appears in documentation but does not exist.
ERROR:raphtory.filter.PropertyFilterOps.fuzzy_search:Invalid annotation 'usize' for parameter levenshtein_distance: Unknown type usize
ERROR:raphtory.filter.PropertyFilterOps.fuzzy_search:Invalid return type 'FilterExpr': Unknown type FilterExpr
ERROR:raphtory.filter.PropertyFilterOps.is_in:Invalid return type 'FilterExpr': Unknown type FilterExpr
WARNING:raphtory.filter.PropertyFilterOps.is_in:missing parameter values in docs.
ERROR:raphtory.filter.PropertyFilterOps.is_in:parameter list[PropValue] appears in documentation but does not exist.
ERROR:raphtory.filter.PropertyFilterOps.is_none:Invalid return type 'FilterExpr': Unknown type FilterExpr
ERROR:raphtory.filter.PropertyFilterOps.is_not_in:Invalid return type 'FilterExpr': Unknown type FilterExpr
WARNING:raphtory.filter.PropertyFilterOps.is_not_in:missing parameter values in docs.
ERROR:raphtory.filter.PropertyFilterOps.is_not_in:parameter list[PropValue] appears in documentation but does not exist.
ERROR:raphtory.filter.PropertyFilterOps.is_some:Invalid return type 'FilterExpr': Unknown type FilterExpr
ERROR:raphtory.filter.PropertyFilterOps.not_contains:Invalid return type 'FilterExpr': Unknown type FilterExpr
WARNING:raphtory.filter.PropertyFilterOps.not_contains:missing parameter value in docs.
ERROR:raphtory.filter.PropertyFilterOps.not_contains:parameter PropValue appears in documentation but does not exist.
WARNING:raphtory.filter.NodeFilterBuilder.contains:Missing return type annotation
WARNING:raphtory.filter.NodeFilterBuilder.contains:missing parameter value in docs.
ERROR:raphtory.filter.NodeFilterBuilder.contains:parameter str appears in documentation but does not exist.
WARNING:raphtory.filter.NodeFilterBuilder.fuzzy_search:Missing return type annotation
WARNING:raphtory.filter.NodeFilterBuilder.fuzzy_search:missing parameter value in docs.
ERROR:raphtory.filter.NodeFilterBuilder.fuzzy_search:parameter str appears in documentation but does not exist.
WARNING:raphtory.filter.NodeFilterBuilder.is_in:Missing return type annotation
WARNING:raphtory.filter.NodeFilterBuilder.is_in:missing parameter values in docs.
ERROR:raphtory.filter.NodeFilterBuilder.is_in:parameter list[str] appears in documentation but does not exist.
WARNING:raphtory.filter.NodeFilterBuilder.is_not_in:Missing return type annotation
WARNING:raphtory.filter.NodeFilterBuilder.is_not_in:missing parameter values in docs.
ERROR:raphtory.filter.NodeFilterBuilder.is_not_in:parameter list[str] appears in documentation but does not exist.
WARNING:raphtory.filter.NodeFilterBuilder.not_contains:Missing return type annotation
WARNING:raphtory.filter.NodeFilterBuilder.not_contains:missing parameter value in docs.
ERROR:raphtory.filter.NodeFilterBuilder.not_contains:parameter str appears in documentation but does not exist.
ERROR:raphtory.filter.Node.name:Invalid return type 'NodeFilterBuilder': Unknown type NodeFilterBuilder
ERROR:raphtory.filter.Node.node_type:Invalid return type 'NodeFilterBuilder': Unknown type NodeFilterBuilder
WARNING:raphtory.filter.EdgeFilterOp.contains:Missing return type annotation
WARNING:raphtory.filter.EdgeFilterOp.contains:missing parameter value in docs.
ERROR:raphtory.filter.EdgeFilterOp.fuzzy_search:Invalid annotation 'usize' for parameter levenshtein_distance: Unknown type usize
ERROR:raphtory.filter.EdgeFilterOp.fuzzy_search:Invalid return type 'FilterExpr': Unknown type FilterExpr
WARNING:raphtory.filter.EdgeFilterOp.fuzzy_search:missing parameter value in docs.
ERROR:raphtory.filter.EdgeFilterOp.fuzzy_search:parameter prop_value appears in documentation but does not exist.
WARNING:raphtory.filter.EdgeFilterOp.is_in:Missing return type annotation
WARNING:raphtory.filter.EdgeFilterOp.is_in:missing parameter values in docs.
WARNING:raphtory.filter.EdgeFilterOp.is_not_in:Missing return type annotation
WARNING:raphtory.filter.EdgeFilterOp.is_not_in:missing parameter values in docs.
WARNING:raphtory.filter.EdgeFilterOp.not_contains:Missing return type annotation
WARNING:raphtory.filter.EdgeFilterOp.not_contains:missing parameter value in docs.
WARNING:raphtory.filter.EdgeEndpoint.name:Missing documentation
WARNING:raphtory.filter.Edge.dst:Missing documentation
WARNING:raphtory.filter.Edge.src:Missing documentation
WARNING:raphtory.filter.Property.temporal:Missing documentation
WARNING:raphtory.filter.TemporalPropertyFilterBuilder.any:Missing documentation
WARNING:raphtory.filter.TemporalPropertyFilterBuilder.latest:Missing documentation

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'GraphQL Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 59feaed Previous: f14de7d Ratio
addNode 20 req/s 1460 req/s 73

This comment was automatically generated by workflow using github-action-benchmark.

Returns the source node of the edge.

Returns:
GqlNode:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this should be Node

/// Min result.
///
/// Returns:
/// value:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a Proptype i.e. if the property is a float it would be a float

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok and what can we do about that?

/// Returns the source node of the edge.
///
/// Returns:
/// Nodes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit unfortunte as for Edge this is a Node and for Edges this is a PathFrom I believe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't produce an error when stating 'Nodes' and we don't have a way to handle these multiple definitions. I can write some advice about that in the docstring but i need to know what the actual behaviour is to do that so some more detailed explanation would be helpful

/// Returns the id of the edge.
///
/// Returns:
/// GID:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a GID pair?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in it is a tuple [GID,GID] not a singular GID

///
/// Returns:
/// DegreeView: a view of the undirected node degrees
/// DegreeView: a view of the undirected node degrees.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will all of these Nodestates we are going to want to say these return a nodestate

///
/// Returns:
/// DataFrame: the view of the node data as a pandas Dataframe
/// DataFrame: the view of the node data as a pandas Dataframe.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be pandas.dataframe

/// Parameters:
/// file_path: (str)
///
/// Returns:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors?

/// path: (str)
/// subset: (bool)
///
/// Returns:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

errors?

@miratepuffin miratepuffin marked this pull request as ready for review September 30, 2025 11:19
@miratepuffin miratepuffin merged commit fe847d7 into master Sep 30, 2025
25 of 30 checks passed
@miratepuffin miratepuffin deleted the james/python-docstrings branch September 30, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants