Skip to content

Commit

Permalink
chore: models change
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoHernany committed Oct 7, 2024
1 parent 1c6e19c commit 9b8dab3
Show file tree
Hide file tree
Showing 49 changed files with 265 additions and 899 deletions.
Binary file modified djangoAPI/__pycache__/settings.cpython-39.pyc
Binary file not shown.
Binary file modified djangoAPI/__pycache__/tasks.cpython-39.pyc
Binary file not shown.
Binary file modified djangoAPI/__pycache__/urls.cpython-39.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion djangoAPI/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
'NAME': config("POSTGRES_DB"),
'USER': config("POSTGRES_USER"),
'PASSWORD': config("POSTGRES_PASSWORD"),
'HOST': 'db',
'HOST': '172.26.0.2',
'PORT': '5432',
}
}
Expand Down
1 change: 1 addition & 0 deletions djangoAPI/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
app = Celery("djangoAPI")

app.config_from_object('django.conf:settings', namespace="CELERY")

app.autodiscover_tasks()

@app.task
Expand Down
4 changes: 1 addition & 3 deletions djangoAPI/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
from fiocruz import views

router = routers.DefaultRouter()
router.register(r'back/VS_doking2', views.VS_ViewSet, basename='admin')
router.register(r'process-plasmodocking', views.ProcessPlasmodockingViewSet)
router.register(r'back/process-plasmodocking', views.ProcessPlasmodockingViewSet)

