Skip to content

target_type is no more#33

Merged
nrnhines merged 2 commits into
masterfrom
katta/split_target_type
Aug 19, 2025
Merged

target_type is no more#33
nrnhines merged 2 commits into
masterfrom
katta/split_target_type

Conversation

@cattabiani
Copy link
Copy Markdown
Member

target_type was an enum that was built from the combination of section_type and compartments (this was a bool).

Now we have 2 enums that are passed by string in report.conf. This has several benefits:

  • inspection: we can understand more easily what we are passing
  • de-correlation: we can change one enum without changing the other
  • no need of special encoding/decoding: before we needed to pack and unpack the enums into 1
  • easier to expand in case more options arise

Drawbacks:

  • less performant since we need to encode/decode with strings

I think the drawback are totally ininfluent. Report parsing is not performance critical and clarity and simplicity should rein here

target_type was an enum that was built from the combination of section_type
and compartments (this was a bool).

Now we have 2 enums that are passed by string in report.conf. This has several
benefits:

- inspection: we can understand more easily what we are passing
- de-correlation: we can change one enum without changing the other
- no need of special encoding/decoding: before we needed to pack and
  unpack the enums into 1
- easier to expand in case more options arise

Drawbacks:

- less performant since we need to encode/decode with strings

I think the drawback are totally ininfluent. Report parsing is not
performance critical and clarity and simplicity should rein here
@cattabiani cattabiani self-assigned this Jul 24, 2025
@cattabiani cattabiani changed the title target_type is no more target_type is no more Jul 24, 2025
@cattabiani cattabiani requested review from JCGoran and nrnhines August 19, 2025 13:43
@nrnhines nrnhines merged commit 72aa868 into master Aug 19, 2025
2 checks passed
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