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

Fmd 1081 publication details page #1112

Merged
merged 38 commits into from
Dec 4, 2024
Merged

Conversation

hjribeiro-moj
Copy link
Contributor

Add support for publication collection and publication dataset subtype:

  • details.py
    • Added classes PublicationCollectionDetailsService and PublicationDatasetDetailsService
    • Minor refactor pulling defining template away from views
  • search.py
    • Allow search by subtype
  • removed elif blocks throughout the code replacing them with mappings
  • datahub_client:
    • Added 2 methods to get PublicationCollectionDetails and PublicationDataseDetails
  • extended graphql queries to return externalURL used on both new services
  • Added New classes for types and subtype to avoid magic strings

@hjribeiro-moj hjribeiro-moj requested a review from a team as a code owner November 28, 2024 08:16
@hjribeiro-moj hjribeiro-moj force-pushed the fmd-1081-publication-details-page branch from abf5f48 to 2c4c8c1 Compare November 28, 2024 08:17
@hjribeiro-moj
Copy link
Contributor Author

Need to fix tag on pub_dataset:

image

@hjribeiro-moj
Copy link
Contributor Author

publication collections:

image

@hjribeiro-moj hjribeiro-moj marked this pull request as draft November 28, 2024 08:23
@murdo-moj
Copy link
Contributor

murdo-moj commented Nov 28, 2024

A more general note on refactoring stuff we'd still to do after we finished yesterday:

  • Align the details services with the datahub entity types and subtypes (eg Class for the parent entity type of DatasetDetailsService, subclass it for the subtype details services eg TableDetailsService)
  • Finalise designs for the new publications details pages (where to link to gov.uk)
  • Check the filters are working as expected with subtypes (eg searching for tables returns publication datasets currently) (created bug)
  • Mat M suggested on another PR to split the entity parse methods into parser classes. Seems like a nice idea.
  • Add some selenium tests for the new details pages? (new ticket)

murdo-moj and others added 9 commits November 29, 2024 14:46
  - Added Datahub entity types to ResiultType class
  - Used the uupdated class as mapping in search.py

Signed-off-by: Helder Ribeiro <[email protected]>
  - Added datahub client
  - Added details page and handler

Signed-off-by: Helder Ribeiro <[email protected]>
Signed-off-by: Helder Ribeiro <[email protected]>
Signed-off-by: Helder Ribeiro <[email protected]>
Signed-off-by: Helder Ribeiro <[email protected]>
@hjribeiro-moj hjribeiro-moj force-pushed the fmd-1081-publication-details-page branch from d7eaa42 to 5cd2347 Compare November 29, 2024 15:25
Signed-off-by: Helder Ribeiro <[email protected]>
Signed-off-by: Helder Ribeiro <[email protected]>
Signed-off-by: Helder Ribeiro <[email protected]>
Signed-off-by: Helder Ribeiro <[email protected]>
@murdo-moj murdo-moj marked this pull request as ready for review December 3, 2024 14:41
lib/datahub-client/data_platform_catalogue/entities.py Outdated Show resolved Hide resolved
lib/datahub-client/data_platform_catalogue/entities.py Outdated Show resolved Hide resolved
lib/datahub-client/data_platform_catalogue/entities.py Outdated Show resolved Hide resolved
lib/datahub-client/data_platform_catalogue/entities.py Outdated Show resolved Hide resolved
lib/datahub-client/data_platform_catalogue/search_types.py Outdated Show resolved Hide resolved
home/service/details.py Show resolved Hide resolved
home/service/search.py Outdated Show resolved Hide resolved
Copy link
Contributor

@murdo-moj murdo-moj left a comment

Choose a reason for hiding this comment

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

🚀

@murdo-moj murdo-moj merged commit e356b2a into main Dec 4, 2024
10 checks passed
@murdo-moj murdo-moj deleted the fmd-1081-publication-details-page branch December 4, 2024 13:32
Copy link

sentry-io bot commented Dec 5, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ AttributeError: 'FindMoJDataEntityType' object has no attribute 'datahub_type' /search View Issue
  • ‼️ ValidationError: 1 validation error for EntitySummary /details/{result_type}/{urn} View Issue

Did you find this useful? React with a 👍 or 👎

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.

4 participants