GenomicDataInfrastructure / gdi-userportal-dataset-discovery-service

0 stars 1 forks source link

chore: make ckan filters configurable #93

Closed brunopacheco1 closed 2 months ago

brunopacheco1 commented 2 months ago

Summary by Sourcery

Make CKAN filters configurable by replacing the static selected facets with a configurable property, allowing dynamic specification of dataset filters. Update the constructor and tests to support this new configuration.

Enhancements:

Tests:

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request makes CKAN filters configurable by introducing a new configuration property for dataset filters. The changes primarily affect the BeaconDatasetsRepository class, modifying how selected facets are handled and injected into the repository.

File-Level Changes

Files Changes
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java Introduced a new configuration property 'datasets.filters' to make CKAN filters configurable
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java Replaced the static SELECTED_FACETS constant with a dynamic selectedFacets field
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java Modified the constructor to accept the new datasets.filters configuration and initialize the selectedFacets field
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java Updated the searchCkan method to use the new selectedFacets field instead of the static SELECTED_FACETS constant
src/main/java/io/github/genomicdatainfrastructure/discovery/repositories/BeaconDatasetsRepository.java Reordered and regrouped class fields and constructor parameters for better organization
src/test/java/io/github/genomicdatainfrastructure/discovery/services/BeaconDatasetRepositoryTest.java Updated the test setup in BeaconDatasetRepositoryTest to include the new datasets.filters parameter

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.