Skip to content

Add support for more template context - #2

Merged
ccrisan merged 2 commits into
mainfrom
feature/more-template-context
Aug 3, 2026
Merged

Add support for more template context#2
ccrisan merged 2 commits into
mainfrom
feature/more-template-context

Conversation

@ccrisan

@ccrisan ccrisan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

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 expands the template placeholder context available to qtoggleserver-generic-http, so HTTP request templates can reference device-wide attributes, per-port values/attributes, and metadata.

Changes:

  • Document additional placeholder context variables (device_attrs, port_attrs, port_values, metadata) and clarify placeholder casting notes.
  • Build and inject a richer evaluation context into HTTP request template rendering (poll + writes).
  • Update Ruff configuration (reordered selects; added BLE001 to ignores).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
README.md Documents the newly supported template context variables and clarifies placeholder behaviors.
qtoggleserver/generichttp/client.py Builds a common template context using expression evaluation context and wires it into poll/write flows.
pyproject.toml Adjusts Ruff lint configuration (select/ignore lists).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread qtoggleserver/generichttp/client.py Outdated
@ccrisan
ccrisan merged commit 994fbe8 into main Aug 3, 2026
3 checks passed
@ccrisan
ccrisan deleted the feature/more-template-context branch August 3, 2026 18:32
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