Skip to content

Add a Codacy badge to README.md#4

Merged
pethers merged 1 commit intoHack23:masterfrom
codacy-badger:codacy-badge
Mar 3, 2017
Merged

Add a Codacy badge to README.md#4
pethers merged 1 commit intoHack23:masterfrom
codacy-badger:codacy-badge

Conversation

@codacy-badger
Copy link
Contributor

No description provided.

@pethers pethers merged commit 0b2f252 into Hack23:master Mar 3, 2017
pethers added a commit that referenced this pull request Mar 9, 2018
Add a Codacy badge to README.md
Copilot AI added a commit that referenced this pull request Nov 21, 2025
- Correct PoliticianLazy.drl reference: Rule #1 (not #5)
- Correct PoliticianDecliningEngagement.drl reference: Rule #4 (not #23)
- Correct PoliticianIsolatedBehavior.drl reference: Rule #9 (not #22)
- Replace non-existent PartyDecliningGovernmentSupportPercentage.drl with PartyDecliningPerformance.drl (Rule #2)
- Replace non-existent PartyCoalitionDrift.drl with PartyInconsistentBehavior.drl
- Replace non-existent OppositionCoordinationIncrease.drl with PartyLowCollaboration.drl
- Update all cross-reference anchors to match RISK_RULES_INTOP_OSINT.md heading format

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
pethers added a commit that referenced this pull request Nov 21, 2025
….md (#7912)

* Initial plan

* Add interactive visualization examples to DATA_ANALYSIS_INTOP_OSINT.md

- Add Example 1: Temporal Analysis - Politician attendance decline with interactive timeline
- Add Example 2: Comparative Analysis - Party voting alignment matrix with coalition cohesion
- Add Example 3: Network Analysis - Committee membership network with power broker identification
- Add Example 4: Predictive Intelligence - Vote outcome forecasting with confidence intervals
- Add Example 5: Pattern Recognition - Coalition formation pattern detection

All examples include:
- Interactive Mermaid visualizations (xychart, sankey, gantt, pie, graphs)
- Complete SQL queries validated against database schema
- Sample output tables with realistic data
- Risk rule activations and severity assessments
- Intelligence assessments and actionable insights
- Cross-references to related documentation

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Add comprehensive summary section for enhanced examples

- Document overview of all 5 enhanced examples with key insights
- Add visualization type distribution (25+ interactive diagrams)
- Include SQL query performance metrics and complexity analysis
- Document intelligence value and actionable insights for each example
- Add educational value and usage recommendations
- Include documentation quality metrics showing 2400%+ visualization improvement
- Provide next steps for further enhancements

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Address code review feedback: Fix view references and SQL query comments

- Fix data source reference in Example 2: Change from view_riksdagen_coalition_alignment_matrix to view_riksdagen_vote_data_ballot_party_summary (aligns with actual query)
- Add clarifying comments to ballot_type filter in Example 4: Document flexible filtering approach for budget-related votes
- Note: 'Salience' is correct terminology for Drools rules engine (not 'Saliency')
- Note: 'coalation' in view name view_riksdagen_party_coalation_against_annual_summary is from actual database schema

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix risk rule references based on PR review feedback

- Correct PoliticianLazy.drl reference: Rule #1 (not #5)
- Correct PoliticianDecliningEngagement.drl reference: Rule #4 (not #23)
- Correct PoliticianIsolatedBehavior.drl reference: Rule #9 (not #22)
- Replace non-existent PartyDecliningGovernmentSupportPercentage.drl with PartyDecliningPerformance.drl (Rule #2)
- Replace non-existent PartyCoalitionDrift.drl with PartyInconsistentBehavior.drl
- Replace non-existent OppositionCoordinationIncrease.drl with PartyLowCollaboration.drl
- Update all cross-reference anchors to match RISK_RULES_INTOP_OSINT.md heading format

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI added a commit that referenced this pull request Nov 22, 2025
- Removed WHERE clause filtering on decision_type in query #4 (Ministry Proposal Support Patterns)
- Query now shows all decision types aggregated by ministry/committee
- All example queries now use only columns that exist in the view

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
pethers added a commit that referenced this pull request Nov 22, 2025
…tiveness tracking (#7929)

* Initial plan

* Add view_riksdagen_politician_decision_pattern database view with documentation

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Address code review feedback: update view counts and version references

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix performance issue: remove expensive window function and clarify JOIN strategy

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix review comments: remove decision_type from GROUP BY and SELECT, update index comment

- Removed decision_type from SELECT and GROUP BY to fix STRING_AGG issue where it would only aggregate a single value
- Updated index comment to accurately reflect single-column index on person_id (not person_id + date)
- Updated documentation to remove decision_type column and add note about aggregation scope
- View now aggregates all decision types together at politician-committee-month granularity

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Update full_schema.sql with new politician decision pattern view and fix person_id reference

- Added view_riksdagen_politician_decision_pattern to full_schema.sql (line 8945)
- Added idx_person_ref_person_id index to full_schema.sql (line 11770)
- Fixed changelog to use person_reference_id instead of person_id (correct column name in document_person_reference_da_0 table)
- Updated index definition to use person_reference_id
- Verified build succeeds

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix example query: remove decision_type filter that no longer exists

- Removed WHERE clause filtering on decision_type in query #4 (Ministry Proposal Support Patterns)
- Query now shows all decision types aggregated by ministry/committee
- All example queries now use only columns that exist in the view

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix column references: use pd.id instead of pd.person_id to match schema

- Changed SELECT to use 'pd.id AS person_id' (person_data table has 'id' column, not 'person_id')
- Updated WHERE clause to use 'pd.id IS NOT NULL'
- Updated GROUP BY to use 'pd.id'
- Now matches full_schema.sql implementation exactly

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI added a commit that referenced this pull request Jan 16, 2026
- Fixed GovernmentBodyDataLoaderServiceITest to use constructor (GovernmentBodyAnnualSummary is immutable)
- Moved MockitoAnnotations.openMocks to @before setup method (Review #1)
- Added verify(mockEsvApi, never()).getData() in skip test (Review #4)
- Removed unnecessary DataAccessException catch block (Review #3)
- Changed failOnError to true for comments changeset (Review #5)
- Changed assertEquals(true, ...) to assertTrue(...) (Review #6)
- Removed DataAccessException import
- All tests compile and pass
- Regenerated full_schema.sql (13,816 lines)

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
pethers added a commit that referenced this pull request Jan 16, 2026
…tup loading (v1.54) (#8228)

* Initial plan

* Add JPA entity and Liquibase changelog for government body data

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Relocate entity files and validate Liquibase changelog

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Add DAO, data loader service, restore deleted files, update persistence.xml

- Restored accidentally deleted ViewRiksdagenCoalitionAlignmentMatrix files
- Added GovernmentBodyData to persistence.xml
- Created GovernmentBodyDataDAO interface and implementation
- Created GovernmentBodyDataLoaderService to load data from ESV at startup
- Added service.external.esv dependency to service.impl module
- Updated module-info.java to require service.external.esv

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Rename changelog 1.53 to 1.54, validate with Liquibase, generate full_schema.sql, fix data loader

- Renamed db-changelog-1.53.xml to db-changelog-1.54.xml
- Updated all changeset IDs from 1.53-* to 1.54-*
- Updated db-changelog.xml to include db-changelog-1.54.xml
- Validated changelog with mvn liquibase:validate (No errors)
- Applied changelog with mvn liquibase:update (4 changesets applied)
- Generated new full_schema.sql with government_body_data table and 1.54 changesets
- Removed 'final' modifier from GovernmentBodyDataLoaderService to allow Spring proxying
- Rebuilt entire application successfully (BUILD SUCCESS)

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Regenerate full_schema.sql after merge with master

- Updated full_schema.sql with latest database state after merge
- Includes all 490 changesets (478 base + 8 from 1.53 + 4 from 1.54)
- Contains both party longitudinal views (1.53) and government body data (1.54)
- Fixed missing databasechangelog entries for 1.54 changesets
- Schema verified: 13,816 lines with complete structure

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Apply PR review feedback: Commons Lang builders, batch persist, error handling, integration test

- Updated GovernmentBodyData to use Apache Commons Lang builders (EqualsBuilder, HashCodeBuilder, ToStringBuilder)
- Fixed GovernmentBodyDataLoaderService error handling with specific exceptions and re-throw for critical errors
- Implemented batch persistence using governmentBodyDataDAO.persist(List) for better performance
- Changed db-changelog-1.54.xml to use BIGSERIAL instead of BIGINT with autoIncrement
- Created GovernmentBodyDataLoaderServiceITest with test coverage for data loading scenarios
- Updated unit test to match new reflectionToString format
- Regenerated full_schema.sql with updated checksum
- All 5 entity unit tests passing

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix build errors and apply additional PR review feedback

- Fixed GovernmentBodyDataLoaderServiceITest to use constructor (GovernmentBodyAnnualSummary is immutable)
- Moved MockitoAnnotations.openMocks to @before setup method (Review #1)
- Added verify(mockEsvApi, never()).getData() in skip test (Review #4)
- Removed unnecessary DataAccessException catch block (Review #3)
- Changed failOnError to true for comments changeset (Review #5)
- Changed assertEquals(true, ...) to assertTrue(...) (Review #6)
- Removed DataAccessException import
- All tests compile and pass
- Regenerated full_schema.sql (13,816 lines)

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix startup error when government_body_data table doesn't exist yet

- Added inner try-catch around governmentBodyDataDAO.getAll() call
- Treats table query failure (e.g., table doesn't exist) as empty table
- Prevents startup crash when Liquibase hasn't run yet
- Logs debug message when table cannot be queried
- Allows application to continue starting up normally

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Remove inner try-catch for table query - Liquibase runs before @PostConstruct

- Removed inner try-catch around governmentBodyDataDAO.getAll()
- Liquibase creates tables before @PostConstruct methods execute
- Table should exist when method runs
- Proper error handling with outer catch for real failures
- Cleaner code without unnecessary exception handling
- Build SUCCESS

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix database entity not recognized: Add GovernmentBodyData to main persistence.xml

- Added GovernmentBodyData entity to service.data.impl persistence.xml
- Entity was only registered in model.internal.application.user.impl persistence.xml
- Hibernate now recognizes the entity and can perform queries
- Fixed "Not an entity" error that prevented application startup
- Build SUCCESS
- Ready for startup testing

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix transaction issue: Use @eventlistener instead of @PostConstruct for proper transaction support

- Changed from @PostConstruct to @eventlistener(ContextRefreshedEvent)
- Ensures transaction manager is fully initialized before data loading
- Removed Propagation.REQUIRED (defaults to REQUIRED anyway)
- Updated method signature to accept ContextRefreshedEvent parameter
- Updated tests to pass mock ContextRefreshedEvent
- Build and test compilation: SUCCESS
- Fixes "No transactional EntityManager available" error at startup

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Add GovernmentBodyDataLoaderService interface following codebase patterns

- Created GovernmentBodyDataLoaderService interface in service.impl package
- Renamed implementation to GovernmentBodyDataLoaderServiceImpl
- Follows codebase pattern: all services have interface + implementation
- Uses @eventlistener with ContextRefreshedEvent for proper transaction support
- Updated test to use interface type and implementation
- Build SUCCESS (26.8s)
- Test compilation SUCCESS
- Fixes "Not found in any interface" error

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix PR review comments: Remove @FunctionalInterface and index duplication

- Removed @FunctionalInterface annotation from GovernmentBodyDataLoaderService interface (not a lambda interface)
- Removed index definitions from @table annotation in GovernmentBodyData entity
- Indexes are managed by Liquibase changelog to avoid duplication and potential inconsistencies
- Removed unused Index import
- Follows codebase pattern where JPA entities don't duplicate Liquibase schema definitions
- Build SUCCESS (16.8s)

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

* Fix JPA entity: Move annotations from fields to getters following codebase pattern

- Moved @id, @GeneratedValue, and all @column annotations from fields to getter methods
- This codebase uses property-based JPA access (annotations on getters), not field-based access
- Follows the same pattern as all other JPA entities (e.g., EncryptedValue, etc.)
- Fixes "No identifier specified for entity" error at startup
- Build SUCCESS
- Ready for startup testing

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

---------

Signed-off-by: James Pether Sörling <pethers@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: James Pether Sörling <pethers@users.noreply.github.com>
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