From 2df974febe2af48e4c6c244d76702e0b639a51cf Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 18:14:28 +0300 Subject: [PATCH 01/48] Force build --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e0b54924..552b621e 100644 --- a/README.md +++ b/README.md @@ -234,3 +234,4 @@ Also codefresh repository requires especial secret for pulling images: You can create it here: + From ea7875a3684c3990ec91be36fb5885aa91883ae6 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:07:35 +0300 Subject: [PATCH 02/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index c15b89d9..9646afb0 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -52,6 +52,11 @@ WORKDIR $STATIC_DIR RUN git clone $GEPPETTO_REPO WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO + +WORKDIR $EXTENSION_DIR/geppetto_scidash +RUN git branch +RUN git log + WORKDIR $GEPPETTO_DIR COPY ./deploy/geppetto/GeppettoConfiguration.json $GEPPETTO_DIR/GeppettoConfiguration.json RUN npm install From 32a42794de978267bfbc9b2958cb22b0c790f3fd Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:15:29 +0300 Subject: [PATCH 03/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 9646afb0..22fef425 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -54,8 +54,8 @@ WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO WORKDIR $EXTENSION_DIR/geppetto_scidash +RUH ls RUN git branch -RUN git log WORKDIR $GEPPETTO_DIR COPY ./deploy/geppetto/GeppettoConfiguration.json $GEPPETTO_DIR/GeppettoConfiguration.json From 7fc6dfe9b07efa75b9de6f9e857e36e02a283295 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:18:19 +0300 Subject: [PATCH 04/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 22fef425..68ff6573 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -54,7 +54,7 @@ WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO WORKDIR $EXTENSION_DIR/geppetto_scidash -RUH ls +RUN ls RUN git branch WORKDIR $GEPPETTO_DIR From 4a01287c6beb4b353329b5747be47e8b5e630ad2 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:23:25 +0300 Subject: [PATCH 05/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 1 - 1 file changed, 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 68ff6573..1999b74e 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -53,7 +53,6 @@ RUN git clone $GEPPETTO_REPO WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO -WORKDIR $EXTENSION_DIR/geppetto_scidash RUN ls RUN git branch From 6159bd0b2eebf5a4f96eb6dd7701be382fad4334 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:31:16 +0300 Subject: [PATCH 06/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 1999b74e..079896ec 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -54,6 +54,7 @@ WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO RUN ls +RUN cd ./geppetto-scidash RUN git branch WORKDIR $GEPPETTO_DIR From e3ca16ec10a8fc2bc288cb5a07ea65392b87db05 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:36:39 +0300 Subject: [PATCH 07/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 079896ec..b44da2b9 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -54,7 +54,8 @@ WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO RUN ls -RUN cd ./geppetto-scidash +WORKDIR $SCIDASH_EXTENSION_REPO/geppetto-scidash +RUN ls RUN git branch WORKDIR $GEPPETTO_DIR From 4e277f47f30f2b442a9d10d15f634ba60738616e Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:41:59 +0300 Subject: [PATCH 08/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index b44da2b9..727ae965 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -56,6 +56,7 @@ RUN git clone $SCIDASH_EXTENSION_REPO RUN ls WORKDIR $SCIDASH_EXTENSION_REPO/geppetto-scidash RUN ls +RUN echo $PWD RUN git branch WORKDIR $GEPPETTO_DIR From 4430b233d2d4745acf9a430860d8163352352dbe Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:48:24 +0300 Subject: [PATCH 09/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 727ae965..946f8abf 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -54,7 +54,7 @@ WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO RUN ls -WORKDIR $SCIDASH_EXTENSION_REPO/geppetto-scidash +WORKDIR $SCIDASH_EXTENSION_DIR/geppetto-scidash RUN ls RUN echo $PWD RUN git branch From 618a1b8652cd4774b186a5c4c9e5bc3a5a9c2040 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 19 Sep 2018 19:52:39 +0300 Subject: [PATCH 10/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 946f8abf..b46cf3df 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -54,7 +54,7 @@ WORKDIR $EXTENSION_DIR RUN git clone $SCIDASH_EXTENSION_REPO RUN ls -WORKDIR $SCIDASH_EXTENSION_DIR/geppetto-scidash +WORKDIR $EXTENSION_DIR/geppetto-scidash RUN ls RUN echo $PWD RUN git branch From 578c24733f613841b118ffadb784d9160de43583 Mon Sep 17 00:00:00 2001 From: Giovanni Idili Date: Thu, 20 Sep 2018 15:46:51 +0100 Subject: [PATCH 11/48] Trigger build --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 552b621e..e0b54924 100644 --- a/README.md +++ b/README.md @@ -234,4 +234,3 @@ Also codefresh repository requires especial secret for pulling images: You can create it here: - From b5ab9246adfe01ae39967f11a5d1d14b427e6f9b Mon Sep 17 00:00:00 2001 From: facu_r Date: Tue, 25 Sep 2018 09:29:56 -0300 Subject: [PATCH 12/48] add installation script --- utilities/GeppettoConfiguration.json | 25 +++++++++++++++ utilities/install.py | 48 ++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 utilities/GeppettoConfiguration.json create mode 100644 utilities/install.py diff --git a/utilities/GeppettoConfiguration.json b/utilities/GeppettoConfiguration.json new file mode 100644 index 00000000..8ac2de8b --- /dev/null +++ b/utilities/GeppettoConfiguration.json @@ -0,0 +1,25 @@ +{ + "_README": "http://docs.geppetto.org/en/latest/build.html", + "contextPath": "org.geppetto.frontend", + "useSsl": false, + "embedded": false, + "embedderURL": ["/"], + "rootRedirect": "", + "noTest": false, + "extensions": { + "geppetto-default/ComponentsInitialization": false, + "geppetto-scidash/ComponentsInitialization": true + }, + "themes": { + "geppetto-default/colors": false, + "geppetto-scidash/styles/colors": true + }, + "properties": { + "title": "SciDash", + "description": "SciDash is a project that enables the reproducible execution and visualization of data-driven unit test for assessing model quality.", + "type": "website", + "url": "http://scidash.github.io/", + "icon": "http://scidash.github.io/assets/icons/favicon-32x32.png", + "image": "http://scidash.github.io/assets/scidash-text.png" + } +} \ No newline at end of file diff --git a/utilities/install.py b/utilities/install.py new file mode 100644 index 00000000..9287cfd4 --- /dev/null +++ b/utilities/install.py @@ -0,0 +1,48 @@ +import setuptools +from setuptools.command.install import install +import subprocess +import json +import os, sys +from shutil import copyfile + +branch = "development" + +#by default clones branch (which can be passed as a parameter python install.py branch test_branch) +#if branch doesnt exist clones the default_branch +def clone(repository, folder, default_branch, cwdp='', recursive = False): + global branch + print("Cloning "+repository) + if recursive: + subprocess.call(['git', 'clone', '--recursive', repository], cwd='./'+cwdp) + else: + subprocess.call(['git', 'clone', repository], cwd='./'+cwdp) + +def main(argv): + global branch + if(len(argv) > 0): + if(argv[0] == 'branch'): + branch = argv[1] + +if __name__ == "__main__": + main(sys.argv[1:]) + +# set cwd +os.chdir(os.getcwd()+"/../") + +# install requirements +subprocess.call(['pip', 'install', '-r', 'requirements.txt'], cwd='./') + +# Clone Repos +clone('https://github.com/openworm/org.geppetto.frontend','org.geppetto.frontend','developmente', 'static') +clone('https://github.com/MetaCell/geppetto-scidash.git','geppetto-scidash','developmente', 'static/org.geppetto.frontend/src/main/webapp/extensions/') + +# change extension +print("Enabling Geppetto SciDash Extension ...") +geppetto_configuration = os.path.join(os.path.dirname(__file__), './utilities/GeppettoConfiguration.json') +copyfile(geppetto_configuration, './static/org.geppetto.frontend/src/main/webapp/GeppettoConfiguration.json') + +# Install and building +print("NPM Install and build for Geppetto Frontend ...") +subprocess.call(['npm', 'install'], cwd='./static/org.geppetto.frontend/src/main/webapp/') +subprocess.call(['npm', 'run', 'build-dev-noTest'], cwd='./static/org.geppetto.frontend/src/main/webapp/') + From 818dfc9fd29b1e92af137d411961b22bf7d763f6 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Tue, 25 Sep 2018 15:44:19 +0300 Subject: [PATCH 13/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index b46cf3df..0d149b53 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -5,7 +5,7 @@ FROM python:3.6 ARG ROOT=/ ARG APP_DIR=/app ARG GEPPETTO_REPO='https://github.com/openworm/org.geppetto.frontend.git -b griddle-update' -ARG SCIDASH_EXTENSION_REPO='https://github.com/MetaCell/geppetto-scidash.git -b development' +ARG SCIDASH_EXTENSION_REPO='https://github.com/MetaCell/geppetto-scidash.git -b tilted-titles' ARG VENV_PATH=/venv ARG DOTENV_FILE=env-docker ARG STATIC_DIR=$APP_DIR/static From c235f7f43190fef883613052eb2efb152e95ae42 Mon Sep 17 00:00:00 2001 From: facu_r Date: Tue, 25 Sep 2018 10:27:29 -0300 Subject: [PATCH 14/48] update README.md --- README.md | 59 ++++++++++--------------------------------------------- 1 file changed, 10 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index e0b54924..eceb1975 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ SciDash is a geppetto / django-based client-server web application. ## Installation +We recommend you to use a virtual environment for the installation, so you can keep all the dependencies within that environment. + **Dependencies** ``` pip install pygeppetto-django @@ -26,67 +28,26 @@ For OS X: brew install redis ``` +*Install PostgreSQL server* +Install PostgreSQL server: [instructions](https://www.postgresql.org/download/linux/ubuntu/) for Ubuntu, [application](https://postgresapp.com/) for MacOS + **Install SciDash** ``` git clone https://github.com/MetaCell/scidash -cd scidash -pip install -r requirements.txt -mkdir static -cd static -git clone https://github.com/openworm/org.geppetto.frontend -cd org.geppetto.frontend/src/main/webapp -npm install -npm run build-dev-noTest +cd utilities +python install.py ``` Optional for development to enable dynamic refresh of client code when editing html/js/css: ``` +cd statis/org.geppetto.frontend/src/main/webapp npm run build-dev-noTest:watch ``` Also you should create an .env file in the project root, an example can be found in the folder: deploy/dotenv. -**Install SciDash Geppetto Extension** - -Clone the Geppetto SciDash extension into the extensions folder -``` -cd org.geppetto.frontend/src/main/webapp/extensions -git clone https://github.com/MetaCell/geppetto-scidash.git -``` - -Then edit [GeppettoConfiguration.json](https://github.com/openworm/org.geppetto.frontend/blob/master/src/main/webapp/GeppettoConfiguration.json) to look like this: -``` -{ - "_README": "http://docs.geppetto.org/en/latest/build.html", - "contextPath": "org.geppetto.frontend", - "useSsl": false, - "embedded": false, - "embedderURL": ["/"], - "rootRedirect": "", - "noTest": false, - "extensions": { - "geppetto-default/ComponentsInitialization": false, - "geppetto-scidash/ComponentsInitialization": true - }, - "themes": { - "geppetto-default/colors": false, - "geppetto-scidash/styles/colors": true - }, - "properties": { - "title": "SciDash", - "description": "SciDash is a project that enables the reproducible execution and visualization of data-driven unit test for assessing model quality.", - "type": "website", - "url": "http://scidash.github.io/", - "icon": "http://scidash.github.io/assets/icons/favicon-32x32.png", - "image": "http://scidash.github.io/assets/scidash-text.png" - } -} -``` - -**Install Database** - -1. Install PostgreSQL server: [instructions](https://www.postgresql.org/download/linux/ubuntu/) for Ubuntu, [application](https://postgresapp.com/) for MacOS -2. Run: +**Configure Database** +Run: ``` # navigate to scidash root folder cd deploy/scripts From 99214289c8d79fff43cff45488022c691f0487dd Mon Sep 17 00:00:00 2001 From: facu_r Date: Tue, 25 Sep 2018 10:51:05 -0300 Subject: [PATCH 15/48] use deploy/geppetto/GepppettoConfiguration.json --- README.md | 5 +++-- utilities/install.py => install.py | 5 +---- utilities/GeppettoConfiguration.json | 25 ------------------------- 3 files changed, 4 insertions(+), 31 deletions(-) rename utilities/install.py => install.py (95%) delete mode 100644 utilities/GeppettoConfiguration.json diff --git a/README.md b/README.md index eceb1975..670f5933 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,14 @@ brew install redis ``` *Install PostgreSQL server* -Install PostgreSQL server: [instructions](https://www.postgresql.org/download/linux/ubuntu/) for Ubuntu, [application](https://postgresapp.com/) for MacOS +- [instructions](https://www.postgresql.org/download/linux/ubuntu/) for Ubuntu +- [application](https://postgresapp.com/) for MacOS **Install SciDash** ``` git clone https://github.com/MetaCell/scidash -cd utilities +cd scidash python install.py ``` Optional for development to enable dynamic refresh of client code when editing html/js/css: diff --git a/utilities/install.py b/install.py similarity index 95% rename from utilities/install.py rename to install.py index 9287cfd4..2dc14bf8 100644 --- a/utilities/install.py +++ b/install.py @@ -26,9 +26,6 @@ def main(argv): if __name__ == "__main__": main(sys.argv[1:]) -# set cwd -os.chdir(os.getcwd()+"/../") - # install requirements subprocess.call(['pip', 'install', '-r', 'requirements.txt'], cwd='./') @@ -38,7 +35,7 @@ def main(argv): # change extension print("Enabling Geppetto SciDash Extension ...") -geppetto_configuration = os.path.join(os.path.dirname(__file__), './utilities/GeppettoConfiguration.json') +geppetto_configuration = os.path.join(os.path.dirname(__file__), './deploy/geppetto/GeppettoConfiguration.json') copyfile(geppetto_configuration, './static/org.geppetto.frontend/src/main/webapp/GeppettoConfiguration.json') # Install and building diff --git a/utilities/GeppettoConfiguration.json b/utilities/GeppettoConfiguration.json deleted file mode 100644 index 8ac2de8b..00000000 --- a/utilities/GeppettoConfiguration.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "_README": "http://docs.geppetto.org/en/latest/build.html", - "contextPath": "org.geppetto.frontend", - "useSsl": false, - "embedded": false, - "embedderURL": ["/"], - "rootRedirect": "", - "noTest": false, - "extensions": { - "geppetto-default/ComponentsInitialization": false, - "geppetto-scidash/ComponentsInitialization": true - }, - "themes": { - "geppetto-default/colors": false, - "geppetto-scidash/styles/colors": true - }, - "properties": { - "title": "SciDash", - "description": "SciDash is a project that enables the reproducible execution and visualization of data-driven unit test for assessing model quality.", - "type": "website", - "url": "http://scidash.github.io/", - "icon": "http://scidash.github.io/assets/icons/favicon-32x32.png", - "image": "http://scidash.github.io/assets/scidash-text.png" - } -} \ No newline at end of file From f824b9830498de4a601c65c239ab8324cddc1674 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 3 Oct 2018 14:55:16 +0300 Subject: [PATCH 16/48] Trigger build From c4270ad52c1d6c0f278f32b2692e58b0847ff115 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Wed, 3 Oct 2018 15:40:04 +0300 Subject: [PATCH 17/48] Build fix --- scidash/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scidash/settings.py b/scidash/settings.py index 6e68755f..2eb04457 100644 --- a/scidash/settings.py +++ b/scidash/settings.py @@ -169,6 +169,6 @@ 'DEFAULT_CACHE_TIMEOUT': 86400, # Default is 1 day } -PYGEPPETTO_SOCKET_URL = 'org.geppetto.frontend/GeppettoServlet' +GEPPETTO_SOCKET_URL = 'org.geppetto.frontend/GeppettoServlet' GEPPETTO_SERVLET_URL = 'ws://localhost:8080/org.geppetto.frontend/GeppettoServlet' GEPPETTO_BASE_URL = 'http://localhost:8080/org.geppetto.frontend/geppetto' From 34c5d6394a3bdb886db458d9cb52f5a7c42538d0 Mon Sep 17 00:00:00 2001 From: Giovanni Idili Date: Thu, 18 Oct 2018 12:08:38 +0100 Subject: [PATCH 18/48] Trigger build From 3375e4c0820a4d0d5cde0f43cf0c4928e1ade9f0 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Thu, 18 Oct 2018 17:00:15 +0300 Subject: [PATCH 19/48] Uncache build --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 670f5933..0db0421c 100644 --- a/README.md +++ b/README.md @@ -196,3 +196,7 @@ Also codefresh repository requires especial secret for pulling images: You can create it here: + + + + From ae63da4379491eb9ef170106a6dc99c1053b488c Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Sun, 28 Oct 2018 21:49:15 +0200 Subject: [PATCH 20/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index 0d149b53..b46cf3df 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -5,7 +5,7 @@ FROM python:3.6 ARG ROOT=/ ARG APP_DIR=/app ARG GEPPETTO_REPO='https://github.com/openworm/org.geppetto.frontend.git -b griddle-update' -ARG SCIDASH_EXTENSION_REPO='https://github.com/MetaCell/geppetto-scidash.git -b tilted-titles' +ARG SCIDASH_EXTENSION_REPO='https://github.com/MetaCell/geppetto-scidash.git -b development' ARG VENV_PATH=/venv ARG DOTENV_FILE=env-docker ARG STATIC_DIR=$APP_DIR/static From 50d6ae778a726859932efa9471aeb465801475e0 Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Mon, 29 Oct 2018 11:14:29 +0200 Subject: [PATCH 21/48] Update Dockerfile-scidash --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index b46cf3df..425dcfa8 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -5,7 +5,7 @@ FROM python:3.6 ARG ROOT=/ ARG APP_DIR=/app ARG GEPPETTO_REPO='https://github.com/openworm/org.geppetto.frontend.git -b griddle-update' -ARG SCIDASH_EXTENSION_REPO='https://github.com/MetaCell/geppetto-scidash.git -b development' +ARG SCIDASH_EXTENSION_REPO='https://github.com/MetaCell/geppetto-scidash.git -b refactoring' ARG VENV_PATH=/venv ARG DOTENV_FILE=env-docker ARG STATIC_DIR=$APP_DIR/static From 999658299f440bbb34e762e6733e838056bb7031 Mon Sep 17 00:00:00 2001 From: Giovanni Idili Date: Thu, 8 Nov 2018 18:41:41 +0000 Subject: [PATCH 22/48] point to development branch for pygeppetto-django --- deploy/docker/Dockerfile-scidash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile-scidash b/deploy/docker/Dockerfile-scidash index e8d491e6..626d0e33 100644 --- a/deploy/docker/Dockerfile-scidash +++ b/deploy/docker/Dockerfile-scidash @@ -38,7 +38,7 @@ RUN apt-get update && apt-get install nodejs WORKDIR /tmp -RUN git clone https://github.com/MetaCell/pygeppetto-django.git -b development-roman +RUN git clone https://github.com/MetaCell/pygeppetto-django.git -b development WORKDIR pygeppetto-django RUN pip install -e . From 81f1484f569f5c292cfc3a7119a418906bea87f0 Mon Sep 17 00:00:00 2001 From: Giovanni Idili Date: Thu, 8 Nov 2018 18:47:57 +0000 Subject: [PATCH 23/48] Point install to dev branch of pygeppetto-django This is temporary --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0db0421c..3dea1bd5 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,12 @@ SciDash is a geppetto / django-based client-server web application. We recommend you to use a virtual environment for the installation, so you can keep all the dependencies within that environment. **Dependencies** + +*Install pygeppetto-django from sources* ``` -pip install pygeppetto-django +git clone https://github.com/MetaCell/pygeppetto-django.git -b development +cd pygeppetto-django +RUN pip install -e . ``` *Install Redis server (for the sockets communication)* From 112f7cff944f14e0f9a2e746026303cfbb9ea63f Mon Sep 17 00:00:00 2001 From: NeZanyat Date: Sat, 24 Nov 2018 14:29:56 +0200 Subject: [PATCH 24/48] Base flow optimization --- Makefile | 48 + dump.rdb | Bin 227 -> 0 bytes manage.py | 2 +- {general => scidash/general}/__init__.py | 0 {general => scidash/general}/admin.py | 2 +- {general => scidash/general}/apps.py | 0 .../general}/migrations/0001_initial.py | 0 .../migrations/0002_auto_20171206_1554.py | 0 .../migrations/0003_auto_20180124_2257.py | 0 .../migrations/0004_auto_20180215_1313.py | 0 .../migrations/0005_auto_20180403_1533.py | 0 .../migrations/0005_auto_20180404_1607.py | 0 .../migrations/0006_merge_20180404_1612.py | 0 .../general}/migrations/__init__.py | 0 {general => scidash/general}/mixins.py | 0 {general => scidash/general}/models.py | 0 {general => scidash/general}/serializers.py | 2 +- {general => scidash/general}/tests.py | 0 {general => scidash/general}/urls.py | 2 +- {general => scidash/general}/views.py | 2 +- scidash/{api => main}/__init__.py | 0 .../main/api}/__init__.py | 0 scidash/{ => main}/api/views.py | 0 scidash/{ => main}/routing.py | 0 scidash/{ => main}/settings.py | 23 +- scidash/{ => main}/urls.py | 8 +- scidash/{ => main}/wsgi.py | 0 .../api => scidash/sciunitmodels}/__init__.py | 0 .../sciunitmodels}/admin.py | 2 +- .../sciunitmodels/api}/__init__.py | 0 .../sciunitmodels}/api/views.py | 4 +- .../sciunitmodels}/apps.py | 0 .../sciunitmodels}/migrations/0001_initial.py | 0 .../migrations/0002_auto_20171226_1339.py | 0 .../migrations/0003_auto_20180227_1301.py | 0 .../migrations/0004_auto_20180301_1540.py | 0 .../migrations/0005_modelinstance_backend.py | 0 .../migrations/0006_modelinstance_hash_id.py | 0 .../migrations/0007_auto_20180525_1008.py | 0 .../sciunitmodels/migrations}/__init__.py | 0 .../sciunitmodels}/models.py | 0 .../sciunitmodels}/serializers.py | 10 +- .../sciunitmodels/tests}/__init__.py | 0 .../tests/test_data}/score_object.json | 0 .../tests/test_sciunit_models.py | 9 +- .../sciunitmodels}/views.py | 0 .../sciunittests}/__init__.py | 0 .../sciunittests}/admin.py | 2 +- scidash/sciunittests/api/__init__.py | 0 .../sciunittests}/api/views.py | 6 +- .../sciunittests}/apps.py | 0 .../sciunittests}/filters.py | 2 +- .../sciunittests}/migrations/0001_initial.py | 0 .../migrations/0002_auto_20171226_1339.py | 0 .../migrations/0003_auto_20171226_1757.py | 0 .../migrations/0003_auto_20180115_1232.py | 0 .../migrations/0004_auto_20180118_1513.py | 0 .../migrations/0004_merge_20180119_1445.py | 0 .../migrations/0005_auto_20180118_1516.py | 0 .../migrations/0006_auto_20180123_1151.py | 0 .../migrations/0006_merge_20180119_1504.py | 0 .../migrations/0007_merge_20180123_1527.py | 0 .../migrations/0007_merge_20180124_2257.py | 0 .../migrations/0008_auto_20180124_2257.py | 0 .../migrations/0009_merge_20180205_1233.py | 0 .../migrations/0009_testsuite_hash.py | 0 .../migrations/0010_auto_20180302_0923.py | 0 .../migrations/0011_auto_20180309_1229.py | 0 .../migrations/0012_merge_20180309_1254.py | 0 .../migrations/0013_auto_20180403_1533.py | 0 .../migrations/0013_auto_20180404_1607.py | 0 .../migrations/0014_merge_20180404_1613.py | 0 .../migrations/0015_auto_20180416_1202.py | 0 .../0016_scoreinstance_score_class.py | 0 .../migrations/0017_auto_20180425_1811.py | 0 .../migrations/0018_testinstance_hash_id.py | 0 .../migrations/0019_auto_20180525_1008.py | 0 .../migrations/0020_auto_20180812_1634.py | 0 scidash/sciunittests/migrations/__init__.py | 0 .../sciunittests}/models.py | 4 +- .../sciunittests}/serializers.py | 18 +- scidash/sciunittests/tests/__init__.py | 0 .../tests/test_data/score_object.json | 43 + .../tests/test_data}/score_objects_list.json | 0 .../sciunittests/tests/test_sciunit_tests.py | 7 +- .../sciunittests}/views.py | 2 +- {deploy => service}/build-all.sh | 0 .../compose/docker-compose-development.yml | 0 service/compose/docker-compose-staging.yml | 0 .../docker/Dockerfile-postgres | 0 {deploy => service}/docker/Dockerfile-scidash | 0 {deploy => service}/dotenv/env-docker | 0 .../geppetto/GeppettoConfiguration.json | 0 .../scidash/scidash-deployment.yaml | 0 .../kubernetes/scidash/scidash-service.yaml | 0 {deploy => service}/push-all.sh | 0 {deploy => service}/scripts/build-image-db.sh | 0 .../scripts/build-image-scidash.sh | 2 +- .../scripts/create_superuser.py | 0 db-backup.sh => service/scripts/db-backup.sh | 0 {deploy => service}/scripts/db-create-psql.sh | 0 service/scripts/install-backend.sh | 2 + service/scripts/install-frontend.sh | 0 {deploy => service}/scripts/run.sh | 0 tags | 2674 +++++++++++++++++ 105 files changed, 2825 insertions(+), 51 deletions(-) create mode 100644 Makefile delete mode 100644 dump.rdb rename {general => scidash/general}/__init__.py (100%) rename {general => scidash/general}/admin.py (76%) rename {general => scidash/general}/apps.py (100%) rename {general => scidash/general}/migrations/0001_initial.py (100%) rename {general => scidash/general}/migrations/0002_auto_20171206_1554.py (100%) rename {general => scidash/general}/migrations/0003_auto_20180124_2257.py (100%) rename {general => scidash/general}/migrations/0004_auto_20180215_1313.py (100%) rename {general => scidash/general}/migrations/0005_auto_20180403_1533.py (100%) rename {general => scidash/general}/migrations/0005_auto_20180404_1607.py (100%) rename {general => scidash/general}/migrations/0006_merge_20180404_1612.py (100%) rename {general => scidash/general}/migrations/__init__.py (100%) rename {general => scidash/general}/mixins.py (100%) rename {general => scidash/general}/models.py (100%) rename {general => scidash/general}/serializers.py (78%) rename {general => scidash/general}/tests.py (100%) rename {general => scidash/general}/urls.py (72%) rename {general => scidash/general}/views.py (94%) rename scidash/{api => main}/__init__.py (100%) rename {sciunitmodels => scidash/main/api}/__init__.py (100%) rename scidash/{ => main}/api/views.py (100%) rename scidash/{ => main}/routing.py (100%) rename scidash/{ => main}/settings.py (91%) rename scidash/{ => main}/urls.py (90%) rename scidash/{ => main}/wsgi.py (100%) rename {sciunitmodels/api => scidash/sciunitmodels}/__init__.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/admin.py (67%) rename {sciunitmodels/migrations => scidash/sciunitmodels/api}/__init__.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/api/views.py (82%) rename {sciunitmodels => scidash/sciunitmodels}/apps.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/migrations/0001_initial.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/migrations/0002_auto_20171226_1339.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/migrations/0003_auto_20180227_1301.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/migrations/0004_auto_20180301_1540.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/migrations/0005_modelinstance_backend.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/migrations/0006_modelinstance_hash_id.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/migrations/0007_auto_20180525_1008.py (100%) rename {sciunittests => scidash/sciunitmodels/migrations}/__init__.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/models.py (100%) rename {sciunitmodels => scidash/sciunitmodels}/serializers.py (79%) rename {sciunittests/api => scidash/sciunitmodels/tests}/__init__.py (100%) rename {test_data => scidash/sciunitmodels/tests/test_data}/score_object.json (100%) rename sciunitmodels/tests.py => scidash/sciunitmodels/tests/test_sciunit_models.py (95%) rename {sciunitmodels => scidash/sciunitmodels}/views.py (100%) rename {sciunittests/migrations => scidash/sciunittests}/__init__.py (100%) rename {sciunittests => scidash/sciunittests}/admin.py (85%) create mode 100644 scidash/sciunittests/api/__init__.py rename {sciunittests => scidash/sciunittests}/api/views.py (88%) rename {sciunittests => scidash/sciunittests}/apps.py (100%) rename {sciunittests => scidash/sciunittests}/filters.py (97%) rename {sciunittests => scidash/sciunittests}/migrations/0001_initial.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0002_auto_20171226_1339.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0003_auto_20171226_1757.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0003_auto_20180115_1232.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0004_auto_20180118_1513.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0004_merge_20180119_1445.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0005_auto_20180118_1516.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0006_auto_20180123_1151.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0006_merge_20180119_1504.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0007_merge_20180123_1527.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0007_merge_20180124_2257.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0008_auto_20180124_2257.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0009_merge_20180205_1233.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0009_testsuite_hash.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0010_auto_20180302_0923.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0011_auto_20180309_1229.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0012_merge_20180309_1254.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0013_auto_20180403_1533.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0013_auto_20180404_1607.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0014_merge_20180404_1613.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0015_auto_20180416_1202.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0016_scoreinstance_score_class.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0017_auto_20180425_1811.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0018_testinstance_hash_id.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0019_auto_20180525_1008.py (100%) rename {sciunittests => scidash/sciunittests}/migrations/0020_auto_20180812_1634.py (100%) create mode 100644 scidash/sciunittests/migrations/__init__.py rename {sciunittests => scidash/sciunittests}/models.py (97%) rename {sciunittests => scidash/sciunittests}/serializers.py (83%) create mode 100644 scidash/sciunittests/tests/__init__.py create mode 100644 scidash/sciunittests/tests/test_data/score_object.json rename {test_data => scidash/sciunittests/tests/test_data}/score_objects_list.json (100%) rename sciunittests/tests.py => scidash/sciunittests/tests/test_sciunit_tests.py (98%) rename {sciunittests => scidash/sciunittests}/views.py (95%) rename {deploy => service}/build-all.sh (100%) create mode 100644 service/compose/docker-compose-development.yml create mode 100644 service/compose/docker-compose-staging.yml rename {deploy => service}/docker/Dockerfile-postgres (100%) rename {deploy => service}/docker/Dockerfile-scidash (100%) rename {deploy => service}/dotenv/env-docker (100%) rename {deploy => service}/geppetto/GeppettoConfiguration.json (100%) rename {deploy => service}/kubernetes/scidash/scidash-deployment.yaml (100%) rename {deploy => service}/kubernetes/scidash/scidash-service.yaml (100%) rename {deploy => service}/push-all.sh (100%) rename {deploy => service}/scripts/build-image-db.sh (100%) rename {deploy => service}/scripts/build-image-scidash.sh (74%) rename create_superuser.py => service/scripts/create_superuser.py (100%) rename db-backup.sh => service/scripts/db-backup.sh (100%) rename {deploy => service}/scripts/db-create-psql.sh (100%) create mode 100755 service/scripts/install-backend.sh create mode 100755 service/scripts/install-frontend.sh rename {deploy => service}/scripts/run.sh (100%) create mode 100644 tags diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..8a7fae35 --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +install: + echo "Install" + +install-frontend: + ./service/scripts/install-frontend.sh + +install-backend: + ./service/scripts/install-backend.sh + +create-db: + ./service/scripts/db-create-psql.sh + +run-dev: migrate generate-tags + make run-django + +django-migrate: make-migrations migrate + +make-migrations: + ./manage.py makemigrations + +migrate: + ./manage.py migrate + +run-django: + ./manage.py runserver + +lint: flake8-lint isort-lint yapf-lint + +format: yapf-format isort-format + +flake8-lint: + flake8 . + +isort-lint: + isort --check-only --diff --recursive . + +isort-format: + isort --recursive . + +yapf-format: + yapf -i -r --style .style.yapf -p -e "*/migrations/*.py" -e "env" -e "*/settings.py" . + +yapf-lint: + yapf -d -r --style .style.yapf -e "*/migrations/*.py" -e "env" -e "*/settings.py" . + +generate-tags: + ctags -R --exclude=.git --exclude=node_modules --exclude=dist --exclude=env . + diff --git a/dump.rdb b/dump.rdb deleted file mode 100644 index a8cd49eb1f9f8217918c51343c87f7021f5bc99c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmXAiF;2rU6hIxJ3MdG;0_u{*m17)8GBJPzVk=B6@E!j|mSR%nyGY!CJCu=wgzg-G zBft?1qCi=n^xm7Co}6C_A+oU9p|Qm8u^Xtd7|SsH2ikh-kHet!*5M*Pd%O-CGeW~1 zy2b5$kAN0Gt zjJB!>eb2%+v=yKJ1$Bcx`(~d}^!4=q`V0|cY#*q$zkd(KsBT&f&8Tol1U1r4+0O3# P%iG#=UR->{SGx~C17TFW diff --git a/manage.py b/manage.py index 6cdcbfe7..7a7bffb5 100755 --- a/manage.py +++ b/manage.py @@ -3,7 +3,7 @@ import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scidash.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scidash.main.settings") from django.core.management import execute_from_command_line diff --git a/general/__init__.py b/scidash/general/__init__.py similarity index 100% rename from general/__init__.py rename to scidash/general/__init__.py diff --git a/general/admin.py b/scidash/general/admin.py similarity index 76% rename from general/admin.py rename to scidash/general/admin.py index 8fc41a42..086dd8c4 100644 --- a/general/admin.py +++ b/scidash/general/admin.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.contrib.auth.admin import UserAdmin -from general.models import ScidashUser +from scidash.general.models import ScidashUser # Register your models here. diff --git a/general/apps.py b/scidash/general/apps.py similarity index 100% rename from general/apps.py rename to scidash/general/apps.py diff --git a/general/migrations/0001_initial.py b/scidash/general/migrations/0001_initial.py similarity index 100% rename from general/migrations/0001_initial.py rename to scidash/general/migrations/0001_initial.py diff --git a/general/migrations/0002_auto_20171206_1554.py b/scidash/general/migrations/0002_auto_20171206_1554.py similarity index 100% rename from general/migrations/0002_auto_20171206_1554.py rename to scidash/general/migrations/0002_auto_20171206_1554.py diff --git a/general/migrations/0003_auto_20180124_2257.py b/scidash/general/migrations/0003_auto_20180124_2257.py similarity index 100% rename from general/migrations/0003_auto_20180124_2257.py rename to scidash/general/migrations/0003_auto_20180124_2257.py diff --git a/general/migrations/0004_auto_20180215_1313.py b/scidash/general/migrations/0004_auto_20180215_1313.py similarity index 100% rename from general/migrations/0004_auto_20180215_1313.py rename to scidash/general/migrations/0004_auto_20180215_1313.py diff --git a/general/migrations/0005_auto_20180403_1533.py b/scidash/general/migrations/0005_auto_20180403_1533.py similarity index 100% rename from general/migrations/0005_auto_20180403_1533.py rename to scidash/general/migrations/0005_auto_20180403_1533.py diff --git a/general/migrations/0005_auto_20180404_1607.py b/scidash/general/migrations/0005_auto_20180404_1607.py similarity index 100% rename from general/migrations/0005_auto_20180404_1607.py rename to scidash/general/migrations/0005_auto_20180404_1607.py diff --git a/general/migrations/0006_merge_20180404_1612.py b/scidash/general/migrations/0006_merge_20180404_1612.py similarity index 100% rename from general/migrations/0006_merge_20180404_1612.py rename to scidash/general/migrations/0006_merge_20180404_1612.py diff --git a/general/migrations/__init__.py b/scidash/general/migrations/__init__.py similarity index 100% rename from general/migrations/__init__.py rename to scidash/general/migrations/__init__.py diff --git a/general/mixins.py b/scidash/general/mixins.py similarity index 100% rename from general/mixins.py rename to scidash/general/mixins.py diff --git a/general/models.py b/scidash/general/models.py similarity index 100% rename from general/models.py rename to scidash/general/models.py diff --git a/general/serializers.py b/scidash/general/serializers.py similarity index 78% rename from general/serializers.py rename to scidash/general/serializers.py index 513a6e94..d60ad525 100644 --- a/general/serializers.py +++ b/scidash/general/serializers.py @@ -1,6 +1,6 @@ from rest_framework import serializers -from general.models import ScidashUser +from scidash.general.models import ScidashUser class ScidashUserSerializer(serializers.ModelSerializer): diff --git a/general/tests.py b/scidash/general/tests.py similarity index 100% rename from general/tests.py rename to scidash/general/tests.py diff --git a/general/urls.py b/scidash/general/urls.py similarity index 72% rename from general/urls.py rename to scidash/general/urls.py index 8ec4daf5..2db35941 100644 --- a/general/urls.py +++ b/scidash/general/urls.py @@ -1,5 +1,5 @@ from django.conf.urls import url -from general.views import FileUploadView +from scidash.general.views import FileUploadView urlpatterns = [ url(r'^upload/(?P[^/]+)$', FileUploadView.as_view()) diff --git a/general/views.py b/scidash/general/views.py similarity index 94% rename from general/views.py rename to scidash/general/views.py index dfbcbfa8..b6bf25ad 100644 --- a/general/views.py +++ b/scidash/general/views.py @@ -5,7 +5,7 @@ from rest_framework.parsers import MultiPartParser from rest_framework.response import Response -from sciunittests.serializers import ScoreInstanceSerializer +from scidash.sciunittests.serializers import ScoreInstanceSerializer class FileUploadView(APIView): diff --git a/scidash/api/__init__.py b/scidash/main/__init__.py similarity index 100% rename from scidash/api/__init__.py rename to scidash/main/__init__.py diff --git a/sciunitmodels/__init__.py b/scidash/main/api/__init__.py similarity index 100% rename from sciunitmodels/__init__.py rename to scidash/main/api/__init__.py diff --git a/scidash/api/views.py b/scidash/main/api/views.py similarity index 100% rename from scidash/api/views.py rename to scidash/main/api/views.py diff --git a/scidash/routing.py b/scidash/main/routing.py similarity index 100% rename from scidash/routing.py rename to scidash/main/routing.py diff --git a/scidash/settings.py b/scidash/main/settings.py similarity index 91% rename from scidash/settings.py rename to scidash/main/settings.py index 2c947464..3c7be33e 100644 --- a/scidash/settings.py +++ b/scidash/main/settings.py @@ -15,10 +15,15 @@ import datetime # Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +BASE_DIR = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +) -dotenv.read_dotenv(os.path.join(os.path.dirname(os.path.dirname(__file__)), - '.env')) +dotenv.read_dotenv( + os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(__file__))), '.env' + ) +) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ @@ -55,9 +60,9 @@ ] SCIDASH_APPS = [ - 'sciunitmodels.apps.SciunitmodelsConfig', - 'sciunittests.apps.SciunittestsConfig', - 'general.apps.GeneralConfig', + 'scidash.sciunitmodels', + 'scidash.sciunittests', + 'scidash.general', ] INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + SCIDASH_APPS @@ -84,7 +89,7 @@ ] } -ROOT_URLCONF = 'scidash.urls' +ROOT_URLCONF = 'scidash.main.urls' TEMPLATES = [ { @@ -102,7 +107,7 @@ }, ] -ASGI_APPLICATION = 'scidash.routing.application' +ASGI_APPLICATION = 'scidash.main.routing.application' # Database # https://docs.djangoproject.com/en/1.9/ref/settings/#databases @@ -170,4 +175,4 @@ GEPPETTO_SERVLET_URL = 'ws://localhost:8080/org.geppetto.frontend/GeppettoServlet' GEPPETTO_BASE_URL = 'http://localhost:8080/org.geppetto.frontend/geppetto' -ACCEPTABLE_SCORE_INSTANCES_AMOUNT = 30 +ACCEPTABLE_SCORE_INSTANCES_AMOUNT = 50 diff --git a/scidash/urls.py b/scidash/main/urls.py similarity index 90% rename from scidash/urls.py rename to scidash/main/urls.py index 0f8b550b..66d051ac 100644 --- a/scidash/urls.py +++ b/scidash/main/urls.py @@ -16,9 +16,9 @@ """ from django.conf.urls import include, url from django.contrib import admin -from sciunitmodels.api import views as models_views -from sciunittests.api import views as tests_views -from sciunittests.views import DateRangeView +from scidash.sciunitmodels.api import views as models_views +from scidash.sciunittests.api import views as tests_views +from scidash.sciunittests.views import DateRangeView from rest_framework.routers import DefaultRouter from rest_framework_jwt.views import obtain_jwt_token @@ -51,7 +51,7 @@ url(r'^admin/', admin.site.urls), url(r'^api/login/', obtain_jwt_token), url(r'^', include('pygeppetto_server.urls')), - url(r'^data/', include('general.urls')), + url(r'^data/', include('scidash.general.urls')), url(r'^api/date-range', DateRangeView.as_view(), name='date-range-view'), url(r'^api/', include(router.urls)) ] diff --git a/scidash/wsgi.py b/scidash/main/wsgi.py similarity index 100% rename from scidash/wsgi.py rename to scidash/main/wsgi.py diff --git a/sciunitmodels/api/__init__.py b/scidash/sciunitmodels/__init__.py similarity index 100% rename from sciunitmodels/api/__init__.py rename to scidash/sciunitmodels/__init__.py diff --git a/sciunitmodels/admin.py b/scidash/sciunitmodels/admin.py similarity index 67% rename from sciunitmodels/admin.py rename to scidash/sciunitmodels/admin.py index de5afc02..aa98a5e0 100644 --- a/sciunitmodels/admin.py +++ b/scidash/sciunitmodels/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from sciunitmodels.models import ModelClass, ModelInstance, Capability +from scidash.sciunitmodels.models import ModelClass, ModelInstance, Capability # Register your models here. diff --git a/sciunitmodels/migrations/__init__.py b/scidash/sciunitmodels/api/__init__.py similarity index 100% rename from sciunitmodels/migrations/__init__.py rename to scidash/sciunitmodels/api/__init__.py diff --git a/sciunitmodels/api/views.py b/scidash/sciunitmodels/api/views.py similarity index 82% rename from sciunitmodels/api/views.py rename to scidash/sciunitmodels/api/views.py index d101af23..fb753484 100644 --- a/sciunitmodels/api/views.py +++ b/scidash/sciunitmodels/api/views.py @@ -1,10 +1,10 @@ from rest_framework import viewsets, permissions -from sciunitmodels.serializers import CapabilitySerializer, \ +from scidash.sciunitmodels.serializers import CapabilitySerializer, \ ModelClassSerializer, \ ModelInstanceSerializer -from sciunitmodels.models import Capability, ModelClass, ModelInstance +from scidash.sciunitmodels.models import Capability, ModelClass, ModelInstance class CapabilityViewSet(viewsets.ReadOnlyModelViewSet): diff --git a/sciunitmodels/apps.py b/scidash/sciunitmodels/apps.py similarity index 100% rename from sciunitmodels/apps.py rename to scidash/sciunitmodels/apps.py diff --git a/sciunitmodels/migrations/0001_initial.py b/scidash/sciunitmodels/migrations/0001_initial.py similarity index 100% rename from sciunitmodels/migrations/0001_initial.py rename to scidash/sciunitmodels/migrations/0001_initial.py diff --git a/sciunitmodels/migrations/0002_auto_20171226_1339.py b/scidash/sciunitmodels/migrations/0002_auto_20171226_1339.py similarity index 100% rename from sciunitmodels/migrations/0002_auto_20171226_1339.py rename to scidash/sciunitmodels/migrations/0002_auto_20171226_1339.py diff --git a/sciunitmodels/migrations/0003_auto_20180227_1301.py b/scidash/sciunitmodels/migrations/0003_auto_20180227_1301.py similarity index 100% rename from sciunitmodels/migrations/0003_auto_20180227_1301.py rename to scidash/sciunitmodels/migrations/0003_auto_20180227_1301.py diff --git a/sciunitmodels/migrations/0004_auto_20180301_1540.py b/scidash/sciunitmodels/migrations/0004_auto_20180301_1540.py similarity index 100% rename from sciunitmodels/migrations/0004_auto_20180301_1540.py rename to scidash/sciunitmodels/migrations/0004_auto_20180301_1540.py diff --git a/sciunitmodels/migrations/0005_modelinstance_backend.py b/scidash/sciunitmodels/migrations/0005_modelinstance_backend.py similarity index 100% rename from sciunitmodels/migrations/0005_modelinstance_backend.py rename to scidash/sciunitmodels/migrations/0005_modelinstance_backend.py diff --git a/sciunitmodels/migrations/0006_modelinstance_hash_id.py b/scidash/sciunitmodels/migrations/0006_modelinstance_hash_id.py similarity index 100% rename from sciunitmodels/migrations/0006_modelinstance_hash_id.py rename to scidash/sciunitmodels/migrations/0006_modelinstance_hash_id.py diff --git a/sciunitmodels/migrations/0007_auto_20180525_1008.py b/scidash/sciunitmodels/migrations/0007_auto_20180525_1008.py similarity index 100% rename from sciunitmodels/migrations/0007_auto_20180525_1008.py rename to scidash/sciunitmodels/migrations/0007_auto_20180525_1008.py diff --git a/sciunittests/__init__.py b/scidash/sciunitmodels/migrations/__init__.py similarity index 100% rename from sciunittests/__init__.py rename to scidash/sciunitmodels/migrations/__init__.py diff --git a/sciunitmodels/models.py b/scidash/sciunitmodels/models.py similarity index 100% rename from sciunitmodels/models.py rename to scidash/sciunitmodels/models.py diff --git a/sciunitmodels/serializers.py b/scidash/sciunitmodels/serializers.py similarity index 79% rename from sciunitmodels/serializers.py rename to scidash/sciunitmodels/serializers.py index c07924d1..1f69cb51 100644 --- a/sciunitmodels/serializers.py +++ b/scidash/sciunitmodels/serializers.py @@ -3,8 +3,8 @@ from rest_framework_cache.serializers import CachedSerializerMixin from rest_framework_cache.registry import cache_registry -from sciunitmodels.models import Capability, ModelClass, ModelInstance -from general.mixins import GetByKeyOrCreateMixin +from scidash.sciunitmodels.models import Capability, ModelClass, ModelInstance +from scidash.general.mixins import GetByKeyOrCreateMixin class CapabilitySerializer(GetByKeyOrCreateMixin, @@ -46,6 +46,6 @@ class Meta: model = ModelInstance fields = '__all__' -# cache_registry.register(CapabilitySerializer) -# cache_registry.register(ModelClassSerializer) -# cache_registry.register(ModelInstanceSerializer) +cache_registry.register(CapabilitySerializer) +cache_registry.register(ModelClassSerializer) +cache_registry.register(ModelInstanceSerializer) diff --git a/sciunittests/api/__init__.py b/scidash/sciunitmodels/tests/__init__.py similarity index 100% rename from sciunittests/api/__init__.py rename to scidash/sciunitmodels/tests/__init__.py diff --git a/test_data/score_object.json b/scidash/sciunitmodels/tests/test_data/score_object.json similarity index 100% rename from test_data/score_object.json rename to scidash/sciunitmodels/tests/test_data/score_object.json diff --git a/sciunitmodels/tests.py b/scidash/sciunitmodels/tests/test_sciunit_models.py similarity index 95% rename from sciunitmodels/tests.py rename to scidash/sciunitmodels/tests/test_sciunit_models.py index 64b70412..3d117f9a 100644 --- a/sciunitmodels/tests.py +++ b/scidash/sciunitmodels/tests/test_sciunit_models.py @@ -3,12 +3,12 @@ from django.test import TestCase, Client, RequestFactory from django.urls import reverse -from general.models import ScidashUser +from scidash.general.models import ScidashUser -from sciunittests.serializers import ScoreInstanceSerializer -from sciunitmodels.serializers import ModelClassSerializer +from scidash.sciunittests.serializers import ScoreInstanceSerializer +from scidash.sciunitmodels.serializers import ModelClassSerializer -SAMPLE_FILE = os.path.join(os.path.dirname(os.path.dirname(__file__)), +SAMPLE_FILE = os.path.join(os.path.dirname(__file__), 'test_data/score_object.json') @@ -152,3 +152,4 @@ def test_is_model_class_match_the_same_object(self): parsed_response = response.json() self.assertEqual(len(parsed_response), 1) + diff --git a/sciunitmodels/views.py b/scidash/sciunitmodels/views.py similarity index 100% rename from sciunitmodels/views.py rename to scidash/sciunitmodels/views.py diff --git a/sciunittests/migrations/__init__.py b/scidash/sciunittests/__init__.py similarity index 100% rename from sciunittests/migrations/__init__.py rename to scidash/sciunittests/__init__.py diff --git a/sciunittests/admin.py b/scidash/sciunittests/admin.py similarity index 85% rename from sciunittests/admin.py rename to scidash/sciunittests/admin.py index 9bc24319..3b114ec8 100644 --- a/sciunittests/admin.py +++ b/scidash/sciunittests/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from sciunittests.models import ScoreInstance, TestInstance, TestClass, TestSuite +from scidash.sciunittests.models import ScoreInstance, TestInstance, TestClass, TestSuite # Register your models here. diff --git a/scidash/sciunittests/api/__init__.py b/scidash/sciunittests/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sciunittests/api/views.py b/scidash/sciunittests/api/views.py similarity index 88% rename from sciunittests/api/views.py rename to scidash/sciunittests/api/views.py index 976baf43..4c7be806 100644 --- a/sciunittests/api/views.py +++ b/scidash/sciunittests/api/views.py @@ -1,14 +1,14 @@ from rest_framework import viewsets, permissions -from sciunittests.serializers import ScoreInstanceSerializer, \ +from scidash.sciunittests.serializers import ScoreInstanceSerializer, \ TestInstanceSerializer, \ TestSuiteSerializer, TestClassSerializer, \ ScoreClassSerializer -from sciunittests.models import ScoreInstance, \ +from scidash.sciunittests.models import ScoreInstance, \ TestInstance, TestSuite, TestClass, \ ScoreClass -from sciunittests.filters import ScoreFilter, TestSuiteFilter, \ +from scidash.sciunittests.filters import ScoreFilter, TestSuiteFilter, \ TestInstanceFilter diff --git a/sciunittests/apps.py b/scidash/sciunittests/apps.py similarity index 100% rename from sciunittests/apps.py rename to scidash/sciunittests/apps.py diff --git a/sciunittests/filters.py b/scidash/sciunittests/filters.py similarity index 97% rename from sciunittests/filters.py rename to scidash/sciunittests/filters.py index 1239c1fc..1c91e314 100644 --- a/sciunittests/filters.py +++ b/scidash/sciunittests/filters.py @@ -1,7 +1,7 @@ from django.db.models import Count, Subquery, Q from django_filters import rest_framework as filters -from sciunittests.models import ScoreInstance, TestSuite, TestInstance +from scidash.sciunittests.models import ScoreInstance, TestSuite, TestInstance class ScoreFilter(filters.FilterSet): diff --git a/sciunittests/migrations/0001_initial.py b/scidash/sciunittests/migrations/0001_initial.py similarity index 100% rename from sciunittests/migrations/0001_initial.py rename to scidash/sciunittests/migrations/0001_initial.py diff --git a/sciunittests/migrations/0002_auto_20171226_1339.py b/scidash/sciunittests/migrations/0002_auto_20171226_1339.py similarity index 100% rename from sciunittests/migrations/0002_auto_20171226_1339.py rename to scidash/sciunittests/migrations/0002_auto_20171226_1339.py diff --git a/sciunittests/migrations/0003_auto_20171226_1757.py b/scidash/sciunittests/migrations/0003_auto_20171226_1757.py similarity index 100% rename from sciunittests/migrations/0003_auto_20171226_1757.py rename to scidash/sciunittests/migrations/0003_auto_20171226_1757.py diff --git a/sciunittests/migrations/0003_auto_20180115_1232.py b/scidash/sciunittests/migrations/0003_auto_20180115_1232.py similarity index 100% rename from sciunittests/migrations/0003_auto_20180115_1232.py rename to scidash/sciunittests/migrations/0003_auto_20180115_1232.py diff --git a/sciunittests/migrations/0004_auto_20180118_1513.py b/scidash/sciunittests/migrations/0004_auto_20180118_1513.py similarity index 100% rename from sciunittests/migrations/0004_auto_20180118_1513.py rename to scidash/sciunittests/migrations/0004_auto_20180118_1513.py diff --git a/sciunittests/migrations/0004_merge_20180119_1445.py b/scidash/sciunittests/migrations/0004_merge_20180119_1445.py similarity index 100% rename from sciunittests/migrations/0004_merge_20180119_1445.py rename to scidash/sciunittests/migrations/0004_merge_20180119_1445.py diff --git a/sciunittests/migrations/0005_auto_20180118_1516.py b/scidash/sciunittests/migrations/0005_auto_20180118_1516.py similarity index 100% rename from sciunittests/migrations/0005_auto_20180118_1516.py rename to scidash/sciunittests/migrations/0005_auto_20180118_1516.py diff --git a/sciunittests/migrations/0006_auto_20180123_1151.py b/scidash/sciunittests/migrations/0006_auto_20180123_1151.py similarity index 100% rename from sciunittests/migrations/0006_auto_20180123_1151.py rename to scidash/sciunittests/migrations/0006_auto_20180123_1151.py diff --git a/sciunittests/migrations/0006_merge_20180119_1504.py b/scidash/sciunittests/migrations/0006_merge_20180119_1504.py similarity index 100% rename from sciunittests/migrations/0006_merge_20180119_1504.py rename to scidash/sciunittests/migrations/0006_merge_20180119_1504.py diff --git a/sciunittests/migrations/0007_merge_20180123_1527.py b/scidash/sciunittests/migrations/0007_merge_20180123_1527.py similarity index 100% rename from sciunittests/migrations/0007_merge_20180123_1527.py rename to scidash/sciunittests/migrations/0007_merge_20180123_1527.py diff --git a/sciunittests/migrations/0007_merge_20180124_2257.py b/scidash/sciunittests/migrations/0007_merge_20180124_2257.py similarity index 100% rename from sciunittests/migrations/0007_merge_20180124_2257.py rename to scidash/sciunittests/migrations/0007_merge_20180124_2257.py diff --git a/sciunittests/migrations/0008_auto_20180124_2257.py b/scidash/sciunittests/migrations/0008_auto_20180124_2257.py similarity index 100% rename from sciunittests/migrations/0008_auto_20180124_2257.py rename to scidash/sciunittests/migrations/0008_auto_20180124_2257.py diff --git a/sciunittests/migrations/0009_merge_20180205_1233.py b/scidash/sciunittests/migrations/0009_merge_20180205_1233.py similarity index 100% rename from sciunittests/migrations/0009_merge_20180205_1233.py rename to scidash/sciunittests/migrations/0009_merge_20180205_1233.py diff --git a/sciunittests/migrations/0009_testsuite_hash.py b/scidash/sciunittests/migrations/0009_testsuite_hash.py similarity index 100% rename from sciunittests/migrations/0009_testsuite_hash.py rename to scidash/sciunittests/migrations/0009_testsuite_hash.py diff --git a/sciunittests/migrations/0010_auto_20180302_0923.py b/scidash/sciunittests/migrations/0010_auto_20180302_0923.py similarity index 100% rename from sciunittests/migrations/0010_auto_20180302_0923.py rename to scidash/sciunittests/migrations/0010_auto_20180302_0923.py diff --git a/sciunittests/migrations/0011_auto_20180309_1229.py b/scidash/sciunittests/migrations/0011_auto_20180309_1229.py similarity index 100% rename from sciunittests/migrations/0011_auto_20180309_1229.py rename to scidash/sciunittests/migrations/0011_auto_20180309_1229.py diff --git a/sciunittests/migrations/0012_merge_20180309_1254.py b/scidash/sciunittests/migrations/0012_merge_20180309_1254.py similarity index 100% rename from sciunittests/migrations/0012_merge_20180309_1254.py rename to scidash/sciunittests/migrations/0012_merge_20180309_1254.py diff --git a/sciunittests/migrations/0013_auto_20180403_1533.py b/scidash/sciunittests/migrations/0013_auto_20180403_1533.py similarity index 100% rename from sciunittests/migrations/0013_auto_20180403_1533.py rename to scidash/sciunittests/migrations/0013_auto_20180403_1533.py diff --git a/sciunittests/migrations/0013_auto_20180404_1607.py b/scidash/sciunittests/migrations/0013_auto_20180404_1607.py similarity index 100% rename from sciunittests/migrations/0013_auto_20180404_1607.py rename to scidash/sciunittests/migrations/0013_auto_20180404_1607.py diff --git a/sciunittests/migrations/0014_merge_20180404_1613.py b/scidash/sciunittests/migrations/0014_merge_20180404_1613.py similarity index 100% rename from sciunittests/migrations/0014_merge_20180404_1613.py rename to scidash/sciunittests/migrations/0014_merge_20180404_1613.py diff --git a/sciunittests/migrations/0015_auto_20180416_1202.py b/scidash/sciunittests/migrations/0015_auto_20180416_1202.py similarity index 100% rename from sciunittests/migrations/0015_auto_20180416_1202.py rename to scidash/sciunittests/migrations/0015_auto_20180416_1202.py diff --git a/sciunittests/migrations/0016_scoreinstance_score_class.py b/scidash/sciunittests/migrations/0016_scoreinstance_score_class.py similarity index 100% rename from sciunittests/migrations/0016_scoreinstance_score_class.py rename to scidash/sciunittests/migrations/0016_scoreinstance_score_class.py diff --git a/sciunittests/migrations/0017_auto_20180425_1811.py b/scidash/sciunittests/migrations/0017_auto_20180425_1811.py similarity index 100% rename from sciunittests/migrations/0017_auto_20180425_1811.py rename to scidash/sciunittests/migrations/0017_auto_20180425_1811.py diff --git a/sciunittests/migrations/0018_testinstance_hash_id.py b/scidash/sciunittests/migrations/0018_testinstance_hash_id.py similarity index 100% rename from sciunittests/migrations/0018_testinstance_hash_id.py rename to scidash/sciunittests/migrations/0018_testinstance_hash_id.py diff --git a/sciunittests/migrations/0019_auto_20180525_1008.py b/scidash/sciunittests/migrations/0019_auto_20180525_1008.py similarity index 100% rename from sciunittests/migrations/0019_auto_20180525_1008.py rename to scidash/sciunittests/migrations/0019_auto_20180525_1008.py diff --git a/sciunittests/migrations/0020_auto_20180812_1634.py b/scidash/sciunittests/migrations/0020_auto_20180812_1634.py similarity index 100% rename from sciunittests/migrations/0020_auto_20180812_1634.py rename to scidash/sciunittests/migrations/0020_auto_20180812_1634.py diff --git a/scidash/sciunittests/migrations/__init__.py b/scidash/sciunittests/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sciunittests/models.py b/scidash/sciunittests/models.py similarity index 97% rename from sciunittests/models.py rename to scidash/sciunittests/models.py index 3cfc1932..bff52460 100644 --- a/sciunittests/models.py +++ b/scidash/sciunittests/models.py @@ -4,8 +4,8 @@ from django.contrib.postgres.fields import JSONField, HStoreField from django.utils import timezone -import sciunitmodels -from general import models as general_models +import scidash.sciunitmodels as sciunitmodels +from scidash.general import models as general_models logger = logging.getLogger(__name__) diff --git a/sciunittests/serializers.py b/scidash/sciunittests/serializers.py similarity index 83% rename from sciunittests/serializers.py rename to scidash/sciunittests/serializers.py index d6b143e4..dcefa3f6 100644 --- a/sciunittests/serializers.py +++ b/scidash/sciunittests/serializers.py @@ -3,12 +3,12 @@ from rest_framework_cache.registry import cache_registry from rest_framework_cache.serializers import CachedSerializerMixin -from general.serializers import ScidashUserSerializer +from scidash.general.serializers import ScidashUserSerializer -from sciunittests.models import TestClass, TestSuite, TestInstance, \ +from scidash.sciunittests.models import TestClass, TestSuite, TestInstance, \ ScoreInstance, ScoreClass -from sciunitmodels.serializers import ModelInstanceSerializer -from general.mixins import GetOrCreateMixin, GetByKeyOrCreateMixin +from scidash.sciunitmodels.serializers import ModelInstanceSerializer +from scidash.general.mixins import GetOrCreateMixin, GetByKeyOrCreateMixin class TestSuiteSerializer(GetOrCreateMixin, @@ -104,8 +104,8 @@ class Meta: exclude = ('prediction_dict', 'prediction_numeric', ) -# cache_registry.register(ScoreInstanceSerializer) -# cache_registry.register(ScoreClassSerializer) -# cache_registry.register(TestClassSerializer) -# cache_registry.register(TestInstanceSerializer) -# cache_registry.register(TestSuiteSerializer) +cache_registry.register(ScoreInstanceSerializer) +cache_registry.register(ScoreClassSerializer) +cache_registry.register(TestClassSerializer) +cache_registry.register(TestInstanceSerializer) +cache_registry.register(TestSuiteSerializer) diff --git a/scidash/sciunittests/tests/__init__.py b/scidash/sciunittests/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/scidash/sciunittests/tests/test_data/score_object.json b/scidash/sciunittests/tests/test_data/score_object.json new file mode 100644 index 00000000..70ad446b --- /dev/null +++ b/scidash/sciunittests/tests/test_data/score_object.json @@ -0,0 +1,43 @@ +{ + "score_class": {"class_name": "ZScore", "url": "http://test-url.for/not-spaming-data/in-database"}, + "hash_id": "111", + "model_instance": { + "model_class": { + "class_name": "ReducedModel", + "url": "http://test-url.for/not-spaming-data/in-database", + "capabilities": [ + { + "class_name": "CanBeReduced" + } + ] + }, + "attributes": {}, + "hash_id": "111", + "name": "Izhikevich", + "run_params": {}, + "url": "https://github.com/scidash/neuronunit/blob/master/neuronunit/models/NeuroML2/LEMS_2007One.xml", + "backend": "JNeuroML" + }, + "prediction": 13, + "score": 1.66666666666667, + "sort_key": 0.738882680363527, + "score_type": "ZType", + "test_instance": { + "description": null, + "hash_id": "111", + "test_suites": [{ + "hash": "testhash", + "name": "ReducedSuite" + }], + "test_class": { + "class_name": "MyTest", + "url": "http://test-url.for/not-spaming-data/in-database" + }, + "observation": { + "mean":"8", + "std": "3", + "url": "" + }, + "verbose": 1 + } +} diff --git a/test_data/score_objects_list.json b/scidash/sciunittests/tests/test_data/score_objects_list.json similarity index 100% rename from test_data/score_objects_list.json rename to scidash/sciunittests/tests/test_data/score_objects_list.json diff --git a/sciunittests/tests.py b/scidash/sciunittests/tests/test_sciunit_tests.py similarity index 98% rename from sciunittests/tests.py rename to scidash/sciunittests/tests/test_sciunit_tests.py index 73d900cb..ebf57763 100644 --- a/sciunittests/tests.py +++ b/scidash/sciunittests/tests/test_sciunit_tests.py @@ -4,12 +4,12 @@ from django.test import TestCase, Client, RequestFactory from django.urls import reverse -from general.models import ScidashUser +from scidash.general.models import ScidashUser -from sciunittests.serializers import ScoreInstanceSerializer, \ +from scidash.sciunittests.serializers import ScoreInstanceSerializer, \ TestClassSerializer, \ ScoreClassSerializer -from sciunittests.models import ScoreInstance +from scidash.sciunittests.models import ScoreInstance SAMPLE_OBJECT = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'test_data/score_object.json') @@ -477,3 +477,4 @@ def test_is_score_class_match_the_same_object(self): parsed_response = response.json() self.assertEqual(len(parsed_response), 1) + diff --git a/sciunittests/views.py b/scidash/sciunittests/views.py similarity index 95% rename from sciunittests/views.py rename to scidash/sciunittests/views.py index 39124296..1e1891ff 100644 --- a/sciunittests/views.py +++ b/scidash/sciunittests/views.py @@ -5,7 +5,7 @@ from rest_framework.views import APIView from rest_framework.response import Response -from sciunittests.models import ScoreInstance +from scidash.sciunittests.models import ScoreInstance class DateRangeView(APIView): diff --git a/deploy/build-all.sh b/service/build-all.sh similarity index 100% rename from deploy/build-all.sh rename to service/build-all.sh diff --git a/service/compose/docker-compose-development.yml b/service/compose/docker-compose-development.yml new file mode 100644 index 00000000..e69de29b diff --git a/service/compose/docker-compose-staging.yml b/service/compose/docker-compose-staging.yml new file mode 100644 index 00000000..e69de29b diff --git a/deploy/docker/Dockerfile-postgres b/service/docker/Dockerfile-postgres similarity index 100% rename from deploy/docker/Dockerfile-postgres rename to service/docker/Dockerfile-postgres diff --git a/deploy/docker/Dockerfile-scidash b/service/docker/Dockerfile-scidash similarity index 100% rename from deploy/docker/Dockerfile-scidash rename to service/docker/Dockerfile-scidash diff --git a/deploy/dotenv/env-docker b/service/dotenv/env-docker similarity index 100% rename from deploy/dotenv/env-docker rename to service/dotenv/env-docker diff --git a/deploy/geppetto/GeppettoConfiguration.json b/service/geppetto/GeppettoConfiguration.json similarity index 100% rename from deploy/geppetto/GeppettoConfiguration.json rename to service/geppetto/GeppettoConfiguration.json diff --git a/deploy/kubernetes/scidash/scidash-deployment.yaml b/service/kubernetes/scidash/scidash-deployment.yaml similarity index 100% rename from deploy/kubernetes/scidash/scidash-deployment.yaml rename to service/kubernetes/scidash/scidash-deployment.yaml diff --git a/deploy/kubernetes/scidash/scidash-service.yaml b/service/kubernetes/scidash/scidash-service.yaml similarity index 100% rename from deploy/kubernetes/scidash/scidash-service.yaml rename to service/kubernetes/scidash/scidash-service.yaml diff --git a/deploy/push-all.sh b/service/push-all.sh similarity index 100% rename from deploy/push-all.sh rename to service/push-all.sh diff --git a/deploy/scripts/build-image-db.sh b/service/scripts/build-image-db.sh similarity index 100% rename from deploy/scripts/build-image-db.sh rename to service/scripts/build-image-db.sh diff --git a/deploy/scripts/build-image-scidash.sh b/service/scripts/build-image-scidash.sh similarity index 74% rename from deploy/scripts/build-image-scidash.sh rename to service/scripts/build-image-scidash.sh index 0274b576..b9938111 100755 --- a/deploy/scripts/build-image-scidash.sh +++ b/service/scripts/build-image-scidash.sh @@ -11,4 +11,4 @@ tag="metacell/scidash:$version" directory="." dockerfile="./deploy/docker/Dockerfile-scidash" -docker build -t $tag -f $dockerfile $directory +docker build --no-cache -t $tag -f $dockerfile $directory diff --git a/create_superuser.py b/service/scripts/create_superuser.py similarity index 100% rename from create_superuser.py rename to service/scripts/create_superuser.py diff --git a/db-backup.sh b/service/scripts/db-backup.sh similarity index 100% rename from db-backup.sh rename to service/scripts/db-backup.sh diff --git a/deploy/scripts/db-create-psql.sh b/service/scripts/db-create-psql.sh similarity index 100% rename from deploy/scripts/db-create-psql.sh rename to service/scripts/db-create-psql.sh diff --git a/service/scripts/install-backend.sh b/service/scripts/install-backend.sh new file mode 100755 index 00000000..05a7907c --- /dev/null +++ b/service/scripts/install-backend.sh @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/service/scripts/install-frontend.sh b/service/scripts/install-frontend.sh new file mode 100755 index 00000000..e69de29b diff --git a/deploy/scripts/run.sh b/service/scripts/run.sh similarity index 100% rename from deploy/scripts/run.sh rename to service/scripts/run.sh diff --git a/tags b/tags new file mode 100644 index 00000000..34b83fb1 --- /dev/null +++ b/tags @@ -0,0 +1,2674 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.8 // +" static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/handlebars/handlebars.js /^ '"': """,$/;" p +$ static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^ $[ namespace ][ name ] = function( options, element ) {$/;" f +$ static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^ $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {$/;" c +$.Widget static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^$.Widget = function( options, element ) {$/;" f +$.Widget static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^$.Widget.prototype = {$/;" c +$.Widget.options static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^ options: {$/;" p +$.Widget.widgetEventPrefix static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^ widgetEventPrefix: "",$/;" p +$.Widget.widgetName static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^ widgetName: "widget",$/;" p +$.cleanData static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^ $.cleanData = function( elems ) {$/;" f +$.expr static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery.ui.widget.js /^ $.expr[ ":" ][ fullName ] = function( elem ) {$/;" f +$.extend.fn.datepicker static/org.geppetto.frontend/src/main/webapp/js/pages/dashboard/js/libs/jquery/jqueryui/jquery-ui-1.8.21.min.js /^(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm\/dd\/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('
<\/div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(\/\\Array\\(\\)\/))}$.extend($.ui,{datepicker:{version:"1.8.21"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(\/([^A-Za-z0-9_-])\/g,"\\\\\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('
<\/div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$(''+c+"<\/span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('