diff --git a/manage.py b/manage.py deleted file mode 100755 index d19471adc2418eaa4575ca968335b3c4476c0953..0000000000000000000000000000000000000000 --- a/manage.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - - -def main(): - """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'newapi.settings') - try: - from django.core.management import execute_from_command_line - except ImportError as exc: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) from exc - execute_from_command_line(sys.argv) - - -if __name__ == '__main__': - main() diff --git a/mynewapi/__init__.py b/mynewapi/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/mynewapi/__pycache__/__init__.cpython-38.pyc b/mynewapi/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index fd75c82b28fb87acfca8b457a898cbcd134c5f19..0000000000000000000000000000000000000000 Binary files a/mynewapi/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/mynewapi/__pycache__/admin.cpython-38.pyc b/mynewapi/__pycache__/admin.cpython-38.pyc deleted file mode 100644 index d3c9a01886bc0a5a48c5c80de1295cf2022630bd..0000000000000000000000000000000000000000 Binary files a/mynewapi/__pycache__/admin.cpython-38.pyc and /dev/null differ diff --git a/mynewapi/__pycache__/apps.cpython-38.pyc b/mynewapi/__pycache__/apps.cpython-38.pyc deleted file mode 100644 index 352437ad2a3980fd22afb9dc91b98bebbcfe2edd..0000000000000000000000000000000000000000 Binary files a/mynewapi/__pycache__/apps.cpython-38.pyc and /dev/null differ diff --git a/mynewapi/__pycache__/models.cpython-38.pyc b/mynewapi/__pycache__/models.cpython-38.pyc deleted file mode 100644 index 6644fca13e4998b8e7b77a91c8d8c3a44fe868cd..0000000000000000000000000000000000000000 Binary files a/mynewapi/__pycache__/models.cpython-38.pyc and /dev/null differ diff --git a/mynewapi/admin.py b/mynewapi/admin.py deleted file mode 100644 index 8c38f3f3dad51e4585f3984282c2a4bec5349c1e..0000000000000000000000000000000000000000 --- a/mynewapi/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/mynewapi/apps.py b/mynewapi/apps.py deleted file mode 100644 index b0e511d2d1e231d398e68537b36f75dfb58cf93d..0000000000000000000000000000000000000000 --- a/mynewapi/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class MynewapiConfig(AppConfig): - name = 'mynewapi' diff --git a/mynewapi/migrations/__init__.py b/mynewapi/migrations/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/mynewapi/migrations/models/report.py b/mynewapi/migrations/models/report.py deleted file mode 100644 index cca49203c2e904744cffdbee592c400df4a08f79..0000000000000000000000000000000000000000 --- a/mynewapi/migrations/models/report.py +++ /dev/null @@ -1,10 +0,0 @@ -from django.db import models, StatisticalReport -from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo, DateTimeProperty, BooleanProperty - -class Report(StructuredNode): - report_path=StringProperty() - report_source=StringProperty() - report_size=StringProperty() - - # Relationships - is_statisticalreport=RelationshipTo(StatisticalReport, 'IS') \ No newline at end of file diff --git a/mynewapi/migrations/models/rsf.py b/mynewapi/migrations/models/rsf.py deleted file mode 100644 index 07b764df666a80f78e129f568044ec428409f01f..0000000000000000000000000000000000000000 --- a/mynewapi/migrations/models/rsf.py +++ /dev/null @@ -1,15 +0,0 @@ -from django.db import models, report, DPStep, MTZfile, ScalepackFile, Reference, Construct -from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo, DateTimeProperty, BooleanProperty - -class RefelctionStructureFactors(StructuredNode): - rsf_source=StringProperty() - rsf_filesize=StringProperty() - rsf_filepath=StringProperty() - - # Relationships - input_as_ref=RelationshipTo(DPStep, 'INPUT_AS_REFERENCE') - input_of=RelationshipTo(DPStep, 'INPUT') - generates_mtz=RelationshipTo(MTZfile, 'GENERATES') - generates_scalepack=RelationshipTo(ScalepackFile, 'GENERATES') - labelled=RelationshipTo(Reference, 'LABELLED') - belongs=RelationshipTo(Construct, 'BELONGS') \ No newline at end of file diff --git a/mynewapi/models.py b/mynewapi/models.py deleted file mode 100644 index f7725753d06a25cd154a2c25d398faadeb4edeb0..0000000000000000000000000000000000000000 --- a/mynewapi/models.py +++ /dev/null @@ -1,168 +0,0 @@ -from django.db import models -from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo, DateTimeProperty, BooleanProperty - -# class City(StructuredNode): -# code = StringProperty(unique_index=True, required=True) -# name = StringProperty(index=True, default="city") - -##################################### -# Nodes and properties of the model # -##################################### - -class LigandsFitting(StructuredNode): - uid=UniqueIdProperty() - dp_step_name = StringProperty() - created_at=DateTimeProperty() - updated_at=DateTimeProperty() - pipedream_id=IntegerProperty() - score=IntegerProperty() - fitting_success=BooleanProperty() - -class Refinement(StructuredNode): - uid=UniqueIdProperty() - dp_step_name=StringProperty() - created_at=DateTimeProperty() - updated_at=DateTimeProperty() - -class PostRefinement(StructuredNode): - uid=UniqueIdProperty() - dp_step_name=StringProperty() - pipedream_id=IntegerProperty() - created_at=DateTimeProperty() - updated_at=DateTimeProperty() - -class ReductionScaling(StructuredNode): - uid=UniqueIdProperty() - dp_step_name=StringProperty() - created_at=DateTimeProperty() - updated_at=DateTimeProperty() - -class autoPROC(StructuredNode): - uid=UniqueIdProperty() - tool_name=StringProperty() - -class Buster(StructuredNode): - uid=UniqueIdProperty() - tool_name=StringProperty() - -class Rhofit(StructuredNode): - uid=UniqueIdProperty() - tool_name=StringProperty() - -class StatisticalReport(StructuredNode): - uid=UniqueIdProperty() - report_name=StringProperty() - -class ComputingHost(StructuredNode): - ch_softwares=StringProperty() - ch_softwares_number=IntegerProperty() - -class StorageHost(StructuredNode): - sh_files=StringProperty() - sh_files_number=IntegerProperty() - -########################################################################## - -class Report(StructuredNode): - report_path=StringProperty() - report_source=StringProperty() - report_size=StringProperty() - - # Relationships - is_statisticalreport=RelationshipTo(StatisticalReport, 'IS') - -class RefelctionStructureFactors(StructuredNode): - rsf_source=StringProperty() - rsf_filesize=StringProperty() - rsf_filepath=StringProperty() - - # Relationships - input_as_ref=RelationshipTo(DPStep, 'INPUT_AS_REFERENCE') - input_of=RelationshipTo(DPStep, 'INPUT') - generates_mtz=RelationshipTo(MTZfile, 'GENERATES') - generates_scalepack=RelationshipTo(ScalepackFile, 'GENERATES') - labelled=RelationshipTo(Reference, 'LABELLED') - belongs=RelationshipTo(Construct, 'BELONGS') - -class DPStep(StructuredNode): - - # Relationships - is_fitting=RelationshipTo(LigandsFitting, 'IS') - is_refinement=RelationshipTo(Refinement, 'IS') - is_postrefinement=RelationshipTo(PostRefinement, 'IS') - is_reductionscaling=RelationshipTo(ReductionScaling, 'IS') - with_tool_1=RelationshipTo(autoPROC, 'WITH') - with_tool_2=RelationshipTo(Rhofit, 'WITH') - with_tool_3=RelationshipTo(Buster, 'WITH') - genereates_report=RelationshipTo(Report, 'GENERATES') - # generates_coordinates=RelationshipTo(Coordinates, 'GENERATES') - generates_rsf=RelationshipTo(RefelctionStructureFactors, 'GENERATES') - -class Coordinates(StructuredNode): - coordinates_source=StringProperty(unique_index=True, required=True) - coordinates_filesize=StringProperty(unique_index=True, required=True) - coordinates_filepath=StringProperty(unique_index=True, required=True) - - # Relationships - input_as_ref=RelationshipTo(DPStep, 'INPUT_AS_REFERENCE') - input_of=RelationshipTo(DPStep, 'INPUT') - has_pdb=RelationshipTo(PDBFile, 'HAS') - has_mmcif=RelationshipTo(mmCIFFile, 'HAS') - belongs=RelationshipTo(Construct, 'BELONGS') - labelled=RelationshipTo(Reference, 'LABELLED') - - -class DataCollection (StructuredNode): - collection_type=StringProperty() - collection_size=StringProperty() - - # Relationships - genereates_dataset=RelationshipTo(Datatset, 'GENERATES') - -class Datatset(StructuredNode): - dataset_file_no=IntegerProperty() - dataset_size=StringProperty() - - # Relationships - input_of=RelationshipTo(DPStep, 'INPUT') - stored=RelationshipTo(StorageHost, 'STORED') - belongs=RelationshipTo(Construct, 'BELONGS') - -class mmCIFFile(StructuredNode): - uid=UniqueIdProperty() - coordinates_filetype=StringProperty(unique_index=True, required=True) - -class PDBFile(StructuredNode): - uid=UniqueIdProperty() - coordinates_filetype=StringProperty(unique_index=True, required=True) - -class MTZfile(StructuredNode): - uid=UniqueIdProperty() - rsf_filetype = StringProperty(unique_index=True, required=True) - -class ScalepackFile(StructuredNode): - uid=UniqueIdProperty() - rsf_filetype = StringProperty(unique_index=True, required=True) - -class Reference(StructuredNode): - uid=UniqueIdProperty() - -class OCF(StructuredNode): - - # Relationships - has_rsf=RelationshipTo(RefelctionStructureFactors, 'HAS') - has_coordinates=RelationshipTo(Coordinates, 'HAS') - -class Construct(StructuredNode): - - # Relationships - has_ocf=RelationshipTo(OCF, 'HAS') - has_storage_host=RelationshipTo(StorageHost, 'HAS') - has_computing_host=RelationshipTo(ComputingHost, 'HAS') - - -class Ligand(StructuredNode): - - # Relationships - associated=RelationshipTo(Datatset, 'ASSOCIATED') - diff --git a/mynewapi/tests.py b/mynewapi/tests.py deleted file mode 100644 index 7ce503c2dd97ba78597f6ff6e4393132753573f6..0000000000000000000000000000000000000000 --- a/mynewapi/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/mynewapi/views.py b/mynewapi/views.py deleted file mode 100644 index 91ea44a218fbd2f408430959283f0419c921093e..0000000000000000000000000000000000000000 --- a/mynewapi/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/newapi/__init__.py b/newapi/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/newapi/__pycache__/__init__.cpython-38.pyc b/newapi/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index faf7c92ec32915194d2dd70bf3f42e4d29106d7e..0000000000000000000000000000000000000000 Binary files a/newapi/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/newapi/__pycache__/settings.cpython-38.pyc b/newapi/__pycache__/settings.cpython-38.pyc deleted file mode 100644 index c4f675b8d20d9336efbed2ce7526247e5ebf03cd..0000000000000000000000000000000000000000 Binary files a/newapi/__pycache__/settings.cpython-38.pyc and /dev/null differ diff --git a/newapi/__pycache__/urls.cpython-38.pyc b/newapi/__pycache__/urls.cpython-38.pyc deleted file mode 100644 index 429d66ab5623aec78890f53f19bab119276006ad..0000000000000000000000000000000000000000 Binary files a/newapi/__pycache__/urls.cpython-38.pyc and /dev/null differ diff --git a/newapi/asgi.py b/newapi/asgi.py deleted file mode 100644 index eb7b9819d21d40820873f62ea6c867134e7c8fb2..0000000000000000000000000000000000000000 --- a/newapi/asgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -ASGI config for newapi project. - -It exposes the ASGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ -""" - -import os - -from django.core.asgi import get_asgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'newapi.settings') - -application = get_asgi_application() diff --git a/newapi/settings.py b/newapi/settings.py deleted file mode 100644 index bc05626f8e6f607a43328282e935f8d86c51f09d..0000000000000000000000000000000000000000 --- a/newapi/settings.py +++ /dev/null @@ -1,127 +0,0 @@ -""" -Django settings for newapi project. - -Generated by 'django-admin startproject' using Django 3.1.6. - -For more information on this file, see -https://docs.djangoproject.com/en/3.1/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/3.1/ref/settings/ -""" - -from pathlib import Path -import os - -# Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent - - -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '=013nqbp3o8hr9e*it$b1um^%ke*uxqvt5qnp=xe6@^20a)d!b' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - - 'mynewapi.apps.MynewapiConfig', - 'django_neomodel' -] - -MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -] - -ROOT_URLCONF = 'newapi.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'newapi.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/3.1/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', - } -} - -NEOMODEL_NEO4J_BOLT_URL = os.environ.get('NEO4J_BOLT_URL','bolt://neo4j:neo4@localhost:7687') - - - -# Password validation -# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# Internationalization -# https://docs.djangoproject.com/en/3.1/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/3.1/howto/static-files/ - -STATIC_URL = '/static/' diff --git a/newapi/urls.py b/newapi/urls.py deleted file mode 100644 index d604da1fb00375ebd4140b33c12ec95150047106..0000000000000000000000000000000000000000 --- a/newapi/urls.py +++ /dev/null @@ -1,21 +0,0 @@ -"""newapi URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/3.1/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" -from django.contrib import admin -from django.urls import path - -urlpatterns = [ - path('admin/', admin.site.urls), -] diff --git a/newapi/wsgi.py b/newapi/wsgi.py deleted file mode 100644 index 1ed8999a1ae4dc7ec1bc231de7e8ab94f04121ee..0000000000000000000000000000000000000000 --- a/newapi/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for newapi project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'newapi.settings') - -application = get_wsgi_application()