Improve get network attributes - #284
Merged
Merged
Conversation
added 2 commits
March 6, 2026 13:05
…utes_in_network function
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors and extends attribute retrieval logic to better support fetching attributes scoped to a network (and improves template-linked attribute lookup), while making a small internal rename in template update logic.
Changes:
- Renames the local
tmplvariable totmpl_iinupdate_templateand updates dependent references. - Adds
get_all_attributes_in_network()to retrieve all attribute definitions referenced by any resource attribute in a network. - Reworks template attribute retrieval and refactors
get_all_resource_attributes()to return JSONObjects enriched with basic attribute fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| hydra_base/lib/template/init.py | Refactors update_template variable naming and updates references. |
| hydra_base/lib/network.py | Adds a new helper to list all attribute definitions present in a network. |
| hydra_base/lib/attributes.py | Fixes/rewrites template attribute retrieval; refactors network resource-attribute retrieval and docstrings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3 tasks
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: knoxsp <9108420+knoxsp@users.noreply.github.com>
…d permissions Co-authored-by: knoxsp <9108420+knoxsp@users.noreply.github.com>
Co-authored-by: knoxsp <9108420+knoxsp@users.noreply.github.com>
Add tests for get_all_attributes_in_network
Push template_id filter into SQL in get_all_resource_attributes
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.