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

refactor: Clean up description call to rule engine #117

Merged
merged 12 commits into from
Jan 17, 2024

Conversation

enricocolasante
Copy link
Collaborator

@enricocolasante enricocolasante commented Dec 20, 2023

  • EventDate must use Instant instead of LocalDate
  • Check logs are working in dhis2-core
  • Clean up code and interface

Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

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

Looks like a really nice cleanup to me :)

Comment on lines +3 to +7
data class RuleAction(
val data: String?,
val type: String,
val values: Map<String, String> = emptyMap()
){
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice!

build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
Copy link
Member

@vgarciabnz vgarciabnz left a comment

Choose a reason for hiding this comment

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

Nice clean up

@enricocolasante enricocolasante merged commit 23dd168 into mp-prepare Jan 17, 2024
2 checks passed
enricocolasante added a commit that referenced this pull request Jan 17, 2024
* chore: RuleContent and RuleEffects as records

* chore: RuleEvaluationResult as record

* chore: RuleValidationResult as record

* chore: removed unused TimeInterval

* chore: DataItem as record

* chore: RuleEngineExecution as record

* chore: RuleEngineMultipleExecution as record

* chore: RuleVariableValue as record

* chore: RuleEnrollment, RuleEvent as record

* chore: removed unused class SupplementaryData

* chore: RuleEngine as record

* chore: RuleVariableValueMap as record

* chore: cleanup RuleVariableValueMapBuilder

* chore: RuleAction hierarchy as records

* chore: RuleDataValue as record

* chore: general cleanup

* chore: RuleVariable hierarchy as records and interfaces

* chore: RuleAttributeValue as record

* chore: RuleActionAttribute hierarchy to records

* chore: general cleanuo

* chore: test cleanup

* chore: removed unused dependency

* chore: remove common lang dependency

* chore: replace joda time with java.time

* chore: removed equalsverifier dependency

* chore: replaced assertj with vanilla junit

* chore: replace @nullable with @checkfornull

* chore: removed mockito dependency

* chore: replace slf4j with java.util.logging

* chore: removed apache commons dependency

* chore: replace Arrays.asList with List.of

* chore: replace Arrays.asList with List.of

* chore: general cleanup

* chore: use KMP expression parser snapshot

* refactor: RuleEngine, RuleValidationResult, AttributeType to kotlin

* refactor: RuleEngineTest to kotlin

* refactor: RuleActionHideField to kotlin

* refactor RuleActionHideProgramStage to kotlin

* refactor enums to kotlin

* refactor rule effects to kotlin

* put list of envs back

* Update github actions

* refactor utils to kotlin

* refactor option and dataItem to kotlin

* refactor ruleVariableValueMap to kotlin

* refactor ruleVariableValueMap to kotlin

* refactor Rule to kotlin and all related tests

* refactor RuleEvent to kotlin

* refactor RuleEngineContext to kotlin

* refactor RuleEnrollment to kotlin

* refactor RuleVariable to kotlin

* Make data for RuleEffect optional

* refactor RuleVariableValue to kotlin

* refactor hide actions to kotlin

* refactor more actions to kotlin

* refactor send actions to kotlin

* refactor mandatory action to kotlin

* refactor message action to kotlin

* refactor rule values to kotlin

* refactor assign action to kotlin

* last conversions to kotlin

* Allow null data for actions

* Add type for text actions

* Bump shanpshot version

* Create KMP structure

* Remove java.util.Callable usages

* Remove java.util.Map usages

* Remove Logger and Dates usages

* Move implementation to common

* Move tests to common

* Move tests to common

* refactor: Clean up description call to rule engine (#117)

* refactor: Clean up description call to rule engine

* refactor: Clean up evaluation call to rule engine

* refactor: Clean up evaluation call to rule engine

* refactor: EventDate changed from LocalDate to Instant

* Refactor package structure

* Refactor package structure

* Fix RuleAction interface

* Fix RuleAction interface

* Fix RuleEngine API interface

* Make engine package internal

* Make rule engine getInstance static for Java

* Update build.gradle.kts

---------

Co-authored-by: Enrico <enrico@dhis2.org>
Co-authored-by: Victor Garcia <vgarciabnz@gmail.com>
@enricocolasante enricocolasante deleted the interface_clean_up branch January 17, 2024 10:03
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