-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add new Drools rules and move existing rules to new folder structure #6886
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#6885 Add new Drools rules and move existing rules to a new folder structure. * Add `PoliticianAttendance.drl` with rules for checking low daily attendance and low attendance in a specific region. * Add `PartyAttendance.drl` with rules for checking high abstain rates, high absence rates for new parties, and no official documents. * Add `PoliticianLeadership.drl` with rules for checking high committee leadership ratio and multiple committee leadership roles. * Add `PartyLeadership.drl` with rules for checking single person controlling multiple leadership roles and forming coalitions with previously opposed parties. * Add `PoliticianAgeAndExperience.drl` with rules for checking extensive EU experience but zero government experience and overshadowed committee leadership. * Add `PartyAgeAndExperience.drl` with rules for checking low headcount but claims nationwide reach. * Add `PoliticianDocumentActivity.drl` with rules for checking high daily and annual document output. * Add `PartyDocumentActivity.drl` with rules for checking no official documents. * Add `PoliticianSpeechMotion.drl` with rules for checking zero motions filed in the past year. * Add `PartyPressReleases.drl` with rules for checking no press releases in the past year. * Add `PoliticianComplianceGeneral.drl` with rules for general compliance checks for politicians. * Add `PartyComplianceGeneral.drl` with rules for general compliance checks for parties. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Hack23/cia?shareId=XXXX-XXXX-XXXX-XXXX).
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files |
…)` from `PoliticianComplianceCheckImpl.java`
* **Imports** - Remove references to `ViewRiksdagenPoliticianDocumentDailySummary`, `ViewRiksdagenPoliticianDocument`, and `ViewRiksdagenPartyDocumentDailySummary` from `com.hack23.cia.model.internal.application.data.politician.impl` and `com.hack23.cia.model.internal.application.data.party.impl` - Add references to `ViewRiksdagenPoliticianDocumentDailySummary`, `ViewRiksdagenPoliticianDocument`, and `ViewRiksdagenPartyDocumentDailySummary` from `com.hack23.cia.model.internal.application.data.document.impl`
* Replace `getDocumentCount()` with `getTotalAssignments()` in `PartyComplianceCheckImpl` and `PoliticianComplianceCheckImpl` * Replace `getPressReleaseCount()` with `getCurrentAssignments()` in `PartyComplianceCheckImpl` * Replace `getPartySwitchingCount()` with `getTotalPartyAssignments()` in `PartyComplianceCheckImpl` * Replace `getPersonId()` with `getEmbeddedId().getPersonId()` and `getPartyShortCode()` with `getEmbeddedId().getPartyShortCode()` in `RulesEngineImpl` * Implement proper null checks and handle long to int conversions explicitly using `Math.min()` in `RulesEngineImpl`
* Replace `getDocumentCount()` with `getTotalAssignments()` and handle long to int conversion using `Math.min()` in `PartyComplianceCheckImpl.java` and `PoliticianComplianceCheckImpl.java` * Replace `getPressReleaseCount()` with `getCurrentAssignments()` and handle long to int conversion using `Math.min()` in `PartyComplianceCheckImpl.java` * Replace `getPartySwitchingCount()` with `getTotalPartyAssignments()` and handle long to int conversion using `Math.min()` in `PartyComplianceCheckImpl.java` * Implement proper null checks when accessing embedded objects in `RulesEngineImpl.java`
… and `PartyComplianceCheckImpl.java`. * **RulesEngineImpl.java** - Replace `getEmbeddedId()` with `getPersonReferenceId()` in `ViewRiksdagenPoliticianDocument` - Implement proper null checks when accessing embedded objects * **PartyComplianceCheckImpl.java** - Replace `getDocumentCount()` with `getTotalAssignments()` - Replace `getPressReleaseCount()` with `getCurrentAssignments()` - Replace `getPartySwitchingCount()` with `getTotalPartyAssignments()` - Handle long to int conversions explicitly using `Math.min()`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#6885
Add new Drools rules and move existing rules to a new folder structure.
PoliticianAttendance.drl
with rules for checking low daily attendance and low attendance in a specific region.PartyAttendance.drl
with rules for checking high abstain rates, high absence rates for new parties, and no official documents.PoliticianLeadership.drl
with rules for checking high committee leadership ratio and multiple committee leadership roles.PartyLeadership.drl
with rules for checking single person controlling multiple leadership roles and forming coalitions with previously opposed parties.PoliticianAgeAndExperience.drl
with rules for checking extensive EU experience but zero government experience and overshadowed committee leadership.PartyAgeAndExperience.drl
with rules for checking low headcount but claims nationwide reach.PoliticianDocumentActivity.drl
with rules for checking high daily and annual document output.PartyDocumentActivity.drl
with rules for checking no official documents.PoliticianSpeechMotion.drl
with rules for checking zero motions filed in the past year.PartyPressReleases.drl
with rules for checking no press releases in the past year.PoliticianComplianceGeneral.drl
with rules for general compliance checks for politicians.PartyComplianceGeneral.drl
with rules for general compliance checks for parties.For more details, open the Copilot Workspace session.