Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from LandRegistry/v2
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
matthew-shaw authored Jan 4, 2022
2 parents 9575e55 + b267321 commit a2cc091
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
16 changes: 15 additions & 1 deletion CHANGEOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/LandRegistry/govuk-frontend-jinja-demo/compare/1.8.0...main)
## [Unreleased](https://github.com/LandRegistry/govuk-frontend-jinja-demo/compare/2.0.0...main)

## [2.0.0](https://github.com/LandRegistry/govuk-frontend-jinja-demo/releases/tag/2.0.0) - 14/10/2021

### Added

- [GOV.UK Frontend v4.0.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0) support

### Changed

- Updated `govuk-frontend-jinja` to [release 2.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.0.0)

### Removed

- Python 3.6 support

## [1.8.0](https://github.com/LandRegistry/govuk-frontend-jinja-demo/releases/tag/1.8.0) - 14/10/2021

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Demo Flask app using [GOV.UK Frontend Jinja](https://github.com/LandRegistry/gov
```shell
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
pip3 install -r requirements.txt ; pip3 install -r requirements_dev.txt
./build.sh
flask run
```
14 changes: 7 additions & 7 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<meta name="description" content="GOV.UK Frontend Jinja Demo">
<meta name="keywords" content="GOV.UK, govuk, gov, government, uk, frontend, ui, user interface, jinja, python, flask, port, template, templating, macro, component, design system, html, demo, example">
<meta name="author" content="HM Land Registry">
<!--[if gt IE 8]><!--><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-3.14.0.min.css') }}" /><!--<![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-ie8-3.14.0.min.css') }}" /><![endif]-->
<!--[if gt IE 8]><!--><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-4.0.0.min.css') }}" /><!--<![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-ie8-4.0.0.min.css') }}" /><![endif]-->
{% endblock %}

{% block header %}
Expand All @@ -28,12 +28,12 @@
'columns': 1,
'items': [
{
'href': 'https://github.com/alphagov/govuk-frontend/releases/tag/v3.14.0',
'text': 'GOV.UK Frontend v3.14.0'
'href': 'https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0',
'text': 'GOV.UK Frontend v4.0.0'
},
{
'href': 'https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/1.5.1',
'text': 'GOV.UK Frontend Jinja v1.5.1'
'href': 'https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.0.0',
'text': 'GOV.UK Frontend Jinja v2.0.0'
}
]
},
Expand Down Expand Up @@ -68,7 +68,7 @@

