Skip to content

Commit

Permalink
Release to main (#1799)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Feb 25, 2025
2 parents 3d6cf11 + 2d0d2cd commit 7ecda94
Show file tree
Hide file tree
Showing 51 changed files with 681 additions and 172 deletions.
7 changes: 5 additions & 2 deletions dev/pull-data
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ rm "$DB_DUMP_DIR/$DB_DUMP"
echo "Starting the app container..."
docker compose -p ds-wagtail restart app

echo "Running migrations..."
docker compose -p ds-wagtail exec app poetry run python manage.py migrate
# echo "Wait for application container to be healthy..."
# for c in {1..30}; do sleep 1 && curl -s -w '%{http_code}' -o /dev/null http://host.docker.internal:8000/healthcheck/live/ | grep -o "200" && break; done

# echo "Running migrations..."
# docker compose -p ds-wagtail exec app poetry run python manage.py migrate

echo "Running birdbath..."
docker compose -p ds-wagtail exec app poetry run python manage.py run_birdbath
Expand Down
10 changes: 7 additions & 3 deletions etna/api/tests/expected_results/article.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": ARTICLE_ID,
"meta": {
"type": "articles.ArticlePage",
"detail_url": "/api/v2/pages/ARTICLE_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/ARTICLE_ID/",
"html_url": "http://localhost/article_index/article/",
"slug": "article",
"show_in_menus": false,
Expand All @@ -14,7 +14,7 @@
"id": ARTICLE_INDEX_ID,
"meta": {
"type": "articles.ArticleIndexPage",
"detail_url": "/api/v2/pages/ARTICLE_INDEX_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/ARTICLE_INDEX_ID/",
"html_url": "http://localhost/article_index/"
},
"title": "article_index"
Expand Down Expand Up @@ -62,6 +62,7 @@
"twitter_og_image": null
},
"title": "article",
"short_title": null,
"global_alert": null,
"type_label": "The story of",
"mourning_notice": {
Expand Down Expand Up @@ -112,7 +113,6 @@
"is_sensitive": false,
"custom_sensitive_image_warning": null
},
"display_content_warning": false,
"custom_warning_text": "",
"tags": [
"Witchcraft"
Expand Down Expand Up @@ -317,6 +317,7 @@
{
"id": FOCUSED_ID,
"title": "focused_article",
"short_title": null,
"url": "/article_index/focused_article/",
"full_url": "http://localhost/article_index/focused_article/",
"type_label": "Focus on",
Expand Down Expand Up @@ -346,6 +347,7 @@
{
"id": ARTS_ID,
"title": "arts",
"short_title": null,
"url": "/arts/",
"full_url": "http://localhost/arts/",
"type_label": "Explore the collection",
Expand Down Expand Up @@ -373,6 +375,7 @@
{
"id": EARLY_MODERN_ID,
"title": "early_modern",
"short_title": null,
"url": "/early_modern/",
"full_url": "http://localhost/early_modern/",
"type_label": "Explore the collection",
Expand All @@ -398,6 +401,7 @@
{
"id": POSTWAR_ID,
"title": "postwar",
"short_title": null,
"url": "/postwar/",
"full_url": "http://localhost/postwar/",
"type_label": "Explore the collection",
Expand Down
8 changes: 6 additions & 2 deletions etna/api/tests/expected_results/article_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": ARTICLE_INDEX_ID,
"meta": {
"type": "articles.ArticleIndexPage",
"detail_url": "/api/v2/pages/ARTICLE_INDEX_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/ARTICLE_INDEX_ID/",
"html_url": "http://localhost/article_index/",
"slug": "article_index",
"show_in_menus": false,
Expand All @@ -14,7 +14,7 @@
"id": HOME_PAGE_ID,
"meta": {
"type": "home.HomePage",
"detail_url": "/api/v2/pages/HOME_PAGE_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/HOME_PAGE_ID/",
"html_url": "http://localhost/"
},
"title": "Home"
Expand Down Expand Up @@ -62,6 +62,7 @@
"twitter_og_image": null
},
"title": "article_index",
"short_title": null,
"global_alert": null,
"type_label": null,
"mourning_notice": {
Expand All @@ -72,6 +73,7 @@
"featured_article": {
"id": ARTICLE_ID,
"title": "article",
"short_title": null,
"url": "/article_index/article/",
"full_url": "http://localhost/article_index/article/",
"type_label": "The story of",
Expand Down Expand Up @@ -105,6 +107,7 @@
{
"id": ARTICLE_ID,
"title": "article",
"short_title": null,
"url": "/article_index/article/",
"full_url": "http://localhost/article_index/article/",
"type_label": "The story of",
Expand All @@ -131,6 +134,7 @@
{
"id": FOCUSED_ID,
"title": "focused_article",
"short_title": null,
"url": "/article_index/focused_article/",
"full_url": "http://localhost/article_index/focused_article/",
"type_label": "Focus on",
Expand Down
22 changes: 13 additions & 9 deletions etna/api/tests/expected_results/arts.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": ARTS_ID,
"meta": {
"type": "collections.TopicExplorerPage",
"detail_url": "/api/v2/pages/ARTS_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/ARTS_ID/",
"html_url": "http://localhost/arts/",
"slug": "arts",
"show_in_menus": false,
Expand All @@ -14,7 +14,7 @@
"id": 3,
"meta": {
"type": "home.HomePage",
"detail_url": "/api/v2/pages/3/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/3/",
"html_url": "http://localhost/"
},
"title": "Home"
Expand Down Expand Up @@ -62,6 +62,14 @@
"twitter_og_image": null
},
"title": "arts",
"short_title": null,
"global_alert": null,
"type_label": "Explore the collection",
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
},
"intro": "<p>Intro text</p>",
"hero_image_caption": "<p>Hero image caption</p>",
"hero_image": {
"id": 3,
Expand Down Expand Up @@ -105,20 +113,14 @@
"is_sensitive": false,
"custom_sensitive_image_warning": null
},
"global_alert": null,
"type_label": "Explore the collection",
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
},
"intro": "<p>Intro text</p>",
"body": [],
"featured_article": null,
"skos_id": "arts",
"related_articles": [
{
"id": FOCUSED_ID,
"title": "focused_article",
"short_title": null,
"url": "/article_index/focused_article/",
"full_url": "http://localhost/article_index/focused_article/",
"type_label": "Focus on",
Expand All @@ -145,6 +147,7 @@
{
"id": ARTICLE_ID,
"title": "article",
"short_title": null,
"url": "/article_index/article/",
"full_url": "http://localhost/article_index/article/",
"type_label": "The story of",
Expand Down Expand Up @@ -173,6 +176,7 @@
{
"id": HIGHLIGHT_GALLERY_ID,
"title": "highlight_gallery",
"short_title": null,
"url": "/arts/highlight_gallery/",
"full_url": "http://localhost/arts/highlight_gallery/",
"type_label": "In pictures",
Expand Down
33 changes: 3 additions & 30 deletions etna/api/tests/expected_results/author.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": AUTHOR_ID,
"meta": {
"type": "people.PersonPage",
"detail_url": "/api/v2/pages/AUTHOR_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/AUTHOR_ID/",
"html_url": "http://localhost/people/author/",
"slug": "author",
"show_in_menus": false,
Expand All @@ -14,7 +14,7 @@
"id": AUTHOR_INDEX_ID,
"meta": {
"type": "people.PeopleIndexPage",
"detail_url": "/api/v2/pages/AUTHOR_INDEX_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/AUTHOR_INDEX_ID/",
"html_url": "http://localhost/people/"
},
"title": "people"
Expand Down Expand Up @@ -62,6 +62,7 @@
"twitter_og_image": null
},
"title": "author",
"short_title": null,
"global_alert": {
"title": "BETA",
"message": "<p>Message</p>",
Expand Down Expand Up @@ -117,33 +118,5 @@
},
"summary": "<p>Summary text</p>",
"research_summary": [],
"authored_focused_articles": [
{
"id": FOCUSED_ID,
"title": "focused_article",
"url": "/article_index/focused_article/",
"full_url": "http://localhost/article_index/focused_article/",
"type_label": "Focus on",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 14,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60.bgcolor-fff.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60.bgcolor-fff.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60.bgcolor-fff.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60.bgcolor-fff.webp",
"width": 100,
"height": 68
}
},
"last_published_at": "2000-01-02T00:00:00Z",
"is_newly_published": false
}
],
"shop_items": []
}
22 changes: 13 additions & 9 deletions etna/api/tests/expected_results/early_modern.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": EARLY_MODERN_ID,
"meta": {
"type": "collections.TimePeriodExplorerPage",
"detail_url": "/api/v2/pages/EARLY_MODERN_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/EARLY_MODERN_ID/",
"html_url": "http://localhost/early_modern/",
"slug": "early_modern",
"show_in_menus": false,
Expand All @@ -14,7 +14,7 @@
"id": 3,
"meta": {
"type": "home.HomePage",
"detail_url": "/api/v2/pages/3/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/3/",
"html_url": "http://localhost/"
},
"title": "Home"
Expand Down Expand Up @@ -62,6 +62,14 @@
"twitter_og_image": null
},
"title": "early_modern",
"short_title": null,
"global_alert": null,
"type_label": "Explore the collection",
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
},
"intro": "<p>Intro text</p>",
"hero_image_caption": "<p>Hero image caption</p>",
"hero_image": {
"id": 5,
Expand Down Expand Up @@ -105,19 +113,13 @@
"is_sensitive": false,
"custom_sensitive_image_warning": null
},
"global_alert": null,
"type_label": "Explore the collection",
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
},
"intro": "<p>Intro text</p>",
"body": [],
"featured_article": null,
"related_articles": [
{
"id": FOCUSED_ID,
"title": "focused_article",
"short_title": null,
"url": "/article_index/focused_article/",
"full_url": "http://localhost/article_index/focused_article/",
"type_label": "Focus on",
Expand All @@ -144,6 +146,7 @@
{
"id": ARTICLE_ID,
"title": "article",
"short_title": null,
"url": "/article_index/article/",
"full_url": "http://localhost/article_index/article/",
"type_label": "The story of",
Expand Down Expand Up @@ -172,6 +175,7 @@
{
"id": HIGHLIGHT_GALLERY_ID,
"title": "highlight_gallery",
"short_title": null,
"url": "/arts/highlight_gallery/",
"full_url": "http://localhost/arts/highlight_gallery/",
"type_label": "In pictures",
Expand Down
10 changes: 7 additions & 3 deletions etna/api/tests/expected_results/focused_article.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": FOCUSED_ID,
"meta": {
"type": "articles.FocusedArticlePage",
"detail_url": "/api/v2/pages/FOCUSED_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/FOCUSED_ID/",
"html_url": "http://localhost/article_index/focused_article/",
"slug": "focused_article",
"show_in_menus": false,
Expand All @@ -14,7 +14,7 @@
"id": ARTICLE_INDEX_ID,
"meta": {
"type": "articles.ArticleIndexPage",
"detail_url": "/api/v2/pages/ARTICLE_INDEX_ID/",
"detail_url": "WAGTAILAPI_BASE_URL/api/v2/pages/ARTICLE_INDEX_ID/",
"html_url": "http://localhost/article_index/"
},
"title": "article_index"
Expand Down Expand Up @@ -62,6 +62,7 @@
"twitter_og_image": null
},
"title": "focused_article",
"short_title": null,
"global_alert": null,
"type_label": "Focus on",
"mourning_notice": {
Expand Down Expand Up @@ -112,7 +113,6 @@
"is_sensitive": false,
"custom_sensitive_image_warning": null
},
"display_content_warning": false,
"custom_warning_text": "",
"tags": [
"Medicine",
Expand All @@ -130,6 +130,7 @@
{
"id": ARTICLE_ID,
"title": "article",
"short_title": null,
"url": "/article_index/article/",
"full_url": "http://localhost/article_index/article/",
"type_label": "The story of",
Expand Down Expand Up @@ -159,6 +160,7 @@
{
"id": ARTS_ID,
"title": "arts",
"short_title": null,
"url": "/arts/",
"full_url": "http://localhost/arts/",
"type_label": "Explore the collection",
Expand Down Expand Up @@ -186,6 +188,7 @@
{
"id": EARLY_MODERN_ID,
"title": "early_modern",
"short_title": null,
"url": "/early_modern/",
"full_url": "http://localhost/early_modern/",
"type_label": "Explore the collection",
Expand Down Expand Up @@ -213,6 +216,7 @@
{
"id": AUTHOR_ID,
"title": "author",
"short_title": null,
"url": "/people/author/",
"full_url": "http://localhost/people/author/",
"type_label": null,
Expand Down
Loading

0 comments on commit 7ecda94

Please sign in to comment.