-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1100 from uktrade/develop
UAT / Prod PR
- Loading branch information
Showing
15 changed files
with
261 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
# Config for black lives in pyproject.toml | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.13.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==23.1.0] | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
args: ["--markdown-linebreak-ext=md,markdown"] | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-ast | ||
- id: fix-byte-order-marker | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: detect-aws-credentials | ||
args: ["--allow-missing-credentials"] | ||
- repo: https://github.com/uktrade/pii-secret-check-hooks | ||
rev: 0.0.0.35 | ||
hooks: | ||
- id: pii_secret_filename | ||
files: '' | ||
language: python | ||
args: [exclude] | ||
pass_filenames: true | ||
require_serial: true | ||
- id: pii_secret_file_content | ||
files: '' | ||
language: python | ||
args: [--exclude=pii-secret-exclude.txt] | ||
pass_filenames: true | ||
require_serial: true | ||
- id: hooks_version_check | ||
name: Checking local hooks against latest release | ||
verbose: true | ||
require_serial: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Generated by Django 4.1.9 on 2023-06-14 09:39 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('wagtailimages', '0024_index_image_file_hash'), | ||
('core', '0030_greatmedia'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Region', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100, unique=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Tag', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100, unique=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='IndustryTag', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100, unique=True)), | ||
('icon', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Country', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=100, unique=True)), | ||
('slug', models.CharField(max_length=100, unique=True)), | ||
('region', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.region')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 4.1.9 on 2023-06-14 09:54 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0031_region_tag_industrytag_country'), | ||
] | ||
|
||
def copy_export_readiness_data(apps, schema_editor): | ||
ExportReadinessTag = apps.get_model("export_readiness", "Tag") | ||
ExportReadinessIndustryTag = apps.get_model("export_readiness", "IndustryTag") | ||
ExportReadinessRegion = apps.get_model("export_readiness", "Region") | ||
ExportReadinessCountry = apps.get_model("export_readiness", "Country") | ||
|
||
CoreTag = apps.get_model("core", "Tag") | ||
CoreIndustryTag = apps.get_model("core", "IndustryTag") | ||
CoreRegion = apps.get_model("core", "Region") | ||
CoreCountry = apps.get_model("core", "Country") | ||
|
||
CoreRegion.objects.bulk_create(ExportReadinessRegion.objects.all()) | ||
CoreTag.objects.bulk_create(ExportReadinessTag.objects.all()) | ||
CoreCountry.objects.bulk_create(ExportReadinessCountry.objects.all()) | ||
CoreIndustryTag.objects.bulk_create(ExportReadinessIndustryTag.objects.all()) | ||
|
||
|
||
def delete_export_readiness_data(apps, schema_editor): | ||
Tag = apps.get_model("core", "Tag") | ||
IndustryTag = apps.get_model("core", "IndustryTag") | ||
Region = apps.get_model("core", "Region") | ||
Country = apps.get_model("core", "Country") | ||
|
||
Country.objects.all().delete() | ||
IndustryTag.objects.all().delete() | ||
Region.objects.all().delete() | ||
Tag.objects.all().delete() | ||
|
||
|
||
operations = [ | ||
migrations.RunPython(copy_export_readiness_data, delete_export_readiness_data), | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
export_readiness/migrations/0082_remove_country_region_remove_industrytag_icon_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 4.1.9 on 2023-06-14 22:30 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('great_international', '0160_auto_20230505_1933'), | ||
('export_readiness', '0081_auto_20211124_1053'), | ||
('core', '0032_auto_20230614_0954'), | ||
('great_international', '0161_alter_internationalarticlelistingpage_tags_and_more'), | ||
|
||
|
||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='country', | ||
name='region', | ||
), | ||
migrations.RemoveField( | ||
model_name='industrytag', | ||
name='icon', | ||
), | ||
migrations.DeleteModel( | ||
name='Tag', | ||
), | ||
migrations.DeleteModel( | ||
name='Country', | ||
), | ||
migrations.DeleteModel( | ||
name='IndustryTag', | ||
), | ||
migrations.DeleteModel( | ||
name='Region', | ||
), | ||
] |
40 changes: 40 additions & 0 deletions
40
great_international/migrations/0161_alter_internationalarticlelistingpage_tags_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Generated by Django 4.1.9 on 2023-06-14 22:30 | ||
|
||
from django.db import migrations | ||
import modelcluster.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0032_auto_20230614_0954'), | ||
('great_international', '0160_auto_20230505_1933'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='internationalarticlelistingpage', | ||
name='tags', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), | ||
), | ||
migrations.AlterField( | ||
model_name='internationalarticlepage', | ||
name='tags', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), | ||
), | ||
migrations.AlterField( | ||
model_name='internationalcampaignpage', | ||
name='tags', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), | ||
), | ||
migrations.AlterField( | ||
model_name='internationalinvestmentsectorpage', | ||
name='tags', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), | ||
), | ||
migrations.AlterField( | ||
model_name='internationaltopiclandingpage', | ||
name='tags', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.tag'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.