diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2604fdd..746aeec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,10 @@ jobs: pip install flake8 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + # - name: Run migrations + # run: | + # python manage.py makemigrations + # python manage.py migrate # Ensure migrations are applied - name: Test with pytest run: | mv env.example .env diff --git a/materials/migrations/0128_auto_20240930_1321.py b/materials/migrations/0128_auto_20240930_1321.py new file mode 100644 index 0000000..f2eec78 --- /dev/null +++ b/materials/migrations/0128_auto_20240930_1321.py @@ -0,0 +1,42 @@ +# Generated by Django 3.1.14 on 2024-09-30 17:21 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materials', '0127_property_method'), + ] + + operations = [ + migrations.AlterField( + model_name='dataset', + name='linked_to', + field=models.ManyToManyField(blank=True, related_name='_dataset_linked_to_+', to='materials.Dataset'), + ), + migrations.AlterField( + model_name='system', + name='derived_to_from', + field=models.ManyToManyField(blank=True, related_name='_system_derived_to_from_+', to='materials.System'), + ), + migrations.CreateModel( + name='System_Stoichiometry', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('stoichiometry', models.CharField(default='N/A', help_text='Please provide the stoichiometry value in the format: C:6,H:12,O:1', max_length=255)), + ('system', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='materials.system')), + ], + ), + migrations.CreateModel( + name='Stoichiometry_Elements', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('element', models.CharField(max_length=1000)), + ('string_value', models.CharField(default='0', max_length=1000)), + ('float_value', models.FloatField(default=0.0)), + ('system_stoichiometry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='materials.system_stoichiometry')), + ], + ), + ] diff --git a/materials/migrations/0129_auto_20240930_1403.py b/materials/migrations/0129_auto_20240930_1403.py new file mode 100644 index 0000000..b15655d --- /dev/null +++ b/materials/migrations/0129_auto_20240930_1403.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.14 on 2024-09-30 18:03 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materials', '0128_auto_20240930_1321'), + ] + + operations = [ + migrations.AlterField( + model_name='stoichiometry_elements', + name='system_stoichiometry', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='materials.system_stoichiometry'), + ), + ] diff --git a/materials/migrations/0130_auto_20240930_1456.py b/materials/migrations/0130_auto_20240930_1456.py new file mode 100644 index 0000000..78dedcf --- /dev/null +++ b/materials/migrations/0130_auto_20240930_1456.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.14 on 2024-09-30 18:56 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('materials', '0129_auto_20240930_1403'), + ] + + operations = [ + migrations.RemoveField( + model_name='system_stoichiometry', + name='system', + ), + migrations.DeleteModel( + name='Stoichiometry_Elements', + ), + migrations.DeleteModel( + name='System_Stoichiometry', + ), + ] diff --git a/materials/migrations/0131_stoichiometry_elements_system_stoichiometry.py b/materials/migrations/0131_stoichiometry_elements_system_stoichiometry.py new file mode 100644 index 0000000..f821abc --- /dev/null +++ b/materials/migrations/0131_stoichiometry_elements_system_stoichiometry.py @@ -0,0 +1,32 @@ +# Generated by Django 3.1.14 on 2024-09-30 19:05 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materials', '0130_auto_20240930_1456'), + ] + + operations = [ + migrations.CreateModel( + name='System_Stoichiometry', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('stoichiometry', models.CharField(default='N/A', help_text='Please provide the stoichiometry value in the format: C:6,H:12,O:1', max_length=255)), + ('system', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='materials.system')), + ], + ), + migrations.CreateModel( + name='Stoichiometry_Elements', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('element', models.CharField(max_length=1000)), + ('string_value', models.CharField(default='0', max_length=1000)), + ('float_value', models.FloatField(default=0.0)), + ('system_stoichiometry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='materials.system_stoichiometry')), + ], + ), + ] diff --git a/materials/migrations/0132_auto_20240930_1607.py b/materials/migrations/0132_auto_20240930_1607.py new file mode 100644 index 0000000..ae6577d --- /dev/null +++ b/materials/migrations/0132_auto_20240930_1607.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.14 on 2024-09-30 20:07 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('materials', '0131_stoichiometry_elements_system_stoichiometry'), + ] + + operations = [ + migrations.RemoveField( + model_name='system_stoichiometry', + name='system', + ), + migrations.DeleteModel( + name='Stoichiometry_Elements', + ), + migrations.DeleteModel( + name='System_Stoichiometry', + ), + ] diff --git a/materials/migrations/0133_stoichiometry_elements_system_stoichiometry.py b/materials/migrations/0133_stoichiometry_elements_system_stoichiometry.py new file mode 100644 index 0000000..68807ae --- /dev/null +++ b/materials/migrations/0133_stoichiometry_elements_system_stoichiometry.py @@ -0,0 +1,32 @@ +# Generated by Django 3.1.14 on 2024-09-30 20:09 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materials', '0132_auto_20240930_1607'), + ] + + operations = [ + migrations.CreateModel( + name='System_Stoichiometry', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('stoichiometry', models.CharField(default='N/A', help_text='Please provide the stoichiometry value in the format: C:6,H:12,O:1', max_length=255)), + ('system', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='materials.system')), + ], + ), + migrations.CreateModel( + name='Stoichiometry_Elements', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('element', models.CharField(max_length=1000)), + ('string_value', models.CharField(default='0', max_length=1000)), + ('float_value', models.FloatField(default=0.0)), + ('system_stoichiometry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='materials.system_stoichiometry')), + ], + ), + ]