Skip to content

Conversation

@NathanDissoubray
Copy link
Contributor

@NathanDissoubray NathanDissoubray commented Jan 16, 2026

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?

What kind of change does this PR introduce?

  • Change an error message missing a negation in it
  • Add a missing subcase for IdentifiableType.NETWORK

What is the current behavior?

  • Typo
  • Case IdentifiableType.Network in Network.getIdentifiableStream is considered as an exception, when we could get the Subnetworks of that given network instead (if they exist)

What is the new behavior (if this is a feature change)?

The NETWORK case now returns a stream of subnetworks instead of a PowsyblException
This stream starts with the parent network, followed by the subnetworks

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@olperr1 We discussed this, but it was kinda quick, so I'm not sure if this is what we actually want to do in this case, could you confirm I didn't misunderstand ? I'll add the test once I'm sure that's what we want to do

@NathanDissoubray NathanDissoubray self-assigned this Jan 16, 2026
@NathanDissoubray
Copy link
Contributor Author

I'm just surprised there is no GROUND (only DC_GROUND) in the AbstractSubnetworksExplorationTest, did I miss something ?

@NathanDissoubray
Copy link
Contributor Author

Should I add two tests for BUS and DC_BUS to check that they throw ? Because here we'll get 50% coverage on new code

@olperr1
Copy link
Member

olperr1 commented Jan 19, 2026

Should I add two tests for BUS and DC_BUS to check that they throw ? Because here we'll get 50% coverage on new code

I think you can add a testIdentifiableStreamUnsupportedType() test method, which assert that when a type is not supported (for instance BUS, there's no need to also have DC_BUS), an exception is thrown.

@sonarqubecloud
Copy link

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