Skip to content

EWB 3084 update python sdk#180

Merged
kgreav merged 65 commits intomainfrom
EWB-3084-Update-Python-SDK
May 16, 2025
Merged

EWB 3084 update python sdk#180
kgreav merged 65 commits intomainfrom
EWB-3084-Update-Python-SDK

Conversation

@chestm007
Copy link
Copy Markdown
Contributor

Description

Complete rewrite of the tracing API to match ewb-sdk-jvm. The new NetworkTrace now powers all tracing things

Associated tasks

There are still a handful of tests missing here, and some tidying up work to be done

  • investigate removing the need to be so verbose about the queue_conditions / stop_conditions. surely theres a way to magic them in there

Test Steps

TODO: Explain in detail how your reviewer can test the changes proposed in this PR. If it cannot be tested, leave an explanation on why.

Checklist

If any of these are not applicable, strikethrough the line ~like this~. Do not delete it!. Let the reviewer decide if you should have done it.

Code

  • I have performed a self review of my own code (including checking issues raised when creating the PR).
  • I have added/updated unit tests for these changes, and if not I have explained why they are not necessary.
  • I have commented my code in any hard-to-understand or hacky areas.
  • I have handled all new warnings generated by the compiler or IDE.
  • I have rebased onto the target branch (usually main).

Documentation

  • I have updated the changelog.
  • I have updated any documentation required for these changes.

Breaking Changes

  • I have considered if this is a breaking change and will communicate it with other team members by posting it on the Slack breaking-changes channel.

Please leave a summary of the breaking changes here and then post it on the Slack breaking-changes channel to notify the team about it.

chestm007 added 30 commits May 15, 2025 21:37
Set BusbarSection.max_terminals = 1
Tests not updated, 3 fails expected
…ry to ../traversal and fixed all references pointing too it

untested change
… it, but it reads very familiar to the kotlin code.
…in here, but ill wait a bit incase the answers are obvious later - marked with TODO:

items left in here:
 - finish off traversal.py
 - weighted_priority_queue.py
items left in here:
 - weighted_priority_queue.py (check if needed
 - phases
 - networktrace
 - feeder?
 - connectivity?
 - wait for everything to explode and deal with it then
actions directory done

items left in here:
 - weighted_priority_queue.py (check if needed
 - phases
 - feeder
 - connectivity
 - conditions
 - wait for everything to explode and deal with it then

 THE LIST IS GETTING SMALLER THOUGH
Update some imports, now to decipher feeders.

items left in here:
 - weighted_priority_queue.py (check if needed
 - phases
 - feeder
 - connectivity
 - conditions
 - wait for everything to explode and deal with it then

 THE LIST IS GETTING SMALLER THOUGH
theres a few changes missing, this seems to be the easiest way to track them nowm
…nt where i need some guidance on what magic these interfaces are doing :(
I'm in a groove now 👍
TODO: implement the rest of the constructors
175 tests pass now
IT breaks type hinting for the param :/ it works, but its unclear.
Pass and handle conditions properly, that was an absolute nightmare of a codepath to trace, should investigate if theres a clearer way to do this, i feel like there is but for now i just want this functional.
beginings of implementing `conditions` now that ive got a good handle on the internal logic of these functions, the cause of whole bunch of the remaining fails
Implemented bitwise phase tracking, interested to see difference in memory usage vs previous
chestm007 added 8 commits May 15, 2025 21:37
To fix:
- Bus branch
- Phase Inferrer (doing too much, and spitting out the wrong phase in 1 occurance | 5 fails total)
- TestNetworkDatabaseReader: i think this is working, just need to update the expected calls

#micdrop
7 fails left, 2 tests are actually broken, the other 5 work, but get the wrong output
Unused imports, duplicate methods, formatting, etc, etc
@chestm007 chestm007 requested a review from kgreav May 15, 2025 11:37
@ryanjcoleman
Copy link
Copy Markdown
Member

Task linked: EWB-3084 Update Python SDK

@chestm007 chestm007 force-pushed the EWB-3084-Update-Python-SDK branch from 7d38003 to 77c8a08 Compare May 15, 2025 11:39
@chestm007 chestm007 force-pushed the EWB-3084-Update-Python-SDK branch 2 times, most recently from b168cca to 3a43227 Compare May 15, 2025 12:09
chestm007 and others added 10 commits May 15, 2025 22:14
@chestm007 chestm007 force-pushed the EWB-3084-Update-Python-SDK branch from 81894d3 to ed8da23 Compare May 16, 2025 02:41
Signed-off-by: Max Chesterfield <max.chesterfield@zepben.com>
@kgreav kgreav merged commit 1f47bc2 into main May 16, 2025
2 of 3 checks passed
@kgreav kgreav deleted the EWB-3084-Update-Python-SDK branch May 16, 2025 03:46
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