From 45f686284164bdd119c206ca86e704b0d4a099a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:14:37 +0000 Subject: [PATCH 1/5] Chore(deps): Bump @ministryofjustice/frontend from 3.3.0 to 3.3.1 (#1216) Bumps [@ministryofjustice/frontend](https://github.com/ministryofjustice/moj-frontend) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/ministryofjustice/moj-frontend/releases) - [Changelog](https://github.com/ministryofjustice/moj-frontend/blob/main/CHANGELOG.md) - [Commits](https://github.com/ministryofjustice/moj-frontend/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: "@ministryofjustice/frontend" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 728455c6..8be7c3b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "": { "dependencies": { "@babel/preset-env": "^7.26.0", - "@ministryofjustice/frontend": "^3.3.0", + "@ministryofjustice/frontend": "^3.3.1", "babel-jest": "^29.7.0", "govuk-frontend": "^5.7.1", "jest-environment-jsdom": "^29.7.0", @@ -2301,9 +2301,9 @@ "dev": true }, "node_modules/@ministryofjustice/frontend": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@ministryofjustice/frontend/-/frontend-3.3.0.tgz", - "integrity": "sha512-kK1+XTI8KPgL2kA3ylTkXfXqA2cirENh1oxTYnvogt6W8vg5VexGSYjynRZ5EhRUAQh6uHPmOGyr+mYXmNwReQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@ministryofjustice/frontend/-/frontend-3.3.1.tgz", + "integrity": "sha512-4npwkub8xkhp+YFUK9MIm8armTTs7hzkvT33Ijetxi6aI4Ezzym7XPv4XjQavYAewmv+CHv6WqbBCqtJrWwtmg==", "dependencies": { "govuk-frontend": "^5.0.0", "moment": "^2.27.0" diff --git a/package.json b/package.json index d56e42c3..4689f59b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "dependencies": { "@babel/preset-env": "^7.26.0", - "@ministryofjustice/frontend": "^3.3.0", + "@ministryofjustice/frontend": "^3.3.1", "babel-jest": "^29.7.0", "govuk-frontend": "^5.7.1", "jest-environment-jsdom": "^29.7.0", From d823a77cab484a38ea815095a469bea886cab23b Mon Sep 17 00:00:00 2001 From: Mat Date: Mon, 13 Jan 2025 09:46:43 +0000 Subject: [PATCH 2/5] refactor: rename domain -> subject area (#1215) * refactor: rename domain -> subject area * refactor: further renaming --- home/forms/search.py | 22 +++---- home/models/domain_model.py | 25 -------- home/models/subject_area_taxonomy.py | 27 +++++++++ home/service/search.py | 32 ++++++----- ...ain_fetcher.py => subject_area_fetcher.py} | 8 +-- home/views.py | 14 ++--- .../client/datahub_client.py | 57 +++++++++---------- .../client/search/search_client.py | 10 ++-- .../data_platform_catalogue/search_types.py | 6 +- .../test_integration_with_datahub_server.py | 10 +--- tests/conftest.py | 22 +++---- 11 files changed, 117 insertions(+), 116 deletions(-) delete mode 100644 home/models/domain_model.py create mode 100644 home/models/subject_area_taxonomy.py rename home/service/{domain_fetcher.py => subject_area_fetcher.py} (79%) diff --git a/home/forms/search.py b/home/forms/search.py index 125e9167..cfa8e194 100644 --- a/home/forms/search.py +++ b/home/forms/search.py @@ -2,22 +2,24 @@ from urllib.parse import urlencode from data_platform_catalogue.entities import FindMoJdataEntityType -from data_platform_catalogue.search_types import DomainOption +from data_platform_catalogue.search_types import SubjectAreaOption from django import forms -from ..models.domain_model import Domain -from ..service.domain_fetcher import DomainFetcher +from ..models.subject_area_taxonomy import SubjectArea from ..service.search_tag_fetcher import SearchTagFetcher +from ..service.subject_area_fetcher import SubjectAreaFetcher -def get_domain_choices() -> list[Domain]: - """Make Domains API call to obtain domain choices""" +def get_subject_area_choices() -> list[SubjectArea]: + """Make Domains API call to obtain subject area choices""" choices = [ - Domain("", "All subject areas"), + SubjectArea("", "All subject areas"), ] - list_domain_options: list[DomainOption] = DomainFetcher().fetch() - domains: list[Domain] = [Domain(d.urn, d.name) for d in list_domain_options] - choices.extend(domains) + subject_area_options: list[SubjectAreaOption] = SubjectAreaFetcher().fetch() + subject_areas: list[SubjectArea] = [ + SubjectArea(d.urn, d.name) for d in subject_area_options + ] + choices.extend(subject_areas) return choices @@ -64,7 +66,7 @@ class SearchForm(forms.Form): ), ) domain = forms.ChoiceField( - choices=get_domain_choices, + choices=get_subject_area_choices, required=False, widget=forms.Select( attrs={ diff --git a/home/models/domain_model.py b/home/models/domain_model.py deleted file mode 100644 index b06cdb3f..00000000 --- a/home/models/domain_model.py +++ /dev/null @@ -1,25 +0,0 @@ -import logging -from typing import NamedTuple - -from data_platform_catalogue.search_types import DomainOption - -logger = logging.getLogger(__name__) - - -class Domain(NamedTuple): - urn: str - label: str - - -class DomainModel: - def __init__(self, domains: list[DomainOption]): - self.labels = {} - - self.top_level_domains = [Domain(domain.urn, domain.name) for domain in domains] - logger.info(f"{self.top_level_domains=}") - - for urn, label in self.top_level_domains: - self.labels[urn] = label - - def get_label(self, urn): - return self.labels.get(urn, urn) diff --git a/home/models/subject_area_taxonomy.py b/home/models/subject_area_taxonomy.py new file mode 100644 index 00000000..3ec34199 --- /dev/null +++ b/home/models/subject_area_taxonomy.py @@ -0,0 +1,27 @@ +import logging +from typing import NamedTuple + +from data_platform_catalogue.search_types import SubjectAreaOption + +logger = logging.getLogger(__name__) + + +class SubjectArea(NamedTuple): + urn: str + label: str + + +class SubjectAreaTaxonomy: + def __init__(self, subject_areas: list[SubjectAreaOption]): + self.labels = {} + + self.top_level_subject_areas = [ + SubjectArea(domain.urn, domain.name) for domain in subject_areas + ] + logger.info(f"{self.top_level_subject_areas=}") + + for urn, label in self.top_level_subject_areas: + self.labels[urn] = label + + def get_label(self, urn): + return self.labels.get(urn, urn) diff --git a/home/service/search.py b/home/service/search.py index 9564c16a..2888dfaf 100644 --- a/home/service/search.py +++ b/home/service/search.py @@ -4,26 +4,26 @@ from data_platform_catalogue.entities import FindMoJdataEntityMapper, Mappers from data_platform_catalogue.search_types import ( - DomainOption, MultiSelectFilter, SearchResponse, SortOption, + SubjectAreaOption, ) from django.conf import settings from django.core.paginator import Paginator from nltk.stem import PorterStemmer from home.forms.search import SearchForm -from home.models.domain_model import DomainModel +from home.models.subject_area_taxonomy import SubjectAreaTaxonomy from .base import GenericService -from .domain_fetcher import DomainFetcher +from .subject_area_fetcher import SubjectAreaFetcher class SearchService(GenericService): def __init__(self, form: SearchForm, page: str, items_per_page: int = 20): - domains: list[DomainOption] = DomainFetcher().fetch() - self.domain_model = DomainModel(domains) + subject_areas: list[SubjectAreaOption] = SubjectAreaFetcher().fetch() + self.subject_area_taxonomy = SubjectAreaTaxonomy(subject_areas) self.stemmer = PorterStemmer() self.form = form if self.form.is_bound: @@ -79,7 +79,7 @@ def _get_search_results(self, page: str, items_per_page: int) -> SearchResponse: else "ascending" ) - domain = form_data.get("domain", "") + subject_area = form_data.get("domain", "") tags = form_data.get("tags", "") where_to_access = self._build_custom_property_filter( "dc_where_to_access_dataset=", form_data.get("where_to_access", []) @@ -87,8 +87,8 @@ def _get_search_results(self, page: str, items_per_page: int) -> SearchResponse: entity_types = self._build_entity_types(form_data.get("entity_types", [])) filter_value = [] - if domain: - filter_value.append(MultiSelectFilter("domains", [domain])) + if subject_area: + filter_value.append(MultiSelectFilter("domains", [subject_area])) if where_to_access: filter_value.append(MultiSelectFilter("customProperties", where_to_access)) if tags: @@ -122,13 +122,15 @@ def _get_paginator(self, items_per_page: int) -> Paginator: def _generate_remove_filter_hrefs(self) -> dict[str, dict[str, str]] | None: if self.form.is_bound: - domain = self.form.cleaned_data.get("domain", "") + subject_area = self.form.cleaned_data.get("domain", "") entity_types = self.form.cleaned_data.get("entity_types", []) where_to_access = self.form.cleaned_data.get("where_to_access", []) tags = self.form.cleaned_data.get("tags", []) remove_filter_hrefs = {} - if domain: - remove_filter_hrefs["Subject area"] = self._generate_domain_clear_href() + if subject_area: + remove_filter_hrefs["Subject area"] = ( + self._generate_subject_area_clear_href() + ) if entity_types: entity_types_clear_href = {} for entity_type in entity_types: @@ -161,17 +163,17 @@ def _generate_remove_filter_hrefs(self) -> dict[str, dict[str, str]] | None: return remove_filter_hrefs - def _generate_domain_clear_href( + def _generate_subject_area_clear_href( self, ) -> dict[str, str]: - domain = self.form.cleaned_data.get("domain", "") + subject_area = self.form.cleaned_data.get("domain", "") - label = self.domain_model.get_label(domain) + label = self.subject_area_taxonomy.get_label(subject_area) return { label: ( self.form.encode_without_filter( - filter_name="domain", filter_value=domain + filter_name="domain", filter_value=subject_area ) ) } diff --git a/home/service/domain_fetcher.py b/home/service/subject_area_fetcher.py similarity index 79% rename from home/service/domain_fetcher.py rename to home/service/subject_area_fetcher.py index f15e3e3c..a279a2d0 100644 --- a/home/service/domain_fetcher.py +++ b/home/service/subject_area_fetcher.py @@ -1,10 +1,10 @@ -from data_platform_catalogue.search_types import DomainOption +from data_platform_catalogue.search_types import SubjectAreaOption from django.core.cache import cache from .base import GenericService -class DomainFetcher(GenericService): +class SubjectAreaFetcher(GenericService): """ DomainFetcher implementation to fetch domains with the total number of associated entities from the backend. @@ -16,7 +16,7 @@ def __init__(self, filter_zero_entities: bool = True): self.cache_timeout_seconds = 300 self.filter_zero_entities = filter_zero_entities - def fetch(self) -> list[DomainOption]: + def fetch(self) -> list[SubjectAreaOption]: """ Fetch a static list of options that is independent of the search query and any applied filters. Values are cached for 5 seconds to avoid @@ -29,5 +29,5 @@ def fetch(self) -> list[DomainOption]: cache.set(self.cache_key, result, timeout=self.cache_timeout_seconds) if self.filter_zero_entities: - result = [domain for domain in result if domain.total > 0] + result = [subject_area for subject_area in result if subject_area.total > 0] return result diff --git a/home/views.py b/home/views.py index 1108b925..40aa4c5b 100644 --- a/home/views.py +++ b/home/views.py @@ -11,7 +11,7 @@ PublicationDatasetEntityMapping, TableEntityMapping, ) -from data_platform_catalogue.search_types import DomainOption +from data_platform_catalogue.search_types import SubjectAreaOption from django.conf import settings from django.http import Http404, HttpResponse, HttpResponseBadRequest from django.shortcuts import render @@ -31,10 +31,10 @@ DatabaseDetailsCsvFormatter, DatasetDetailsCsvFormatter, ) -from home.service.domain_fetcher import DomainFetcher from home.service.glossary import GlossaryService from home.service.metadata_specification import MetadataSpecificationService from home.service.search import SearchService +from home.service.subject_area_fetcher import SubjectAreaFetcher type_details_map = { TableEntityMapping.url_formatted: DatasetDetailsService, @@ -49,10 +49,10 @@ @cache_control(max_age=300, private=True) def home_view(request): """ - Displys only domains that have entities tagged for display in the catalog. + Displys only subject areas that have entities tagged for display in the catalog. """ - domains: list[DomainOption] = DomainFetcher().fetch() - context = {"domains": domains, "h1_value": "Home"} + subject_areas: list[SubjectAreaOption] = SubjectAreaFetcher().fetch() + context = {"domains": subject_areas, "h1_value": "Home"} return render(request, "home.html", context) @@ -130,7 +130,7 @@ def metadata_specification_view(request): def cookies_view(request): - valid_domains = [ + valid_subject_areas = [ urlparse(origin).netloc for origin in settings.CSRF_TRUSTED_ORIGINS ] referer = request.META.get("HTTP_REFERER") @@ -139,7 +139,7 @@ def cookies_view(request): referer_domain = urlparse(referer).netloc # Validate this referer domain against declared valid domains - if referer_domain not in valid_domains: + if referer_domain not in valid_subject_areas: referer = "/" # Set to home page if invalid context = { diff --git a/lib/datahub-client/data_platform_catalogue/client/datahub_client.py b/lib/datahub-client/data_platform_catalogue/client/datahub_client.py index 417f4128..b76bd5e2 100644 --- a/lib/datahub-client/data_platform_catalogue/client/datahub_client.py +++ b/lib/datahub-client/data_platform_catalogue/client/datahub_client.py @@ -3,33 +3,6 @@ from importlib.resources import files from typing import Sequence -from datahub.configuration.common import ConfigurationError -from datahub.emitter import mce_builder -from datahub.emitter.mcp import MetadataChangeProposalWrapper -from datahub.ingestion.graph.client import DatahubClientConfig, DataHubGraph -from datahub.ingestion.source.common.subtypes import ( - DatasetContainerSubTypes, - DatasetSubTypes, -) -from datahub.metadata import schema_classes -from datahub.metadata.com.linkedin.pegasus2avro.common import DataPlatformInstance -from datahub.metadata.schema_classes import ( - ChangeTypeClass, - ContainerClass, - ContainerPropertiesClass, - DatasetPropertiesClass, - DomainPropertiesClass, - DomainsClass, - OtherSchemaClass, - OwnerClass, - OwnershipClass, - OwnershipTypeClass, - SchemaFieldClass, - SchemaFieldDataTypeClass, - SchemaMetadataClass, - SubTypesClass, -) - from data_platform_catalogue.client.exceptions import ( AspectDoesNotExist, ConnectivityError, @@ -63,10 +36,36 @@ TableEntityMapping, ) from data_platform_catalogue.search_types import ( - DomainOption, MultiSelectFilter, SearchResponse, SortOption, + SubjectAreaOption, +) +from datahub.configuration.common import ConfigurationError +from datahub.emitter import mce_builder +from datahub.emitter.mcp import MetadataChangeProposalWrapper +from datahub.ingestion.graph.client import DatahubClientConfig, DataHubGraph +from datahub.ingestion.source.common.subtypes import ( + DatasetContainerSubTypes, + DatasetSubTypes, +) +from datahub.metadata import schema_classes +from datahub.metadata.com.linkedin.pegasus2avro.common import DataPlatformInstance +from datahub.metadata.schema_classes import ( + ChangeTypeClass, + ContainerClass, + ContainerPropertiesClass, + DatasetPropertiesClass, + DomainPropertiesClass, + DomainsClass, + OtherSchemaClass, + OwnerClass, + OwnershipClass, + OwnershipTypeClass, + SchemaFieldClass, + SchemaFieldDataTypeClass, + SchemaMetadataClass, + SubTypesClass, ) logger = logging.getLogger(__name__) @@ -222,7 +221,7 @@ def list_domains( query: str = "*", filters: Sequence[MultiSelectFilter] | None = None, count: int = 1000, - ) -> list[DomainOption]: + ) -> list[SubjectAreaOption]: """ Returns a list of DomainOption objects """ diff --git a/lib/datahub-client/data_platform_catalogue/client/search/search_client.py b/lib/datahub-client/data_platform_catalogue/client/search/search_client.py index 6a7517ca..c8ade8ac 100644 --- a/lib/datahub-client/data_platform_catalogue/client/search/search_client.py +++ b/lib/datahub-client/data_platform_catalogue/client/search/search_client.py @@ -13,12 +13,12 @@ TableEntityMapping, ) from data_platform_catalogue.search_types import ( - DomainOption, FacetOption, MultiSelectFilter, SearchFacets, SearchResponse, SortOption, + SubjectAreaOption, ) from datahub.configuration.common import GraphError # pylint: disable=E0611 from datahub.ingestion.graph.client import DataHubGraph # pylint: disable=E0611 @@ -129,7 +129,7 @@ def list_domains( query: str = "*", filters: Sequence[MultiSelectFilter] | None = None, count: int = 1000, - ) -> list[DomainOption]: + ) -> list[SubjectAreaOption]: """ Returns domains that can be used to filter the search results. """ @@ -151,8 +151,8 @@ def list_domains( def _parse_list_domains( self, list_domains_result: list[dict[str, Any]] - ) -> list[DomainOption]: - list_domain_options: list[DomainOption] = [] + ) -> list[SubjectAreaOption]: + list_domain_options: list[SubjectAreaOption] = [] for domain in list_domains_result: urn = domain.get("urn", "") @@ -161,7 +161,7 @@ def _parse_list_domains( entities = domain.get("entities", {}) total = entities.get("total", 0) - list_domain_options.append(DomainOption(urn, name, total)) + list_domain_options.append(SubjectAreaOption(urn, name, total)) return list_domain_options def _parse_facets(self, facets: list[dict[str, Any]]) -> SearchFacets: diff --git a/lib/datahub-client/data_platform_catalogue/search_types.py b/lib/datahub-client/data_platform_catalogue/search_types.py index fd459d43..42d6bd78 100644 --- a/lib/datahub-client/data_platform_catalogue/search_types.py +++ b/lib/datahub-client/data_platform_catalogue/search_types.py @@ -6,8 +6,8 @@ from data_platform_catalogue.entities import ( EntityRef, - GlossaryTermRef, FindMoJdataEntityMapper, + GlossaryTermRef, TagRef, ) @@ -50,9 +50,9 @@ class FacetOption: @dataclass -class DomainOption: +class SubjectAreaOption: """ - A representation of a domain and the number of associated entities + A representation of a subject area and the number of associated entities represented by total. """ diff --git a/lib/datahub-client/tests/test_integration_with_datahub_server.py b/lib/datahub-client/tests/test_integration_with_datahub_server.py index b2f7648a..fee981fd 100644 --- a/lib/datahub-client/tests/test_integration_with_datahub_server.py +++ b/lib/datahub-client/tests/test_integration_with_datahub_server.py @@ -12,7 +12,6 @@ from datetime import datetime import pytest - from data_platform_catalogue.client.datahub_client import DataHubCatalogueClient from data_platform_catalogue.entities import ( AccessInformation, @@ -20,16 +19,13 @@ Database, DomainRef, EntityRef, - TableEntityMapping, Governance, OwnerRef, + TableEntityMapping, TagRef, UsageRestrictions, ) -from data_platform_catalogue.search_types import ( - DomainOption, - MultiSelectFilter, -) +from data_platform_catalogue.search_types import MultiSelectFilter, SubjectAreaOption jwt_token = os.environ.get("CATALOGUE_TOKEN") api_url = os.environ.get("CATALOGUE_URL", "") @@ -42,7 +38,7 @@ def test_list_domains(): response = client.list_domains() assert len(response) > 0 domain = response[0] - assert isinstance(domain, DomainOption) + assert isinstance(domain, SubjectAreaOption) assert "urn:li:domain" in domain.urn diff --git a/tests/conftest.py b/tests/conftest.py index 6369f278..41d55bb8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -30,9 +30,9 @@ TagRef, ) from data_platform_catalogue.search_types import ( - DomainOption, SearchResponse, SearchResult, + SubjectAreaOption, ) from django.conf import settings from django.test import Client @@ -46,11 +46,11 @@ from selenium.webdriver.support.select import Select from home.forms.search import SearchForm -from home.models.domain_model import DomainModel +from home.models.subject_area_taxonomy import SubjectAreaTaxonomy from home.service.details import DatabaseDetailsService -from home.service.domain_fetcher import DomainFetcher from home.service.search import SearchService from home.service.search_tag_fetcher import SearchTagFetcher +from home.service.subject_area_fetcher import SubjectAreaFetcher fake = Faker() @@ -812,22 +812,22 @@ def mock_catalogue( mock_list_domains_response( mock_catalogue, domains=[ - DomainOption( + SubjectAreaOption( urn="urn:li:domain:prisons", name="Prisons", total=fake.random_int(min=1, max=100), ), - DomainOption( + SubjectAreaOption( urn="urn:li:domain:courts", name="Courts", total=fake.random_int(min=1, max=100), ), - DomainOption( + SubjectAreaOption( urn="urn:li:domain:finance", name="Finance", total=fake.random_int(min=1, max=100), ), - DomainOption( + SubjectAreaOption( urn="urn:li:domain:hq", name="HQ", total=0, @@ -959,7 +959,7 @@ def mock_get_publication_dataset_details_response( @pytest.fixture def list_domains(filter_zero_entities): - return DomainFetcher(filter_zero_entities).fetch() + return SubjectAreaFetcher(filter_zero_entities).fetch() @pytest.fixture @@ -969,10 +969,10 @@ def search_tags(): @pytest.fixture def valid_domain(): - domains = DomainFetcher().fetch() - return DomainModel( + domains = SubjectAreaFetcher().fetch() + return SubjectAreaTaxonomy( domains, - ).top_level_domains[0] + ).top_level_subject_areas[0] @pytest.fixture From 10a172b2d3be167b889c5779db8e9dfbe567885c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:00:20 +0000 Subject: [PATCH 3/5] Chore(deps): Bump govuk-frontend from 5.7.1 to 5.8.0 (#1217) * Chore(deps): Bump govuk-frontend from 5.7.1 to 5.8.0 Bumps [govuk-frontend](https://github.com/alphagov/govuk-frontend) from 5.7.1 to 5.8.0. - [Release notes](https://github.com/alphagov/govuk-frontend/releases) - [Changelog](https://github.com/alphagov/govuk-frontend/blob/main/CHANGELOG.md) - [Commits](https://github.com/alphagov/govuk-frontend/compare/v5.7.1...v5.8.0) --- updated-dependencies: - dependency-name: govuk-frontend dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix deprecated import --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mat Moore --- package-lock.json | 8 ++++---- package.json | 2 +- scss/base.scss | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8be7c3b2..89a4797f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "@babel/preset-env": "^7.26.0", "@ministryofjustice/frontend": "^3.3.1", "babel-jest": "^29.7.0", - "govuk-frontend": "^5.7.1", + "govuk-frontend": "^5.8.0", "jest-environment-jsdom": "^29.7.0", "sass": "^1.83.1" }, @@ -3997,9 +3997,9 @@ } }, "node_modules/govuk-frontend": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.7.1.tgz", - "integrity": "sha512-jF1cq5rn57kxZmJRprUZhTQ31zaBBK4b5AyeJaPX3Yhg22lk90Mx/dQLvOk/ycV3wM7e0y+s4IPvb2fFaPlCGg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.8.0.tgz", + "integrity": "sha512-6l3f/YhDUCWjpmSW3CL95Hg8B+ZLzTf2WYo25ZtCs2Lb8UIzxxxFI8LxG7Ey/z04UuPhUunqFhTwSkQyJ69XbQ==", "engines": { "node": ">= 4.2.0" } diff --git a/package.json b/package.json index 4689f59b..d6a7dedc 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "@babel/preset-env": "^7.26.0", "@ministryofjustice/frontend": "^3.3.1", "babel-jest": "^29.7.0", - "govuk-frontend": "^5.7.1", + "govuk-frontend": "^5.8.0", "jest-environment-jsdom": "^29.7.0", "sass": "^1.83.1" }, diff --git a/scss/base.scss b/scss/base.scss index 85f722b0..669bd62d 100644 --- a/scss/base.scss +++ b/scss/base.scss @@ -7,7 +7,7 @@ $govuk-global-styles: true; $govuk-new-typography-scale: true; -@import "node_modules/govuk-frontend/dist/govuk/all"; +@import "node_modules/govuk-frontend/dist/govuk/index"; @import "node_modules/@ministryofjustice/frontend/moj/all"; @import "./components/search"; @import "./components/masthead"; From 65b1898eee77344b94d4c821a8b0cce2a2557492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:01:03 +0000 Subject: [PATCH 4/5] Chore(deps-dev): Bump faker from 33.3.0 to 33.3.1 in the dev-dependencies group (#1222) Chore(deps-dev): Bump faker in the dev-dependencies group Bumps the dev-dependencies group with 1 update: [faker](https://github.com/joke2k/faker). Updates `faker` from 33.3.0 to 33.3.1 - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v33.3.0...v33.3.1) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index eb264eda..3d657494 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "acryl-datahub" @@ -955,13 +955,13 @@ tests = ["black", "pytest", "pytest-cov", "tox"] [[package]] name = "faker" -version = "33.3.0" +version = "33.3.1" description = "Faker is a Python package that generates fake data for you." optional = false python-versions = ">=3.8" files = [ - {file = "Faker-33.3.0-py3-none-any.whl", hash = "sha256:ae074d9c7ef65817a93b448141a5531a16b2ea2e563dc5774578197c7c84060c"}, - {file = "faker-33.3.0.tar.gz", hash = "sha256:2abb551a05b75d268780b6095100a48afc43c53e97422002efbfc1272ebf5f26"}, + {file = "Faker-33.3.1-py3-none-any.whl", hash = "sha256:ac4cf2f967ce02c898efa50651c43180bd658a7707cfd676fcc5410ad1482c03"}, + {file = "faker-33.3.1.tar.gz", hash = "sha256:49dde3b06a5602177bc2ad013149b6f60a290b7154539180d37b6f876ae79b20"}, ] [package.dependencies] @@ -3342,4 +3342,4 @@ propcache = ">=0.2.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "4440c82b3c5649184589942d4e409def4a1c5151db20d55f0d745ce546fe3b98" +content-hash = "a7ad8891e464177463c88b801dac4b789e8a18ddd72d8990026bfa8e480dd50e" diff --git a/pyproject.toml b/pyproject.toml index 3095b3b2..5c04b10d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ selenium = "~=4.27.1" flake8 = ">=6.1.0" pytest-django = "^4.9.0" pytest-cov = "^6.0.0" -faker = "^33.3.0" +faker = "^33.3.1" isort = "^5.13.2" [build-system] From bb4e3fa8923b9747c26411942f113657ebc9f839 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:01:31 +0000 Subject: [PATCH 5/5] Chore(deps): Bump github/codeql-action from 3.28.0 to 3.28.1 (#1221) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.0 to 3.28.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/48ab28a6f5dbc2a99bf1e0131198dd8f1df78169...b6a472f63d85b9c78a3ac5e89422239fc15e9b3c) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/scan-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan-image.yml b/.github/workflows/scan-image.yml index e2d34adf..27d2ecd5 100644 --- a/.github/workflows/scan-image.yml +++ b/.github/workflows/scan-image.yml @@ -46,6 +46,6 @@ jobs: - name: Upload SARIF if: always() id: upload_sarif - uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v2.2.7 + uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v2.2.7 with: sarif_file: trivy-results.sarif