Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make more python functions private #1702

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

SouthEndMusic
Copy link
Collaborator

Fixes #1651

Copy link
Member

@visr visr left a comment

Choose a reason for hiding this comment

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

Looks good to me, once these are resolved:

ribasim_qgis/core/nodes.py:108: error: "QgsVectorLayer" has no attribute "_fields"; maybe "fields"?  [attr-defined]
ribasim_qgis/core/nodes.py:11[6](https://github.com/Deltares/Ribasim/actions/runs/10300476122/job/28509943889?pr=1702#step:7:7): error: "QgsVectorLayer" has no attribute "_fields"; maybe "fields"?  [attr-defined]
ribasim_qgis/core/nodes.py:188: error: "QgsVectorLayer" has no attribute "_fields"; maybe "fields"?  [attr-defined]
ribasim_qgis/core/topology.py:52: error: "QgsVectorLayer" has no attribute "_fields"; maybe "fields"?  [attr-defined]
ribasim_qgis/core/topology.py:116: error: "QgsVectorLayer" has no attribute "_fields"; maybe "fields"?  [attr-defined]

@visr
Copy link
Member

visr commented Aug 8, 2024

Does this fully fix #1651 though? I think our public API can be smaller still.

ribasim_qgis/core/topology.py Outdated Show resolved Hide resolved
@@ -113,7 +113,7 @@ def set_edge_properties(node: QgsVectorLayer, edge: QgsVectorLayer) -> None:
edge_xy = collect_edge_coordinates(edge)
from_fid, to_fid = derive_connectivity(node_index, node_xy, edge_xy)

edge_fields = edge.fields()
edge_fields = edge._fields()
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@visr visr merged commit 142150b into main Aug 8, 2024
29 of 30 checks passed
@visr visr deleted the make_private_python_functionality_private branch August 8, 2024 13:58
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.

Make parts of Ribasim Python that are not used by modelers private
3 participants