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

Clean up and improve layers api #1459

Merged
merged 8 commits into from
Jan 18, 2024
Merged

Conversation

ljeub-pometry
Copy link
Collaborator

What changes were proposed in this pull request?

  • add valid_layers and has_layer methods for easy checking of valid layers and ignoring invalid input
  • GraphQL api now uses valid_layers, restoring the old behaviour where non-existing layers are ignored instead of causing errors
  • empty layer list no longer causes all layers to be returned but rather an empty view!

Why are the changes needed?

quality of life

Does this PR introduce any user-facing change? If yes is this documented?

yes, new methods have docstrings

How was this patch tested?

added more tests for layering

Issues

Are there any further changes required?

Current behaviour for edges can be weird as they have two ways to specify layer (see #1458)

@miratepuffin miratepuffin merged commit 17f38d4 into master Jan 18, 2024
1 check passed
@miratepuffin miratepuffin deleted the feature/ImprovedLayersAPI branch January 18, 2024 22:49
fabianmurariu pushed a commit that referenced this pull request May 21, 2024
* add has_layer and valid_layers and change GQL apis to use valid_layers so they no longer error in annoying ways

* fix has_layer for layered graph

* clean up Layer conversion implementations

* add test

* clean up warnings

* fmt

* make sure materialize doesn't drop layers

---------

Co-authored-by: Ben Steer <b.a.steer@qmul.ac.uk>
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