{% block bodyEnd %}
<!--[if gt IE 8]><!-->
<script src="{{ url_for('static', filename='govuk-frontend-3.14.0.min.js') }}"> </script>
<script src="{{ url_for('static', filename='govuk-frontend-4.0.0.min.js') }}"> </script>
<script>window.GOVUKFrontend.initAll()</script>
<!--<![endif]-->
{% endblock %}
2 changes: 1 addition & 1 deletion app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h1 class="govuk-heading-xl">GOV.UK Frontend Jinja</h1>
<p class="govuk-body-l">This is a simple <a href="https://www.python.org/" class="govuk-link">Python</a> application using the <a href="https://flask.palletsprojects.com/en/1.1.x/" class="govuk-link">Flask</a> framework that demonstrates the <a href="https://jinja.palletsprojects.com/en/2.11.x/" class="govuk-link">Jinja</a> port of <a href="https://frontend.design-system.service.gov.uk/" class="govuk-link">GOV.UK Frontend</a>.</p>
<p class="govuk-body"><a href="https://github.com/LandRegistry/govuk-frontend-jinja" class="govuk-link">GOV.UK Frontend Jinja</a> provides a complete set of reusable component Jinja macros, directly ported from the GOV.UK Frontend Nunjucks macros.</p>
<p class="govuk-body">An automated test suite makes use of the GOV.UK Frontend <a href="https://frontend.design-system.service.gov.uk/testing-your-html/#test-if-your-html-matches-gov-uk-frontend" class="govuk-link">test fixtures</a> to ensure 100% compliant HTML is output. This currently covers a total of 517 test scenarios against every component, which you can see in the <a href="https://github.com/LandRegistry/govuk-frontend-jinja/actions" class="govuk-link">build status</a>.</p>
<p class="govuk-body">An automated test suite makes use of the GOV.UK Frontend <a href="https://frontend.design-system.service.gov.uk/testing-your-html/#test-if-your-html-matches-gov-uk-frontend" class="govuk-link">test fixtures</a> to ensure 100% compliant HTML is output. This currently covers a total of 524 test scenarios against every component, which you can see in the <a href="https://github.com/LandRegistry/govuk-frontend-jinja/actions" class="govuk-link">build status</a>.</p>
<p class="govuk-body">Every visual test fixture is rendered in the pages linked below, along with the Jinja macro options and HTML used to create them. These can be used as examples, or for visual regression testing.</p>
{{ govukInsetText({'html': 'If you also need to generate forms in your Python project, check out <a href="https://govuk-frontend-wtforms.herokuapp.com/" class="govuk-link">GOV.UK Frontend WTForms</a> which makes use of these Jinja macros.'} )}}

Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
curl -L https://github.com/alphagov/govuk-frontend/releases/download/v3.14.0/release-v3.14.0.zip > govuk_frontend.zip
curl -L https://github.com/alphagov/govuk-frontend/releases/download/v4.0.0/release-v4.0.0.zip > govuk_frontend.zip
rm -rf app/static
unzip -o govuk_frontend.zip -d app/static
mv app/static/assets/* app/static
rm -rf app/static/assets
rm -rf govuk_frontend.zip

curl -L https://github.com/alphagov/govuk-frontend/archive/v3.14.0.zip > govuk_frontend_source.zip
curl -L https://github.com/alphagov/govuk-frontend/archive/v4.0.0.zip > govuk_frontend_source.zip
unzip -o govuk_frontend_source.zip -d govuk_frontend_source
rm -rf govuk_components
mkdir govuk_components
mv govuk_frontend_source/govuk-frontend-3.14.0/package/govuk/components/** govuk_components
mv govuk_frontend_source/govuk-frontend-4.0.0/package/govuk/components/** govuk_components
find govuk_components -type f ! -name 'fixtures.json' -delete
rm -rf govuk_frontend_source
rm -rf govuk_frontend_source.zip
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
flask-compress==1.10.1
flask-talisman==0.8.1
flask==2.0.2
govuk-frontend-jinja==1.5.1
govuk-frontend-jinja==2.0.0
gunicorn==20.1.0
python-dotenv==0.19.1
python-dotenv==0.19.2
# Generated with piprot 0.9.10
# Looks like you've been keeping up to date, time for a delicious beverage!
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.8
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements.in
Expand All @@ -16,19 +16,19 @@ flask-compress==1.10.1
# via -r requirements.in
flask-talisman==0.8.1
# via -r requirements.in
govuk-frontend-jinja==1.5.1
govuk-frontend-jinja==2.0.0
# via -r requirements.in
gunicorn==20.1.0
# via -r requirements.in
itsdangerous==2.0.1
# via flask
jinja2==3.0.2
jinja2==3.0.3
# via
# flask
# govuk-frontend-jinja
markupsafe==2.0.1
# via jinja2
python-dotenv==0.19.1
python-dotenv==0.19.2
# via -r requirements.in
six==1.16.0
# via flask-talisman
Expand Down
10 changes: 10 additions & 0 deletions requirements_dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bandit==1.7.1
black==21.12b0
hacking==4.1.0
isort==5.10.1
pep8-naming<0.12.0
pip-tools==6.4.0
piprot==0.9.11
safety==1.10.3
# Generated with piprot 0.9.10
# Looks like you've been keeping up to date, time for a delicious beverage!
102 changes: 102 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements_dev.in
#
bandit==1.7.1
# via -r requirements_dev.in
black==21.12b0
# via -r requirements_dev.in
certifi==2021.10.8
# via requests
charset-normalizer==2.0.9
# via requests
click==8.0.3
# via
# black
# pip-tools
# safety
dparse==0.5.1
# via safety
flake8==3.8.4
# via
# flake8-polyfill
# hacking
flake8-polyfill==1.0.2
# via pep8-naming
gitdb==4.0.9
# via gitpython
gitpython==3.1.24
# via bandit
hacking==4.1.0
# via -r requirements_dev.in
idna==3.3
# via requests
isort==5.10.1
# via -r requirements_dev.in
mccabe==0.6.1
# via flake8
mypy-extensions==0.4.3
# via black
packaging==21.3
# via
# dparse
# safety
pathspec==0.9.0
# via black
pbr==5.8.0
# via stevedore
pep517==0.12.0
# via pip-tools
pep8-naming==0.11.1
# via -r requirements_dev.in
pip-tools==6.4.0
# via -r requirements_dev.in
piprot==0.9.11
# via -r requirements_dev.in
platformdirs==2.4.1
# via black
pycodestyle==2.6.0
# via flake8
pyflakes==2.2.0
# via flake8
pyparsing==3.0.6
# via packaging
pyyaml==6.0
# via
# bandit
# dparse
requests==2.27.0
# via
# piprot
# requests-futures
# safety
requests-futures==1.0.0
# via piprot
safety==1.10.3
# via -r requirements_dev.in
six==1.16.0
# via piprot
smmap==5.0.0
# via gitdb
stevedore==3.5.0
# via bandit
toml==0.10.2
# via dparse
tomli==1.2.3
# via
# black
# pep517
typing-extensions==4.0.1
# via
# black
# gitpython
urllib3==1.26.7
# via requests
wheel==0.37.1
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools

0 comments on commit a2cc091

Please sign in to comment.