Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: added adapter config to TlcAdapter #18

Merged
merged 12 commits into from
Sep 4, 2024
Merged

Conversation

janniclas
Copy link
Contributor

@janniclas janniclas commented Sep 2, 2024

  • removed KpiAdapter interface
  • added configuration to TlcAdapter
  • fixed missing recursive call in technical lag calculation
  • added missing test cases

- breaking: removed KpiAdapter interface
@janniclas janniclas requested a review from AnakinRaW September 2, 2024 12:45
@janniclas janniclas self-assigned this Sep 2, 2024
Copy link
Collaborator

@AnakinRaW AnakinRaW left a comment

Choose a reason for hiding this comment

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

Do you want to remove the SupportedTools enum too?


enum class ErrorType { DATA_VALIDATION_ERROR }

sealed class AdapterResult {
data class Success(val rawValueKpi: RawValueKpi) : AdapterResult()
sealed class Success(val rawValueKpi: RawValueKpi) : AdapterResult() {
class Kpi(rawValueKpi: RawValueKpi) : Success(rawValueKpi)
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you want these to be data classes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes but it was complicated.. :D
the following code is not allowed:
data class Kpi(override val rawValueKpi: RawValueKpi) : Success(rawValueKpi)
as we may not have override modifiers in primary constructors. We also must only have val / var in primary constructors. So we can't do the pattern we do with a class class Kpi(rawValueKpi: RawValueKpi) : Success(rawValueKpi) and "hand down" the rawValueKpi to its superclass.

@janniclas
Copy link
Contributor Author

SupportedTools.kt was removed

@janniclas janniclas merged commit 200ccab into main Sep 4, 2024
1 check passed
@janniclas janniclas deleted the feature/tlcConfig branch September 6, 2024 11:16
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