Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-prommersberger committed Jul 26, 2024
1 parent 94491ad commit cfabe73
Show file tree
Hide file tree
Showing 35 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dockerfile/Webapp.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Copy the Django project and the quafel_simulators
COPY quafel_simulators/ quafel_simulators/
#+COPY quafel_simulators/ quafel_simulators/
COPY quafelweb/ quafelweb/
COPY .env_secret .env_secret

Expand Down
1 change: 0 additions & 1 deletion quafelweb/account_controller/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.shortcuts import redirect, render
from django.urls import reverse
from quafelweb.settings import OPENID_CONF_URL, OPENID_SECRET, OPENID_CLIENT_ID, OPENID_CLIENT_IDENT

from account_controller.models import AdminAccount

OAUTH = OAuth()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import random

from django.core.management.base import BaseCommand

from hardware_controller.models import HardwareProfile # Import your model
from simulation_data.models import SimulationRun, SimulatorProfile


class Command(BaseCommand):
help = 'Populates the database with example model entries'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions quafelweb/quafelweb/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
else:
raise RuntimeError("The .env_secret file is not present, get the .env_secret file from an admin")

# Build path for the source outside the django-project
EXTERNAL_DIR = os.path.join(BASE_DIR, '..', '..')
if EXTERNAL_DIR not in sys.path:
sys.path.append(EXTERNAL_DIR)

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
Expand All @@ -53,8 +49,11 @@
'django.contrib.messages',
'django.contrib.staticfiles',

'quafelweb',

# libs
'authlib',
'quafel_simulators',

# apps
'account_controller',
Expand Down
2 changes: 1 addition & 1 deletion quafelweb/quafelweb/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.urls import path, include
from django.views.generic.base import RedirectView

urlpatterns = [
path('', include('simulation_view.urls'), name='index'),
path('account/', include('account_controller.urls')),
Expand Down
3 changes: 2 additions & 1 deletion quafelweb/simulation_controller/util/simulation_request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from hardware_controller.models import HardwareProfile
from quafel_simulators.base.hardware import QuafelHardwareBase
from quafel_simulators.base.simulation_request import QuafelSimulationRequest, IncrementType
from quafel_simulators.base.simulation_request import IncrementType
from quafel_simulators.base.simulator import QuafelSimulatorBase
from quafel_simulators.quafelsubmitter import QuafelSimulationRequest
from simulation_controller.util.scripted_hardware_connection import HardwareWithScript
from simulation_data.models import SimulationRun, SimulatorProfile

Expand Down
9 changes: 3 additions & 6 deletions quafelweb/simulation_controller/views.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import functools
import itertools
import json
import math
from operator import mul
import random
from typing import TypedDict

from django.http import HttpResponse, JsonResponse
from django.shortcuts import redirect, render
from django.shortcuts import render

from account_controller.views import AccountView
from hardware_controller.models import HardwareProfile
from simulation_data.models import SimulatorProfile, SimulationRun
from simulation_data.simulation import SimulationEnv



class SimulationRequestView:
Expand Down
1 change: 1 addition & 0 deletions quafelweb/simulation_data/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Defines the models used to store SimulationRuns in an database
"""

from django.contrib.postgres.fields import ArrayField
from django.db import models

Expand Down
7 changes: 3 additions & 4 deletions quafelweb/simulation_view/views.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from django.shortcuts import render

from simulation_data.simulation import SimulationEnv, HardwareProfile
from simulation_data.models import SimulatorProfile, SimulationRun
import itertools

from django.shortcuts import render

from simulation_data.models import SimulatorProfile, SimulationRun
from simulation_data.simulation import SimulationEnv, HardwareProfile


class SimulationView:
Expand Down

0 comments on commit cfabe73

Please sign in to comment.