Skip to content

Conversation

@dmarek-flex
Copy link
Contributor

@dmarek-flex dmarek-flex commented Feb 4, 2026

Note

Medium Risk
Touches a core source model and adds new validation-time warnings plus a new normalization mode; while defaults are preserved, behavior and user-visible logs change and could affect downstream workflows relying on implicit defaults.

Overview
Adds a new UniformCurrentSource.current_amplitude_definition field ("density" default, or "total") to support size-independent total-current injection, and updates the UniformCurrentSource docs/example accordingly.

Introduces a post-init validation warning when current_amplitude_definition is not explicitly set, signaling a future default change from "density" to "total", and propagates the new field into JSON schemas and key call sites (e.g., rectangular lumped port source creation) plus broad test updates/new warning coverage.

Written by Cursor Bugbot for commit b9c8e48. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/components/source/current.py (100%)

Summary

  • Total: 8 lines
  • Missing: 0 lines
  • Coverage: 100%

@dmarek-flex dmarek-flex force-pushed the dmarek/FXC-1530-current-source-normalization branch from 3a31f35 to 2348ec5 Compare February 5, 2026 00:48
Copy link
Collaborator

@weiliangjin2021 weiliangjin2021 left a comment

Choose a reason for hiding this comment

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

Just a small comment on naming.

@dmarek-flex dmarek-flex force-pushed the dmarek/FXC-1530-current-source-normalization branch 2 times, most recently from bcb6337 to 13f4669 Compare February 8, 2026 21:25
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@dmarek-flex dmarek-flex force-pushed the dmarek/FXC-1530-current-source-normalization branch 2 times, most recently from 2c8d636 to a937e89 Compare February 8, 2026 22:40
@dmarek-flex
Copy link
Contributor Author

I added a validation warning about changing the default behavior in the future. Is this how we typically do this?

@dmarek-flex dmarek-flex self-assigned this Feb 8, 2026
@dmarek-flex dmarek-flex added the RF label Feb 8, 2026
Copy link
Collaborator

@momchil-flex momchil-flex left a comment

Choose a reason for hiding this comment

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

Yeah, generally we've also been trying to say in which version exactly we would change the behavior. But if you're not sure (e.g. if we might end up changing it in rf but not in photonics) could leave as is.

So you preemptively updated tests to the new behavior?

@dmarek-flex
Copy link
Contributor Author

So you preemptively updated tests to the new behavior?

I had to change a lot of tests since they were emitting the warning, and then the AssertLogLevel would fail the test. Other tests, I changed just to remove the warning and preempt the new default behavior.

@dmarek-flex dmarek-flex force-pushed the dmarek/FXC-1530-current-source-normalization branch from a937e89 to 0585331 Compare February 10, 2026 19:03
@dmarek-flex dmarek-flex added this pull request to the merge queue Feb 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@dmarek-flex dmarek-flex force-pushed the dmarek/FXC-1530-current-source-normalization branch from 0585331 to b9c8e48 Compare February 10, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants