diff --git a/backend/api/management/commands/all_seed.py b/backend/api/management/commands/all_seed.py deleted file mode 100644 index 3c064bda..00000000 --- a/backend/api/management/commands/all_seed.py +++ /dev/null @@ -1,14 +0,0 @@ -from django.core.management import call_command -from django.core.management.base import BaseCommand - - -class Command(BaseCommand): - help = 'Run all seed commands in one command, to add it to the docker command' - - def handle(self, *args, **options): - self.stdout.write('Gear Seed\n') - call_command('gear_seed', stdout=self.stdout, stderr=self.stderr) - self.stdout.write('\nJob Seed\n') - call_command('job_seed', stdout=self.stdout, stderr=self.stderr) - self.stdout.write('\nTier Seed\n') - call_command('tier_seed', stdout=self.stdout, stderr=self.stderr) diff --git a/backend/api/management/commands/gear_seed.py b/backend/api/management/commands/gear_seed.py deleted file mode 100644 index f7a7657d..00000000 --- a/backend/api/management/commands/gear_seed.py +++ /dev/null @@ -1,44 +0,0 @@ -from django.core.management.base import BaseCommand -from django.db import IntegrityError, transaction -from api import models - - -class Command(BaseCommand): - help = 'Seed the DB with initial data for gear' - - gear = [ - # 6.0 - {'has_accessories': True, 'has_armour': False, 'has_weapon': False, 'item_level': 560, 'name': 'The Last'}, - {'has_accessories': False, 'has_armour': True, 'has_weapon': True, 'item_level': 560, 'name': 'Endwalker AF'}, - {'has_accessories': True, 'has_armour': True, 'has_weapon': True, 'item_level': 570, 'name': 'Moonward'}, - {'has_accessories': True, 'has_armour': False, 'has_weapon': False, 'item_level': 580, 'name': 'Eternal Dark'}, - {'has_accessories': False, 'has_armour': False, 'has_weapon': True, 'item_level': 580, 'name': 'Divine Light'}, - - # 6.0.1 - {'has_accessories': True, 'has_armour': True, 'has_weapon': False, 'item_level': 580, 'name': 'Limbo'}, - - # 6.0.5 - {'has_accessories': True, 'has_armour': True, 'has_weapon': True, 'item_level': 580, 'name': 'Classical'}, - {'has_accessories': True, 'has_armour': True, 'has_weapon': True, 'item_level': 590, 'name': 'Radiant Host'}, - {'has_accessories': True, 'has_armour': True, 'has_weapon': True, 'item_level': 600, 'name': 'Augmented Radiant Host'}, - {'has_accessories': True, 'has_armour': True, 'has_weapon': False, 'item_level': 600, 'name': 'Asphodelos'}, - {'has_accessories': False, 'has_armour': False, 'has_weapon': True, 'item_level': 605, 'name': 'Asphodelos'}, - - # 6.1 - {'has_accessories': False, 'has_armour': True, 'has_weapon': False, 'item_level': 590, 'name': 'Panthean'}, - {'has_accessories': False, 'has_armour': False, 'has_weapon': True, 'item_level': 595, 'name': 'Bluefeather'}, - {'has_accessories': True, 'has_armour': True, 'has_weapon': True, 'item_level': 590, 'name': 'Augmented Classical'}, - - # 6.1.1 - {'has_accessories': False, 'has_armour': False, 'has_weapon': True, 'item_level': 605, 'name': 'Ultimate of the Heavens'}, - ] - - def handle(self, *args, **options): - # Add the gear - for gear_data in self.gear: - self.stdout.write(f'Seeding {gear_data["name"]}') - try: - with transaction.atomic(): - models.Gear.objects.create(**gear_data) - except IntegrityError: - self.stdout.write('\tSkipping, as it is already in the DB.') diff --git a/backend/api/management/commands/job_seed.py b/backend/api/management/commands/job_seed.py deleted file mode 100644 index 3530c80e..00000000 --- a/backend/api/management/commands/job_seed.py +++ /dev/null @@ -1,43 +0,0 @@ -from django.core.management.base import BaseCommand -from django.db import IntegrityError, transaction -from api import models - - -class Command(BaseCommand): - help = 'Seed the DB with initial data for static models' - - jobs = [ - {'name': 'paladin', 'id': 'PLD', 'display_name': 'Paladin', 'ordering': 0, 'role': 'tank'}, - {'name': 'warrior', 'id': 'WAR', 'display_name': 'Warrior', 'ordering': 1, 'role': 'tank'}, - {'name': 'darkknight', 'id': 'DRK', 'display_name': 'Dark Knight', 'ordering': 2, 'role': 'tank'}, - {'name': 'gunbreaker', 'id': 'GNB', 'display_name': 'Gunbreaker', 'ordering': 3, 'role': 'tank'}, - - {'name': 'whitemage', 'id': 'WHM', 'display_name': 'White Mage', 'ordering': 0, 'role': 'heal'}, - {'name': 'scholar', 'id': 'SCH', 'display_name': 'Scholar', 'ordering': 1, 'role': 'heal'}, - {'name': 'astrologian', 'id': 'AST', 'display_name': 'Astrologian', 'ordering': 2, 'role': 'heal'}, - {'name': 'sage', 'id': 'SGE', 'display_name': 'Sage', 'ordering': 3, 'role': 'heal'}, - - {'name': 'monk', 'id': 'MNK', 'display_name': 'Monk', 'ordering': 0, 'role': 'dps'}, - {'name': 'dragoon', 'id': 'DRG', 'display_name': 'Dragoon', 'ordering': 1, 'role': 'dps'}, - {'name': 'ninja', 'id': 'NIN', 'display_name': 'Ninja', 'ordering': 2, 'role': 'dps'}, - {'name': 'samurai', 'id': 'SAM', 'display_name': 'Samurai', 'ordering': 3, 'role': 'dps'}, - {'name': 'reaper', 'id': 'RPR', 'display_name': 'Reaper', 'ordering': 4, 'role': 'dps'}, - - {'name': 'bard', 'id': 'BRD', 'display_name': 'Bard', 'ordering': 5, 'role': 'dps'}, - {'name': 'machinist', 'id': 'MCH', 'display_name': 'Machinist', 'ordering': 6, 'role': 'dps'}, - {'name': 'dancer', 'id': 'DNC', 'display_name': 'Dancer', 'ordering': 7, 'role': 'dps'}, - - {'name': 'blackmage', 'id': 'BLM', 'display_name': 'Black Mage', 'ordering': 8, 'role': 'dps'}, - {'name': 'summoner', 'id': 'SMN', 'display_name': 'Summoner', 'ordering': 9, 'role': 'dps'}, - {'name': 'redmage', 'id': 'RDM', 'display_name': 'Red Mage', 'ordering': 10, 'role': 'dps'}, - ] - - def handle(self, *args, **options): - # Add the Jobs - for job_data in self.jobs: - self.stdout.write(f'Seeding {job_data["id"]}') - try: - with transaction.atomic(): - models.Job.objects.create(**job_data) - except IntegrityError: - self.stdout.write('\tSkipping, as it is already in the DB.') diff --git a/backend/api/management/commands/seed.py b/backend/api/management/commands/seed.py new file mode 100644 index 00000000..6a260049 --- /dev/null +++ b/backend/api/management/commands/seed.py @@ -0,0 +1,64 @@ +# lib +import yaml +from django.conf import settings +from django.core.management.base import BaseCommand +from django.db import IntegrityError, transaction +# local +from api import models + + +class Command(BaseCommand): + help = 'Seed the DB with static data for Gear, Tier and Job information.' + + def handle(self, *args, **options): + self.stdout.write(self.style.HTTP_REDIRECT('Beginning Seed of DB')) + seed_data_dir = settings.BASE_DIR / 'api/management/commands/seed_data' + + # Get the Tier and Gear data and import them + with open(seed_data_dir / 'gear.yml', 'r') as f: + self.stdout.write(self.style.HTTP_REDIRECT('Seeding Gear')) + self.import_file(f, models.Gear) + + with open(seed_data_dir / 'tiers.yml', 'r') as f: + self.stdout.write(self.style.HTTP_REDIRECT('Seeding Tiers')) + self.import_file(f, models.Tier) + + # Lastly we import the Job data. + # This is handled *slightly* differently because the 'ordering' key in this file will most likely change + # between expansions, especially for dps + # So this Integrity Error will be handled slightly differently + + with open(seed_data_dir / 'jobs.yml', 'r') as f: + self.stdout.write(self.style.HTTP_REDIRECT('Seeding Jobs')) + self.import_jobs(f) + + def import_file(self, file, model): + data = yaml.safe_load(file) + for item in data: + self.stdout.write(f'\t{item["name"]}') + try: + with transaction.atomic(): + model.objects.create(**item) + except IntegrityError: + self.stdout.write('\t\tSkipping, as it is already in the DB.') + + def import_jobs(self, file): + """ + Import Job data. + If Job exists, ensure the ordering value is up to date + """ + data = yaml.safe_load(file) + for job in data: + self.stdout.write(f'\t{job["id"]}') + + # Check if the Job is already in the Database + try: + obj = models.Job.objects.get(pk=job['id']) + self.stdout.write( + f'\t\tAlready exists, ensuring correct ordering ({obj.ordering} -> {job["ordering"]})', + ) + obj.ordering = job['ordering'] + obj.save() + except models.Job.DoesNotExist: + # If it doesn't exist, just create it! + models.Job.objects.create(**job) diff --git a/backend/api/management/commands/seed_data/gear.yml b/backend/api/management/commands/seed_data/gear.yml new file mode 100644 index 00000000..76aff7d5 --- /dev/null +++ b/backend/api/management/commands/seed_data/gear.yml @@ -0,0 +1,121 @@ +# 6.2 +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 610 + name: 'Rinascita' +- has_accessories: True + has_armour: True + has_weapon: False + item_level: 610 + name: 'Purgatory' +- has_accessories: False + has_armour: False + has_weapon: True + item_level: 615 + name: 'Windswept' +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 620 + name: 'Lunar Envoy' +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 630 + name: 'Augmented Lunar Envoy' +- has_accessories: True + has_armour: True + has_weapon: False + item_level: 630 + name: 'Abyssos' +- has_accessories: False + has_armour: False + has_weapon: True + item_level: 635 + name: 'Abyssos' + +# 6.1.1 +- has_accessories: False + has_armour: False + has_weapon: True + item_level: 605 + name: 'Ultimate of the Heavens' + +# 6.1 +- has_accessories: False + has_armour: True + has_weapon: False + item_level: 590 + name: 'Panthean' +- has_accessories: False + has_armour: False + has_weapon: True + item_level: 595 + name: 'Bluefeather' +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 590 + name: 'Augmented Classical' + +# 6.0.5 +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 580 + name: 'Classical' +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 590 + name: 'Radiant Host' +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 600 + name: 'Augmented Radiant Host' +- has_accessories: True + has_armour: True + has_weapon: False + item_level: 600 + name: 'Asphodelos' +- has_accessories: False + has_armour: False + has_weapon: True + item_level: 605 + name: 'Asphodelos' + +# 6.0.1 +- has_accessories: True + has_armour: True + has_weapon: False + item_level: 580 + name: 'Limbo' + +# 6.0 +- has_accessories: true + has_armour: false + has_weapon: false + item_level: 560 + name: 'The Last' +- has_accessories: false + has_armour: True + has_weapon: True + item_level: 560 + name: 'Endwalker AF' +- has_accessories: True + has_armour: True + has_weapon: True + item_level: 570 + name: 'Moonward' +- has_accessories: True + has_armour: False + has_weapon: False + item_level: 580 + name: 'Eternal Dark' +- has_accessories: False + has_armour: False + has_weapon: True + item_level: 580 + name: 'Divine Light' diff --git a/backend/api/management/commands/seed_data/jobs.yml b/backend/api/management/commands/seed_data/jobs.yml new file mode 100644 index 00000000..7ef0c240 --- /dev/null +++ b/backend/api/management/commands/seed_data/jobs.yml @@ -0,0 +1,104 @@ +# Tanks +- name: 'paladin' + id: 'PLD' + display_name: 'Paladin' + ordering: 0 + role: 'tank' +- name: 'warrior' + id: 'WAR' + display_name: 'Warrior' + ordering: 1 + role: 'tank' +- name: 'darkknight' + id: 'DRK' + display_name: 'Dark Knight' + ordering: 2 + role: 'tank' +- name: 'gunbreaker' + id: 'GNB' + display_name: 'Gunbreaker' + ordering: 3 + role: 'tank' + +# Healers +- name: 'whitemage' + id: 'WHM' + display_name: 'White Mage' + ordering: 0 + role: 'heal' +- name: 'scholar' + id: 'SCH' + display_name: 'Scholar' + ordering: 1 + role: 'heal' +- name: 'astrologian' + id: 'AST' + display_name: 'Astrologian' + ordering: 2 + role: 'heal' +- name: 'sage' + id: 'SGE' + display_name: 'Sage' + ordering: 3 + role: 'heal' + +# Melee +- name: 'monk' + id: 'MNK' + display_name: 'Monk' + ordering: 0 + role: 'dps' +- name: 'dragoon' + id: 'DRG' + display_name: 'Dragoon' + ordering: 1 + role: 'dps' +- name: 'ninja' + id: 'NIN' + display_name: 'Ninja' + ordering: 2 + role: 'dps' +- name: 'samurai' + id: 'SAM' + display_name: 'Samurai' + ordering: 3 + role: 'dps' +- name: 'reaper' + id: 'RPR' + display_name: 'Reaper' + ordering: 4 + role: 'dps' + +# Phys Ranged +- name: 'bard' + id: 'BRD' + display_name: 'Bard' + ordering: 5 + role: 'dps' +- name: 'machinist' + id: 'MCH' + display_name: 'Machinist' + ordering: 6 + role: 'dps' +- name: 'dancer' + id: 'DNC' + display_name: 'Dancer' + ordering: 7 + role: 'dps' + +# Casters +- name: 'blackmage' + id: 'BLM' + display_name: 'Black Mage' + ordering: 8 + role: 'dps' +- name: 'summoner' + id: 'SMN' + display_name: 'Summoner' + ordering: 9 + role: 'dps' +- name: 'redmage' + id: 'RDM' + display_name: 'Red Mage' + ordering: 10 + role: 'dps' diff --git a/backend/api/management/commands/seed_data/tiers.yml b/backend/api/management/commands/seed_data/tiers.yml new file mode 100644 index 00000000..75c35080 --- /dev/null +++ b/backend/api/management/commands/seed_data/tiers.yml @@ -0,0 +1,11 @@ +# 6.2 +- raid_gear_name: 'Abyssos' + tome_gear_name: 'Augmented Tome' + max_item_level: 635 + name: 'Pandæmonium: Abyssos' + +# 6.0 +- raid_gear_name: 'Asphodelos' + tome_gear_name: 'Augmented Radiant Host' + max_item_level: 605 + name: 'Pandæmonium: Asphodelos' diff --git a/backend/api/management/commands/tier_seed.py b/backend/api/management/commands/tier_seed.py deleted file mode 100644 index 05c8c6d6..00000000 --- a/backend/api/management/commands/tier_seed.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.core.management.base import BaseCommand -from django.db import IntegrityError, transaction -from api import models - - -class Command(BaseCommand): - help = 'Seed the DB with initial data for Tiers' - - tiers = [ - { - 'max_item_level': 605, - 'name': 'Pandæmonium: Asphodelos', - 'raid_gear_name': 'Asphodelos', - 'tome_gear_name': 'Augmented Radiant Host', - }, - ] - - def handle(self, *args, **options): - # Add the tiers - for tier_data in self.tiers: - self.stdout.write(f'Seeding {tier_data["name"]}') - try: - with transaction.atomic(): - models.Tier.objects.create(**tier_data) - except IntegrityError: - self.stdout.write('\tSkipping, as it is already in the DB.') diff --git a/backend/api/tests/test_bis_list.py b/backend/api/tests/test_bis_list.py index bf9d564b..45e96adc 100644 --- a/backend/api/tests/test_bis_list.py +++ b/backend/api/tests/test_bis_list.py @@ -27,8 +27,7 @@ def setUp(self): world='Lich', verified=True, ) - call_command('job_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) self.gear_id_map = {g.name: g.id for g in Gear.objects.all()} @@ -294,8 +293,7 @@ def setUp(self): world='Lich', verified=True, ) - call_command('job_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) self.gear_id_map = {g.name: g.id for g in Gear.objects.all()} @@ -521,9 +519,7 @@ def setUp(self): world='Lich', verified=True, ) - call_command('job_seed', stdout=StringIO()) - call_command('tier_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) self.gear_id_map = {g.name: g.id for g in Gear.objects.all()} diff --git a/backend/api/tests/test_character.py b/backend/api/tests/test_character.py index 77ef2065..6083a071 100644 --- a/backend/api/tests/test_character.py +++ b/backend/api/tests/test_character.py @@ -163,8 +163,7 @@ def setUp(self): Create user and BIS List """ # Call management commands for the bislist - call_command('job_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create some users, then send a list request and check the data returned is correct self.char = Character.objects.create( @@ -424,9 +423,7 @@ def setUp(self): """ Notification.objects.all().delete() # Call management commands for the bislist - call_command('tier_seed', stdout=StringIO()) - call_command('job_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create some users, then send a list request and check the data returned is correct self.char = Character.objects.create( diff --git a/backend/api/tests/test_etro.py b/backend/api/tests/test_etro.py index 42020560..d38761da 100644 --- a/backend/api/tests/test_etro.py +++ b/backend/api/tests/test_etro.py @@ -17,7 +17,7 @@ def setUp(self): """ Call the Gear seed command to prepopulate the DB """ - call_command('gear_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) def test_import(self): """ diff --git a/backend/api/tests/test_gear.py b/backend/api/tests/test_gear.py index bc51c85d..4d9b4537 100644 --- a/backend/api/tests/test_gear.py +++ b/backend/api/tests/test_gear.py @@ -6,9 +6,6 @@ from api.serializers import GearSerializer from .test_base import SavageAimTestCase -MAX_ITEM_LEVEL = 605 -MIN_ITEM_LEVEL = 560 - class GearCollection(SavageAimTestCase): """ @@ -19,7 +16,9 @@ def setUp(self): """ Call the Gear seed command to prepopulate the DB """ - call_command('gear_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) + self.max_item_level = Gear.objects.order_by('-item_level').first().item_level + self.min_item_level = Gear.objects.order_by('item_level').first().item_level def test_list(self): """ @@ -74,6 +73,5 @@ def test_item_levels(self): self.assertEqual(response.status_code, status.HTTP_200_OK) content = response.json() - # TODO - Change these as needed, hardcoding numbers so I can ensure my logic is right - self.assertEqual(content['min'], MIN_ITEM_LEVEL) - self.assertEqual(content['max'], MAX_ITEM_LEVEL) + self.assertEqual(content['min'], self.min_item_level) + self.assertEqual(content['max'], self.max_item_level) diff --git a/backend/api/tests/test_job.py b/backend/api/tests/test_job.py index 31ad124d..3179c78d 100644 --- a/backend/api/tests/test_job.py +++ b/backend/api/tests/test_job.py @@ -16,7 +16,7 @@ def setUp(self): """ Call the job seed command to prepopulate the DB """ - call_command('job_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) def test_list(self): """ diff --git a/backend/api/tests/test_loot.py b/backend/api/tests/test_loot.py index fe11b608..d8b252a5 100644 --- a/backend/api/tests/test_loot.py +++ b/backend/api/tests/test_loot.py @@ -17,9 +17,7 @@ def setUp(self): Prepopulate the DB with known data we can calculate off of """ self.maxDiff = None - call_command('tier_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) - call_command('job_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create a Team first self.team = Team.objects.create( diff --git a/backend/api/tests/test_management.py b/backend/api/tests/test_management.py index bf0d971b..e5578fd1 100644 --- a/backend/api/tests/test_management.py +++ b/backend/api/tests/test_management.py @@ -9,59 +9,11 @@ class ManagementCommandTestSuite(SavageAimTestCase): - def test_gear_seed(self): - """ - Run the gear seed command and check that it works as intended - - May need to change numbers as the command gets more gear - """ - call_command('gear_seed', stdout=StringIO()) - - self.assertTrue(models.Gear.objects.exists()) - self.assertEqual(models.Gear.objects.filter(item_level=560).count(), 2) - self.assertEqual(models.Gear.objects.filter(item_level=580).count(), 4) - - def test_job_seed(self): - """ - Run the job seed command and ensure everything is as it should be - """ - call_command('job_seed', stdout=StringIO()) - - # Test search order matches what's expected - order = [ - 'PLD', - 'WAR', - 'DRK', - 'GNB', - 'WHM', - 'SCH', - 'AST', - 'SGE', - 'MNK', - 'DRG', - 'NIN', - 'SAM', - 'RPR', - 'BRD', - 'MCH', - 'DNC', - 'BLM', - 'SMN', - 'RDM', - ] - - data = models.Job.objects.all() - - for i in range(len(order)): - self.assertEqual(data[i].id, order[i]) - def test_loot_team_link(self): """ Create a Loot object with team=None, run the command and ensure the correct team was created """ - call_command('tier_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) - call_command('job_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create a Team first team = models.Team.objects.create( @@ -144,15 +96,3 @@ def test_notification_setup(self): self.assertTrue('verify_success' in settings.notifications) self.assertTrue(settings.notifications['verify_success']) self.assertFalse(settings.notifications['verify_fail']) - - def test_tier_seed(self): - """ - Run the tier seed command and check that it works as intended - - May need to change numbers as the command gets more tiers - """ - call_command('tier_seed', stdout=StringIO()) - - self.assertTrue(models.Tier.objects.exists()) - self.assertEqual(models.Tier.objects.count(), 1) - self.assertEqual(models.Tier.objects.first().max_item_level, 605) # Asphodelos diff --git a/backend/api/tests/test_tasks.py b/backend/api/tests/test_tasks.py index 639411c7..4bc751b7 100644 --- a/backend/api/tests/test_tasks.py +++ b/backend/api/tests/test_tasks.py @@ -158,7 +158,7 @@ def test_verify_proxy_assimilation(self, mocked_get): Ensure that Proxy Characters get properly assimilated. """ - call_command('all_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) char = Character.objects.create( avatar_url='https://img.savageaim.com/abcde', lodestone_id=1234567890, diff --git a/backend/api/tests/test_team.py b/backend/api/tests/test_team.py index 6a40dd35..b4432739 100644 --- a/backend/api/tests/test_team.py +++ b/backend/api/tests/test_team.py @@ -19,9 +19,7 @@ def setUp(self): """ Run the seed commands, and create some necessary data """ - call_command('job_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) - call_command('tier_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) self.char = Character.objects.create( avatar_url='https://img.savageaim.com/abcde', @@ -290,9 +288,7 @@ def setUp(self): """ Run the seed commands, and create some necessary data """ - call_command('job_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) - call_command('tier_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) self.char = Character.objects.create( avatar_url='https://img.savageaim.com/abcde', @@ -680,9 +676,7 @@ def setUp(self): """ Run the seed commands, and create some necessary data """ - call_command('job_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) - call_command('tier_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) self.char = Character.objects.create( avatar_url='https://img.savageaim.com/abcde', diff --git a/backend/api/tests/test_team_member.py b/backend/api/tests/test_team_member.py index b74cae56..7a069e7c 100644 --- a/backend/api/tests/test_team_member.py +++ b/backend/api/tests/test_team_member.py @@ -17,9 +17,7 @@ def setUp(self): Prepopulate the DB with known data we can calculate off of """ self.maxDiff = None - call_command('tier_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) - call_command('job_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create a Team first self.team = Team.objects.create( @@ -469,9 +467,7 @@ def setUp(self): Prepopulate the DB with known data we can calculate off of """ self.maxDiff = None - call_command('tier_seed', stdout=StringIO()) - call_command('gear_seed', stdout=StringIO()) - call_command('job_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create a Team first self.team = Team.objects.create( diff --git a/backend/api/tests/test_team_proxy.py b/backend/api/tests/test_team_proxy.py index 856fcb0e..571a0c78 100644 --- a/backend/api/tests/test_team_proxy.py +++ b/backend/api/tests/test_team_proxy.py @@ -17,7 +17,7 @@ def setUp(self): Prepopulate the DB with known data we can calculate off of """ self.maxDiff = None - call_command('all_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create a Team first self.team = Team.objects.create( @@ -251,7 +251,7 @@ def setUp(self): Prepopulate the DB with known data we can calculate off of """ self.maxDiff = None - call_command('all_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create a Team first self.team = Team.objects.create( @@ -453,7 +453,7 @@ def setUp(self): Prepopulate the DB with known data we can calculate off of """ self.maxDiff = None - call_command('all_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) # Create a Team first self.team = Team.objects.create( diff --git a/backend/api/tests/test_tier.py b/backend/api/tests/test_tier.py index 4f139982..45280dd0 100644 --- a/backend/api/tests/test_tier.py +++ b/backend/api/tests/test_tier.py @@ -16,7 +16,7 @@ def setUp(self): """ Call the Tier seed command to prepopulate the DB """ - call_command('tier_seed', stdout=StringIO()) + call_command('seed', stdout=StringIO()) def test_list(self): """ diff --git a/backend/deployment/Dockerfile b/backend/deployment/Dockerfile index 49e88820..1a593091 100644 --- a/backend/deployment/Dockerfile +++ b/backend/deployment/Dockerfile @@ -12,4 +12,4 @@ RUN pip3 install gunicorn # Set the gunicorn to run the wsgi file EXPOSE 443 -ENTRYPOINT python3 manage.py migrate && python3 manage.py all_seed && gunicorn --bind=0.0.0.0:443 --access-logfile - --log-file - --log-level info --capture-output --enable-stdio-inheritance backend.wsgi +ENTRYPOINT python3 manage.py migrate && python3 manage.py seed && gunicorn --bind=0.0.0.0:443 --access-logfile - --log-file - --log-level info --capture-output --enable-stdio-inheritance backend.wsgi diff --git a/backend/requirements.txt b/backend/requirements.txt index c747662e..ba5b428e 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -24,7 +24,7 @@ cryptography==36.0.1 daphne==3.0.2 defusedxml==0.7.1 Deprecated==1.2.13 -Django==3.2.14 +Django==3.2.15 django-allauth==0.47.0 django-rest-framework==0.1.0 djangorestframework==3.13.1 @@ -51,6 +51,7 @@ pyOpenSSL==22.0.0 pyparsing==3.0.6 python3-openid==3.2.0 pytz==2021.3 +pyyaml==5.3.1 redis==4.1.0 requests==2.26.0 requests-oauthlib==1.3.0 diff --git a/frontend/src/components/bis_list/form.vue b/frontend/src/components/bis_list/form.vue index e26ab5cf..832714de 100644 --- a/frontend/src/components/bis_list/form.vue +++ b/frontend/src/components/bis_list/form.vue @@ -91,9 +91,9 @@ export default class BISListForm extends Vue { url!: string // Set up default values for min and max IL, will change as new tiers are released - maxIl = 605 + maxIl = 635 - minIl = 580 + minIl = 610 get errors(): BISListErrors { return { diff --git a/frontend/src/components/modals/changelog.vue b/frontend/src/components/modals/changelog.vue index 110b7495..b6f26028 100644 --- a/frontend/src/components/modals/changelog.vue +++ b/frontend/src/components/modals/changelog.vue @@ -13,6 +13,23 @@
A new Tier, Pandæmonium: Abyssos, has been added. Please ensure to update your Team to the new Tier to have BIS Table colours display correctly!
++ All the gear added with Patch 6.2 has been added to the site, please enjoy updating your BIS Lists for the new Tier! +
The default values for the Item Level filters in BIS pages have been updated to the new range for Abyssos. (610 - 635)
+Fixed issue where Permission tags rendered outside their container on smaller desktop screens.