Skip to content

Improve get network attributes - #284

Merged
knoxsp merged 13 commits into
masterfrom
improve_get_network_attributes
Mar 10, 2026
Merged

Improve get network attributes#284
knoxsp merged 13 commits into
masterfrom
improve_get_network_attributes

Conversation

@knoxsp

@knoxsp knoxsp commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 tmpl variable to tmpl_i in update_template and 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.

Comment thread hydra_base/lib/network.py
Comment thread hydra_base/lib/attributes.py Outdated
Comment thread hydra_base/lib/attributes.py Outdated
Comment thread hydra_base/lib/attributes.py Outdated
Comment thread hydra_base/lib/template/__init__.py Outdated
Comment thread hydra_base/lib/network.py Outdated

Copilot AI commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

@knoxsp I've opened a new pull request, #285, to work on those changes. Once the pull request is ready, I'll request review from you.

knoxsp and others added 3 commits March 9, 2026 11:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

@knoxsp I've opened a new pull request, #286, to work on those changes. Once the pull request is ready, I'll request review from you.

knoxsp and others added 7 commits March 9, 2026 11:46
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@knoxsp
knoxsp merged commit 9184e12 into master Mar 10, 2026
10 checks passed
@knoxsp
knoxsp deleted the improve_get_network_attributes branch March 10, 2026 15:28
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.

3 participants