Skip to content

refactor(system): add extendedProperties parameter - #96

Merged
cesarcoatl merged 1 commit into
8.3from
refactor/system/historian-queryAggregatedPoints-extendedProperties
Oct 9, 2026
Merged

cesarcoatl merged 1 commit into
8.3from
refactor/system/historian-queryAggregatedPoints-extendedProperties

Conversation

@cesarcoatl

@cesarcoatl cesarcoatl commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

system.historian.queryAggregatedPoints

Summary by Sourcery

Extend aggregated historian queries with optional SQL Historian properties.

New Features:

  • Add an optional extendedProperties dictionary to system.historian.queryAggregatedPoints for SQL Historian queries.

Enhancements:

  • Expose the new query parameter in the historian API type stubs.

Documentation:

  • Document the extendedProperties parameter for aggregated historian queries.

system.historian.queryAggregatedPoints
@sourcery-ai

sourcery-ai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR extends system.historian.queryAggregatedPoints with an optional, typed extendedProperties dictionary for SQL Historian query options, documenting and forwarding it consistently in both runtime code and type stubs.

Sequence diagram for historian query extended properties

sequenceDiagram
    participant Caller
    participant Historian
    participant BasicDataset
    Caller->>Historian: queryAggregatedPoints(paths, startDate, endDate, returnSize, extendedProperties)
    Historian->>Historian: queryAggregatedPoints(paths, startDate, endDate, aggregationMode, returnFormat, returnSize, extendedProperties)
    Historian-->>Caller: BasicDataset()
Loading

File-Level Changes

Change Details Files
Adds an optional extendedProperties dictionary to the historian aggregated-points query API and forwards it to the underlying implementation.
  • Imports dictionary typing support.
  • Adds the parameter with optional key/value typing to the runtime function and public documentation.
  • Passes the parameter through when invoking the historian query.
  • Updates the static stub signature to match the runtime API.
src/system/historian/__init__.py
stubs/stubs/system/historian/__init__.pyi

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="stubs/stubs/system/historian/__init__.pyi" line_range="20" />
<code_context>
     columnNames: Optional[List[Union[str, unicode]]] = ...,
     returnFormat: str = ...,
     returnSize: int = ...,
+    extendedProperties: Optional[Dict[Union[str, unicode], Any]] = ...,
 ) -> BasicDataset: ...
 def queryAnnotations(
</code_context>
<issue_to_address>
**New keyword fails type checking**

When a type checker resolves `system.historian` through the root-level or sibling module stub, the stub lacks an `extendedProperties` parameter, so calls passing that keyword are rejected and callers cannot type-check the new API parameter.

Add the `extendedProperties` parameter to the root-level `system.historian` stub to match the package stub.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: stubs/stubs/system/historian/__init__.pyi:20


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

columnNames: Optional[List[Union[str, unicode]]] = ...,
returnFormat: str = ...,
returnSize: int = ...,
extendedProperties: Optional[Dict[Union[str, unicode], Any]] = ...,

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.

🟡 Medium · New keyword fails type checking

When a type checker resolves system.historian through the root-level or sibling module stub, the stub lacks an extendedProperties parameter, so calls passing that keyword are rejected and callers cannot type-check the new API parameter.

Add the extendedProperties parameter to the root-level system.historian stub to match the package stub.

Prompt for AI agents
In `stubs/stubs/system/historian/__init__.pyi` at line 20:

**New keyword fails type checking**

When a type checker resolves `system.historian` through the root-level or sibling module stub, the stub lacks an `extendedProperties` parameter, so calls passing that keyword are rejected and callers cannot type-check the new API parameter.

Add the `extendedProperties` parameter to the root-level `system.historian` stub to match the package stub.

@cesarcoatl
cesarcoatl merged commit e2352fb into 8.3 Oct 9, 2026
5 checks passed
@cesarcoatl
cesarcoatl deleted the refactor/system/historian-queryAggregatedPoints-extendedProperties branch October 9, 2026 04:17
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.

1 participant