Skip to content

Commit 6bfe78f

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix_entity_502s
2 parents c678a5b + 0ec7493 commit 6bfe78f

File tree

8 files changed

+52
-11
lines changed

8 files changed

+52
-11
lines changed

.github/workflows/security-scan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
env:
99
APPLICATION: digital-land-platform
1010
DOCKER_REPO: public.ecr.aws/l6z6v3j6
11-
ZAP_VERSION: 2.11.1
11+
ZAP_VERSION: 2.15.0
1212

1313
jobs:
1414
dynamic-audit:

application/core/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class DatasetModel(DigitalLandDateFieldsModel):
9191
attribution_text: str = None
9292
licence: str = None
9393
licence_text: str = None
94+
consideration: str = None
9495

9596

9697
class TypologyModel(DigitalLandDateFieldsModel):

application/db/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ class DatasetOrm(Base):
107107
themes = Column(ARRAY(Text), nullable=True)
108108
attribution_id = Column(Text, nullable=True)
109109
licence_id = Column(Text, nullable=True)
110+
consideration = Column(Text, nullable=True)
110111

111112
_attribution = relationship(
112113
"AttributionOrm",

application/templates/components/entity-value/macro.jinja

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<code class="app-code-block" tabindex="0">{{ value }}</code>
5555
{%- elif field in ["local-resilience-forum","local-authority-type","ownership-status","planning-permission-type","planning-permission-type","planning-permission-status","green-belt-core","ancient-woodland-status","design-code-category","design-code-status","listed-building-grade","park-and-garden-grade"] %}
5656
<a class ="govuk-link" href="{{ '/prefix/' + field + "/reference/" + value }}">{{ value }}</a>
57-
{%- elif field in ["local-authority-district","local-planning-authority","parish"] %}
57+
{%- elif field in ["local-authority-district","local-planning-authority","parish","region"] %}
5858
<a class ="govuk-link" href="{{ '/prefix/statistical-geography/reference/' + value }}">{{ value }}</a>
5959
{%- elif field in ["combined-authority","local-authority"] %}
6060
<a class ="govuk-link" href="{{ '/prefix/local-authority/reference/' + value }}">{{ value }}</a>
@@ -82,7 +82,7 @@
8282
{%- endif %}
8383
{%- elif field == "twitter" %}
8484
<a class ="govuk-link" href="https://twitter.com/{{ value }}">@{{ value }}</a>
85-
{%- elif field in ["website","opendatacommunities","documentation-url","document-url","site-plan-url"] %}
85+
{%- elif field in ["website","opendatacommunities"] or field.endswith("-url") or field.endswith("-uri") %}
8686
<a class ="govuk-link" href="{{ value }}">{{ value }}</a>
8787
{%- elif field in ["wikipedia"] %}
8888
<a class ="govuk-link" href="{{ 'https://en.wikipedia.org/wiki/' + value }}">{{ value }}</a>

application/templates/dataset.html

+14
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,20 @@ <h2 class="govuk-heading-s govuk-!-margin-bottom-0" id="specification">
205205
</li>
206206
</ul>
207207
</nav>
208+
{% if dataset['consideration'] %}
209+
<hr class="govuk-section-break govuk-section-break--m">
210+
<h2 class="govuk-heading-s govuk-!-margin-bottom-0" id="data-design">
211+
Designing the data
212+
</h2>
213+
<p class="govuk-hint govuk-!-font-size-14">You can see details about how this dataset has been designed for planning.data.gov.uk</p>
214+
<nav role="navigation" aria-labelledby="specification">
215+
<ul class="govuk-list govuk-!-font-size-16">
216+
<li>
217+
<a class="govuk-link" href="https://design.planning.data.gov.uk/planning-consideration/{{ dataset['consideration'] }}">{{ dataset['consideration'] }} planning consideration</a>
218+
</li>
219+
</ul>
220+
</nav>
221+
{% endif %}
208222
</aside>
209223

210224
</div>

docker-compose.security.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ services:
4040
retries: 5
4141

4242
zap:
43-
image: owasp/zap2docker-stable:${ZAP_VERSION-2.11.1}
43+
image: ghcr.io/zaproxy/zaproxy:${ZAP_VERSION-2.15.0}
4444
command: bash -c "zap.sh -cmd -addonupdate; zap.sh -cmd -autorun /zap/wrk/zap.yaml"
4545
volumes:
4646
- .:/zap/wrk
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""add consideration to dataset
2+
3+
Revision ID: 180800810b09
4+
Revises: f9c99b89b3c1
5+
Create Date: 2024-06-26 13:46:25.381348
6+
7+
"""
8+
9+
from alembic import op
10+
import sqlalchemy as sa
11+
12+
13+
# revision identifiers, used by Alembic.
14+
revision = "180800810b09"
15+
down_revision = "f9c99b89b3c1"
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def upgrade():
21+
op.add_column("dataset", sa.Column("consideration", sa.Text, nullable=True))
22+
23+
24+
def downgrade():
25+
op.drop_column("dataset", "consideration")

tests/test_data/datasets.csv

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
dataset|name|entry_date|start_date|end_date|collection|description|key_field|paint_options|plural|prefix|text|typology|wikidata|wikipedia|themes|attribution|licence
2-
greenspace|Greenspace|2022-01-07|||greenspace|Greenspace||"{ ""colour"": ""#78AA00"" }"|Greenspaces||# This is some markdown that will render in the dataset page |geography|Q1234567|Greenspace_(United_Kingdom)|heritage|crown-copyright|ogl3
3-
forest|Forest|2022-01-07|||forest|Forest||"{ ""colour"": ""#85994b"" }"|Forests|||geography|Q7654321|Forest_(United_Kingdom)|environment,heritage|crown-copyright|ogl3
4-
brownfield-site|Brownfield site|2022-01-07|||brownfield-site|Brownfield site||"{ ""colour"": ""#85994b"" }"|Brownfield sites|||geography|Q111222|Brownfield_site_(United_Kingdom)|environment,housing|crown-copyright|ogl3
5-
historical-monument|Historical monument|2022-01-07|||historical-monument|Historical monument||"{ ""colour"": ""#85994b"" }"|Historical monuments|||geography|Q333444|Historical_monument_(United_Kingdom)|heritage|crown-copyright|ogl3
6-
tree|Tree|2021-12-27|||tree-preservation-order|"An individual tree"||"{ ""colour"": ""#3B453D"", ""type"": ""point"" }"|Trees|||geography|Q10884|Tree|environment|crown-copyright|ogl3
7-
conservation-area|Conservation area|2022-06-06|||conservation-area|Special architectural or historic interest, the character or appearance of which it is desirable to preserve or enhance||"{ ""colour"": ""#78AA00"" }"|Conservation areas|||geography|Q5162904|Conservation_area_(United_Kingdom)|heritage|crown-copyright|ogl3
1+
dataset|name|entry_date|start_date|end_date|collection|description|key_field|paint_options|plural|prefix|text|typology|wikidata|wikipedia|themes|attribution|licence|consideration
2+
greenspace|Greenspace|2022-01-07|||greenspace|Greenspace||"{ ""colour"": ""#78AA00"" }"|Greenspaces||# This is some markdown that will render in the dataset page |geography|Q1234567|Greenspace_(United_Kingdom)|heritage|crown-copyright|ogl3|greenspace
3+
forest|Forest|2022-01-07|||forest|Forest||"{ ""colour"": ""#85994b"" }"|Forests|||geography|Q7654321|Forest_(United_Kingdom)|environment,heritage|crown-copyright|ogl3|forest
4+
brownfield-site|Brownfield site|2022-01-07|||brownfield-site|Brownfield site||"{ ""colour"": ""#85994b"" }"|Brownfield sites|||geography|Q111222|Brownfield_site_(United_Kingdom)|environment,housing|crown-copyright|ogl3|brownfield-land
5+
historical-monument|Historical monument|2022-01-07|||historical-monument|Historical monument||"{ ""colour"": ""#85994b"" }"|Historical monuments|||geography|Q333444|Historical_monument_(United_Kingdom)|heritage|crown-copyright|ogl3|historic-monument
6+
tree|Tree|2021-12-27|||tree-preservation-order|"An individual tree"||"{ ""colour"": ""#3B453D"", ""type"": ""point"" }"|Trees|||geography|Q10884|Tree|environment|crown-copyright|ogl3|tree-preservation-orders
7+
conservation-area|Conservation area|2022-06-06|||conservation-area|Special architectural or historic interest, the character or appearance of which it is desirable to preserve or enhance||"{ ""colour"": ""#78AA00"" }"|Conservation areas|||geography|Q5162904|Conservation_area_(United_Kingdom)|heritage|crown-copyright|ogl3|conservation-areas

0 commit comments

Comments
 (0)