urlpatterns = [
path('', include(router.urls)),
path('admin/', admin.site.urls),
path('api-auth/', include('rest_framework.urls')),
path('back/VS_doking/', views.upload_view, name='upload_view'),
path('back/api_delete/<int:idItem>/', views.api_delete, name='api_delete'),
path('back/api_download/<int:id>/', views.download_file, name='api_download'),
path('back/get_resultado/<int:idItem>/', views.get_resultado, name='get_resultado'),
Expand Down
Binary file modified fiocruz/__pycache__/admin.cpython-39.pyc
Binary file not shown.
Binary file modified fiocruz/__pycache__/models.cpython-39.pyc
Binary file not shown.
Binary file modified fiocruz/__pycache__/serializers.cpython-39.pyc
Binary file not shown.
Binary file modified fiocruz/__pycache__/tasks.cpython-39.pyc
Binary file not shown.
Binary file modified fiocruz/__pycache__/views.cpython-39.pyc
Binary file not shown.
8 changes: 4 additions & 4 deletions fiocruz/admin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.contrib import admin
from .models import Process_Plasmodocking, Macromoleculas_virtaulS, UserCustom, Macro_Prepare
from .models import MacromoleculesFalciparumWithRedocking, ProcessPlasmodocking, UserCustom, MacroPrepare

# Register your models here.
admin.site.register(Process_Plasmodocking)
admin.site.register(Macromoleculas_virtaulS)
admin.site.register(ProcessPlasmodocking)
admin.site.register(MacromoleculesFalciparumWithRedocking)
admin.site.register(UserCustom)
admin.site.register(Macro_Prepare)
admin.site.register(MacroPrepare)
84 changes: 68 additions & 16 deletions fiocruz/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Django 4.2.4 on 2023-08-28 04:49
# Generated by Django 4.2.4 on 2024-10-07 00:40

from django.db import migrations, models
import django.db.models.deletion
import fiocruz.models
import uuid

Expand All @@ -14,52 +15,103 @@ class Migration(migrations.Migration):

operations = [
migrations.CreateModel(
name='Arquivos_virtaulS',
name='MacromoleculesFalciparumWithoutRedocking',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nome', models.CharField(max_length=200)),
('user', models.TextField()),
('ligante', models.FileField(blank=True, null=True, upload_to=fiocruz.models.ligante_arquivo)),
('data', models.DateTimeField(auto_now_add=True)),
('resultado_final', models.TextField(blank=True, null=True)),
('status', models.BooleanField(default=False)),
('rec', models.CharField(max_length=200)),
('rec_fld', models.FileField(upload_to=fiocruz.models.macromolecule_upload_path)),
('gridsize', models.CharField(blank=True, max_length=200, null=True)),
('gridcenter', models.CharField(blank=True, max_length=200, null=True)),
('redocking', models.BooleanField(default=False)),
],
options={
'db_table': 'macromolecules_falciparum_without_redocking',
},
),
migrations.CreateModel(
name='Macromoleculas_virtaulS',
name='MacromoleculesFalciparumWithRedocking',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nome', models.CharField(max_length=200)),
('rec', models.CharField(max_length=200)),
('rec_fld', models.FileField(upload_to='macromoleculas_virtualS')),
('rec_fld', models.FileField(upload_to=fiocruz.models.macromolecule_upload_path)),
('gridsize', models.CharField(blank=True, max_length=200, null=True)),
('gridcenter', models.CharField(blank=True, max_length=200, null=True)),
('ligante_original', models.CharField(blank=True, max_length=200, null=True)),
('rmsd_redoking', models.CharField(blank=True, max_length=200, null=True)),
('energia_orinal', models.CharField(blank=True, max_length=200, null=True)),
('rmsd_redocking', models.CharField(blank=True, max_length=200, null=True)),
('energia_original', models.CharField(blank=True, max_length=200, null=True)),
('redocking', models.BooleanField(default=True)),
],
options={
'db_table': 'macromolecules_falciparum_with_redocking',
},
),
migrations.CreateModel(
name='MacromoleculesVivaxWithRedocking',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nome', models.CharField(max_length=200)),
('rec', models.CharField(max_length=200)),
('rec_fld', models.FileField(upload_to=fiocruz.models.macromolecule_upload_path)),
('gridsize', models.CharField(blank=True, max_length=200, null=True)),
('gridcenter', models.CharField(blank=True, max_length=200, null=True)),
('ligante_original', models.CharField(blank=True, max_length=200, null=True)),
('rmsd_redocking', models.CharField(blank=True, max_length=200, null=True)),
('energia_original', models.CharField(blank=True, max_length=200, null=True)),
('redocking', models.BooleanField(default=True)),
],
options={
'db_table': 'macromolecules_vivax_with_redocking',
},
),
migrations.CreateModel(
name='Testes',
name='MacroPrepare',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('processo_name', models.CharField(max_length=200, null=True)),
('nome', models.CharField(max_length=200)),
('rec', models.CharField(max_length=200)),
('receptor_pdb', models.FileField(upload_to=fiocruz.models.arquivo)),
('receptor_pdbqt', models.FileField(null=True, upload_to=fiocruz.models.arquivo)),
('ligante_pdb', models.FileField(null=True, upload_to=fiocruz.models.arquivo)),
('gridsize', models.CharField(blank=True, max_length=200, null=True)),
('gridcenter', models.CharField(blank=True, max_length=200, null=True)),
],
),
migrations.CreateModel(
name='UserCustom',
fields=[
('id', models.TextField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('email', models.EmailField(max_length=254, unique=True)),
('username', models.CharField(max_length=255, unique=True)),
('name', models.CharField(max_length=255)),
('password', models.CharField(max_length=255)),
('name', models.CharField(max_length=255, null=True)),
('username', models.CharField(max_length=255, unique=True)),
('active', models.BooleanField(default=False)),
('deleted', models.BooleanField(default=False)),
('role', models.CharField(default='USER', max_length=50)),
('role', models.CharField(choices=[('USER', 'User'), ('ADMIN', 'Admin')], default='USER', max_length=255)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
],
options={
'db_table': 'users',
},
),
migrations.CreateModel(
name='ProcessPlasmodocking',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nome', models.CharField(max_length=200)),
('ligante', models.FileField(blank=True, null=True, upload_to=fiocruz.models.ligante_arquivo)),
('data', models.DateTimeField(auto_now_add=True)),
('resultado_final', models.TextField(default='Sem resultados')),
('status', models.CharField(choices=[('em fila', 'Em fila'), ('processando', 'Processando'), ('concluido', 'Concluído'), ('error', 'Erro')], default='em fila', max_length=20)),
('type', models.CharField(choices=[('vivax', 'Vivax'), ('falciparum', 'Falciparum')], default='falciparum', max_length=20)),
('redocking', models.BooleanField(default=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fiocruz.usercustom')),
],
options={
'db_table': 'process_plasmodocking',
},
),
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.4 on 2023-08-28 04:51
# Generated by Django 4.2.4 on 2024-10-07 00:43

from django.db import migrations

Expand All @@ -11,7 +11,7 @@ class Migration(migrations.Migration):

operations = [
migrations.AlterModelTable(
name='arquivos_virtauls',
table='Arquivos_virtaulS',
name='macroprepare',
table='macro_prepare',
),
]
16 changes: 0 additions & 16 deletions fiocruz/migrations/0003_delete_usercustom.py

This file was deleted.

30 changes: 0 additions & 30 deletions fiocruz/migrations/0004_usercustom.py

This file was deleted.

19 changes: 0 additions & 19 deletions fiocruz/migrations/0005_alter_arquivos_virtauls_user.py

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions fiocruz/migrations/0009_arquivos_virtauls_resultado_final.py

This file was deleted.

18 changes: 0 additions & 18 deletions fiocruz/migrations/0010_rename_username_usercustom_firtname.py

This file was deleted.

18 changes: 0 additions & 18 deletions fiocruz/migrations/0011_rename_firtname_usercustom_firstname.py

This file was deleted.

18 changes: 0 additions & 18 deletions fiocruz/migrations/0012_rename_firstname_usercustom_username.py

This file was deleted.

Loading

0 comments on commit 9b8dab3

Please sign in to comment.