Commit d481218c authored by David Mendez's avatar David Mendez
Browse files

Move models package one level up

parent 38f58481
......@@ -60,9 +60,9 @@ unit_tests:
script:
- env
# Reminder for David: put here all tests that should be ready until you finish and then run all
- CONFIG_FILE_PATH='./configurations/ci_unit_tests_config.yml' python -m unittest app.namespaces.models.test.test_models.TestModels
- CONFIG_FILE_PATH='./configurations/ci_unit_tests_config.yml' python -m unittest app.namespaces.models.test.test_expired_job_deletion.TestExpiredJobDeletion
- CONFIG_FILE_PATH='./configurations/ci_unit_tests_config.yml' python -m unittest app.namespaces.job_submission.services.test.test_job_submission.TestJobSubmitter
- CONFIG_FILE_PATH='./configurations/ci_unit_tests_config.yml' python -m unittest app.models.test.test_models.TestModels
- CONFIG_FILE_PATH='./configurations/ci_unit_tests_config.yml' python -m unittest app.models.test.test_expired_job_deletion.TestExpiredJobDeletion
# - CONFIG_FILE_PATH='./configurations/ci_unit_tests_config.yml' python -m unittest app.namespaces.job_submission.services.test.test_job_submission.TestJobSubmitter
# - CONFIG_FILE_PATH='./configurations/ci_unit_tests_config.yml' python -m unittest
functional_tests:
......
......@@ -2,7 +2,6 @@
Entry file for the delayed jobs app
"""
from flask import Flask, Blueprint
from flask_restx import Api
from app.config import RUN_CONFIG
from app.config import RunEnvs
......
"""
Tests for the job deletion
"""
import unittest
import os
from pathlib import Path
import shutil
import datetime
import os
import random
import shutil
import string
import unittest
from pathlib import Path
from app import create_app
from app.namespaces.models import delayed_job_models
from app.models import delayed_job_models
class TestExpiredJobDeletion(unittest.TestCase):
......
......@@ -9,7 +9,7 @@ import unittest
from pathlib import Path
from app import create_app
from app.namespaces.models import delayed_job_models
from app.models import delayed_job_models
class TestModels(unittest.TestCase):
......
......@@ -5,10 +5,10 @@ from flask import request, make_response, jsonify
from flask_restx import Namespace, Resource, fields
from app.authorisation import token_generator
from app.config import verify_secret
from app.config import RUN_CONFIG
from app.authorisation.decorators import admin_token_required
from app.namespaces.models import delayed_job_models
from app.config import RUN_CONFIG
from app.config import verify_secret
from app.models import delayed_job_models
API = Namespace('admin', description='Request to login and get a token for the admin user')
......
......@@ -4,9 +4,9 @@ Module that describes and handles the requests concerned with recording the sear
from flask import abort, request
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_statistics import record_statistics_service
from app.authorisation.decorators import token_required_for_job_id
from app.namespaces.models import delayed_job_models
from app.models import delayed_job_models
from app.namespaces.job_statistics import record_statistics_service
# pylint: disable=redefined-builtin,invalid-name,no-self-use
API = Namespace('record/search', description='Requests to record statistics of a search')
......
"""
Module that describes and handles the requests concerned with recording statistics
"""
from app.namespaces.models import delayed_job_models
from app.config import RUN_CONFIG
from app.es_connection import ES
from app.models import delayed_job_models
class JobNotFoundError(Exception):
......
"""
Tests for the search statistics API
"""
import unittest
import datetime
import json
import unittest
from app import create_app
from app.db import DB
from app.namespaces.models import delayed_job_models
from app.authorisation import token_generator
from app.db import DB
from app.models import delayed_job_models
# pylint: disable=too-many-locals,no-member
......
"""
Module that describes and handles the requests concerned with the job status
"""
import werkzeug
# pylint: disable=W0622,C0103, R0201
from flask import abort, request
from flask_restx import Namespace, Resource, fields, reqparse
import werkzeug
from app.namespaces.models import delayed_job_models
from app.namespaces.job_status import job_status_service
from app.authorisation.decorators import token_required_for_job_id
from app.models import delayed_job_models
from app.namespaces.job_status import job_status_service
API = Namespace('status', description='Requests related to Job Status')
......
......@@ -5,7 +5,7 @@ import os
from flask import url_for
from app.namespaces.models import delayed_job_models
from app.models import delayed_job_models
class JobNotFoundError(Exception):
......
"""
Tests for the status namespace
"""
import datetime
import io
import json
import os
import shutil
import unittest
import io
import os
import datetime
from pathlib import Path
from app.authorisation import token_generator
from app import create_app
from app.namespaces.models import delayed_job_models
from app.authorisation import token_generator
from app.db import DB
from app.models import delayed_job_models
# pylint: disable=E1101
......
......@@ -4,9 +4,9 @@ Module that describes and handles the requests concerned with the blast search s
from flask import request
from flask_restx import Namespace, Resource, fields
from app.models import delayed_job_models
from app.namespaces.job_submission.services import job_submission_service
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
API = Namespace('submit/blast', description='Namespace to submit a BLAST job')
......
......@@ -4,9 +4,9 @@ Module that describes and handles the requests concerned with the connectivity s
from flask import request
from flask_restx import Namespace, Resource, fields
from app.models import delayed_job_models
from app.namespaces.job_submission.services import job_submission_service
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
API = Namespace('submit/connectivity', description='Namespace to submit a connectivity job')
......
......@@ -4,9 +4,9 @@ Module that describes and handles the requests concerned with the downloads
from flask import request
from flask_restx import Namespace, Resource, fields
from app.models import delayed_job_models
from app.namespaces.job_submission.services import job_submission_service
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
API = Namespace('submit/download', description='Namespace to submit a download job')
......
......@@ -4,9 +4,9 @@ Module that describes and handles the requests concerned with the similarity sea
from flask import request
from flask_restx import Namespace, Resource, fields
from app.models import delayed_job_models
from app.namespaces.job_submission.services import job_submission_service
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
API = Namespace('submit/similarity', description='Namespace to submit a similarity job')
......
......@@ -4,9 +4,9 @@ Module that describes and handles the requests concerned with the substructure s
from flask import request
from flask_restx import Namespace, Resource, fields
from app.models import delayed_job_models
from app.namespaces.job_submission.services import job_submission_service
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
API = Namespace('submit/substructure', description='Namespace to submit a substructure job')
......
"""
Module that describes and handles the requests to submit a test job
"""
from flask_restx import Resource, Namespace, reqparse
import werkzeug
from flask_restx import Resource, Namespace, reqparse
from app.models import delayed_job_models
from app.namespaces.job_submission.services import job_submission_service
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
API = Namespace('submit/test_job', description='Namespace to submit a test job')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment