Commit 984e74ea443a9496e2ae2fc4de8ec9364c7b36e5
1 parent
a4f64a3f
Exists in
master
and in
1 other branch
Moving non-app directories in misc/ (except from script directory)
Showing
110 changed files
with
22 additions
and
25 deletions
Show diff stats
install/install_requirements.sh
... | ... | @@ -152,7 +152,7 @@ fi |
152 | 152 | # echo $CREATE_SUPERUSER_SCRIPT | python ../src/manage.py shell |
153 | 153 | |
154 | 154 | echo $LOAD_FIXTURES |
155 | -python manage.py loaddata fixtures/initial_fixture.json | |
155 | +python manage.py loaddata misc/fixtures/initial_fixture.json | |
156 | 156 | |
157 | 157 | echo $TELL_SUPERUSER_CREATION |
158 | 158 | ... | ... |
install/install_requirements_windows.bat
... | ... | @@ -151,7 +151,7 @@ IF %ERRORLEVEL% NEQ 0 ( |
151 | 151 | ) |
152 | 152 | |
153 | 153 | echo %LOAD_FIXTURES% |
154 | -python manage.py loaddata fixtures/initial_fixture.json | |
154 | +python manage.py loaddata misc/fixtures/initial_fixture.json | |
155 | 155 | |
156 | 156 | echo %CREATE_SUPERUSER% |
157 | 157 | echo %CREATE_SUPERUSER_SCRIPT% | python ../src/manage.py shell | ... | ... |
pyrosrun.sh
1 | 1 | #!/bin/bash |
2 | 2 | |
3 | -NEEDED_ARGUMENT="One argument is needed. Possible arguments : [runserver|test]" | |
4 | -INVALID_ARGUMENT="Invalid argument. Possible arguments : [runserver|test]" | |
3 | +NEEDED_ARGUMENT="One argument is needed. Possible arguments : [server|test|dbupdate]" | |
4 | +INVALID_ARGUMENT="Invalid argument. Possible arguments : [server|testdbupdate]" | |
5 | 5 | |
6 | 6 | source private/venv_py3_pyros/bin/activate |
7 | 7 | |
... | ... | @@ -19,6 +19,10 @@ case "$1" in |
19 | 19 | "test") |
20 | 20 | python manage.py test |
21 | 21 | ;; |
22 | + "dbupdate") | |
23 | + python manage.py makemigrations | |
24 | + python manage.py migrate | |
25 | + ;; | |
22 | 26 | *) |
23 | 27 | echo $INVALID_ARGUMENT |
24 | 28 | ;; | ... | ... |
simulators/CameraNIR.py
simulators/CameraVIS.py
src/analyzer/tasks.py
src/golden_commands_and_notes deleted
... | ... | @@ -1,11 +0,0 @@ |
1 | ->>> from celery.task.control import revoke | |
2 | ->>> revoke('435bd2c9-cb71-41a5-af8f-60b99e7ef8ad') | |
3 | - | |
4 | -Je devrais peut-รชtre crรฉer des groupes ou chords ou chain pour les execute_plan dans execute_sequence pour รฉviter le get() | |
5 | - | |
6 | -from majordome.tasks import execute_sequence as es | |
7 | - | |
8 | -res = es.apply_async((4,), countdown=30) | |
9 | -res.id, res.state, res.ready(), ... | |
10 | - | |
11 | -pm dumpdata --indent=4 common auth.User > fixtures/initial_fixture.json |
src/fixtures/initial_fixture.json renamed to src/misc/fixtures/initial_fixture.json
src/fixtures/tests/alert_mgr_test.json renamed to src/misc/fixtures/tests/alert_mgr_test.json
src/fixtures/tests/common_test.json renamed to src/misc/fixtures/tests/common_test.json
src/fixtures/tests/routine_mgr_test.json renamed to src/misc/fixtures/tests/routine_mgr_test.json
src/images/.gitkeep renamed to src/misc/images/.gitkeep
src/saved_requests/empty renamed to src/misc/saved_requests/empty
src/saved_requests/request50.xml renamed to src/misc/saved_requests/request50.xml
src/saved_requests/request63.xml renamed to src/misc/saved_requests/request63.xml
src/saved_requests/request_unittest.xml renamed to src/misc/saved_requests/request_unittest.xml
src/static/bootstrap/blank-page.html renamed to src/misc/static/bootstrap/blank-page.html
src/static/bootstrap/bootstrap-elements.html renamed to src/misc/static/bootstrap/bootstrap-elements.html
src/static/bootstrap/bootstrap-grid.html renamed to src/misc/static/bootstrap/bootstrap-grid.html
src/static/bootstrap/charts.html renamed to src/misc/static/bootstrap/charts.html
src/static/bootstrap/css/bootstrap.css renamed to src/misc/static/bootstrap/css/bootstrap.css
src/static/bootstrap/css/bootstrap.min.css renamed to src/misc/static/bootstrap/css/bootstrap.min.css
src/static/bootstrap/css/sb-admin.css renamed to src/misc/static/bootstrap/css/sb-admin.css
src/static/bootstrap/dist/jstree.js renamed to src/misc/static/bootstrap/dist/jstree.js
src/static/bootstrap/dist/jstree.min.js renamed to src/misc/static/bootstrap/dist/jstree.min.js
src/static/bootstrap/dist/libs/jquery.js renamed to src/misc/static/bootstrap/dist/libs/jquery.js
src/static/bootstrap/dist/libs/require.js renamed to src/misc/static/bootstrap/dist/libs/require.js
src/static/bootstrap/dist/themes/default/32px.png renamed to src/misc/static/bootstrap/dist/themes/default/32px.png
3.05 KB
src/static/bootstrap/dist/themes/default/40px.png renamed to src/misc/static/bootstrap/dist/themes/default/40px.png
1.38 KB
src/static/bootstrap/dist/themes/default/style.css renamed to src/misc/static/bootstrap/dist/themes/default/style.css
src/static/bootstrap/dist/themes/default/style.min.css renamed to src/misc/static/bootstrap/dist/themes/default/style.min.css
src/static/bootstrap/dist/themes/default/throbber.gif renamed to src/misc/static/bootstrap/dist/themes/default/throbber.gif
1.68 KB
src/static/bootstrap/font-awesome/css/font-awesome.css renamed to src/misc/static/bootstrap/font-awesome/css/font-awesome.css
src/static/bootstrap/font-awesome/css/font-awesome.min.css renamed to src/misc/static/bootstrap/font-awesome/css/font-awesome.min.css
src/static/bootstrap/font-awesome/fonts/FontAwesome.otf renamed to src/misc/static/bootstrap/font-awesome/fonts/FontAwesome.otf
No preview for this file type
src/static/bootstrap/font-awesome/fonts/fontawesome-webfont.eot renamed to src/misc/static/bootstrap/font-awesome/fonts/fontawesome-webfont.eot
No preview for this file type
src/static/bootstrap/font-awesome/fonts/fontawesome-webfont.svg renamed to src/misc/static/bootstrap/font-awesome/fonts/fontawesome-webfont.svg
src/static/bootstrap/font-awesome/fonts/fontawesome-webfont.ttf renamed to src/misc/static/bootstrap/font-awesome/fonts/fontawesome-webfont.ttf
No preview for this file type
src/static/bootstrap/font-awesome/fonts/fontawesome-webfont.woff renamed to src/misc/static/bootstrap/font-awesome/fonts/fontawesome-webfont.woff
No preview for this file type
src/static/bootstrap/font-awesome/less/bordered-pulled.less renamed to src/misc/static/bootstrap/font-awesome/less/bordered-pulled.less
src/static/bootstrap/font-awesome/less/core.less renamed to src/misc/static/bootstrap/font-awesome/less/core.less
src/static/bootstrap/font-awesome/less/fixed-width.less renamed to src/misc/static/bootstrap/font-awesome/less/fixed-width.less
src/static/bootstrap/font-awesome/less/font-awesome.less renamed to src/misc/static/bootstrap/font-awesome/less/font-awesome.less
src/static/bootstrap/font-awesome/less/icons.less renamed to src/misc/static/bootstrap/font-awesome/less/icons.less
src/static/bootstrap/font-awesome/less/larger.less renamed to src/misc/static/bootstrap/font-awesome/less/larger.less
src/static/bootstrap/font-awesome/less/list.less renamed to src/misc/static/bootstrap/font-awesome/less/list.less
src/static/bootstrap/font-awesome/less/mixins.less renamed to src/misc/static/bootstrap/font-awesome/less/mixins.less
src/static/bootstrap/font-awesome/less/path.less renamed to src/misc/static/bootstrap/font-awesome/less/path.less
src/static/bootstrap/font-awesome/less/rotated-flipped.less renamed to src/misc/static/bootstrap/font-awesome/less/rotated-flipped.less
src/static/bootstrap/font-awesome/less/spinning.less renamed to src/misc/static/bootstrap/font-awesome/less/spinning.less
src/static/bootstrap/font-awesome/less/stacked.less renamed to src/misc/static/bootstrap/font-awesome/less/stacked.less
src/static/bootstrap/font-awesome/less/variables.less renamed to src/misc/static/bootstrap/font-awesome/less/variables.less
src/static/bootstrap/font-awesome/scss/_bordered-pulled.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_bordered-pulled.scss
src/static/bootstrap/font-awesome/scss/_core.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_core.scss
src/static/bootstrap/font-awesome/scss/_fixed-width.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_fixed-width.scss
src/static/bootstrap/font-awesome/scss/_icons.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_icons.scss
src/static/bootstrap/font-awesome/scss/_larger.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_larger.scss
src/static/bootstrap/font-awesome/scss/_list.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_list.scss
src/static/bootstrap/font-awesome/scss/_mixins.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_mixins.scss
src/static/bootstrap/font-awesome/scss/_path.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_path.scss
src/static/bootstrap/font-awesome/scss/_rotated-flipped.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_rotated-flipped.scss
src/static/bootstrap/font-awesome/scss/_spinning.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_spinning.scss
src/static/bootstrap/font-awesome/scss/_stacked.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_stacked.scss
src/static/bootstrap/font-awesome/scss/_variables.scss renamed to src/misc/static/bootstrap/font-awesome/scss/_variables.scss
src/static/bootstrap/font-awesome/scss/font-awesome.scss renamed to src/misc/static/bootstrap/font-awesome/scss/font-awesome.scss
src/static/bootstrap/fonts/glyphicons-halflings-regular.eot renamed to src/misc/static/bootstrap/fonts/glyphicons-halflings-regular.eot
No preview for this file type
src/static/bootstrap/fonts/glyphicons-halflings-regular.svg renamed to src/misc/static/bootstrap/fonts/glyphicons-halflings-regular.svg
src/static/bootstrap/fonts/glyphicons-halflings-regular.ttf renamed to src/misc/static/bootstrap/fonts/glyphicons-halflings-regular.ttf
No preview for this file type
src/static/bootstrap/fonts/glyphicons-halflings-regular.woff renamed to src/misc/static/bootstrap/fonts/glyphicons-halflings-regular.woff
No preview for this file type
src/static/bootstrap/fonts/glyphicons-halflings-regular.woff2 renamed to src/misc/static/bootstrap/fonts/glyphicons-halflings-regular.woff2
No preview for this file type
src/static/bootstrap/forms.html renamed to src/misc/static/bootstrap/forms.html
src/static/bootstrap/index.html renamed to src/misc/static/bootstrap/index.html
src/static/bootstrap/js/bootstrap.js renamed to src/misc/static/bootstrap/js/bootstrap.js
src/static/bootstrap/js/bootstrap.min.js renamed to src/misc/static/bootstrap/js/bootstrap.min.js
src/static/bootstrap/js/flot/chart-data-flot.js renamed to src/misc/static/bootstrap/js/flot/chart-data-flot.js
src/static/bootstrap/js/flot/excanvas.min.js renamed to src/misc/static/bootstrap/js/flot/excanvas.min.js
src/static/bootstrap/js/flot/jquery.flot.js renamed to src/misc/static/bootstrap/js/flot/jquery.flot.js
src/static/bootstrap/js/flot/jquery.flot.pie.js renamed to src/misc/static/bootstrap/js/flot/jquery.flot.pie.js
src/static/bootstrap/js/flot/jquery.flot.resize.js renamed to src/misc/static/bootstrap/js/flot/jquery.flot.resize.js
src/static/bootstrap/js/flot/jquery.flot.tooltip.min.js renamed to src/misc/static/bootstrap/js/flot/jquery.flot.tooltip.min.js
src/static/bootstrap/js/jquery-1.10.2.js renamed to src/misc/static/bootstrap/js/jquery-1.10.2.js
src/static/bootstrap/js/jquery.formset.js renamed to src/misc/static/bootstrap/js/jquery.formset.js
src/static/bootstrap/js/jquery.formset.min.js renamed to src/misc/static/bootstrap/js/jquery.formset.min.js
src/static/bootstrap/js/morris/chart-data-morris.js renamed to src/misc/static/bootstrap/js/morris/chart-data-morris.js
src/static/bootstrap/js/tablesorter/jquery.tablesorter.js renamed to src/misc/static/bootstrap/js/tablesorter/jquery.tablesorter.js
src/static/bootstrap/js/tablesorter/tables.js renamed to src/misc/static/bootstrap/js/tablesorter/tables.js
src/static/bootstrap/q.png renamed to src/misc/static/bootstrap/q.png
1.48 KB
src/static/bootstrap/tables.html renamed to src/misc/static/bootstrap/tables.html
src/static/bootstrap/typography.html renamed to src/misc/static/bootstrap/typography.html
src/static/css/bootstrap.css renamed to src/misc/static/css/bootstrap.css
src/static/css/bootstrap.min.css renamed to src/misc/static/css/bootstrap.min.css
src/static/css/sb-admin.css renamed to src/misc/static/css/sb-admin.css
src/static/js/bootstrap.js renamed to src/misc/static/js/bootstrap.js
src/static/js/bootstrap.min.js renamed to src/misc/static/js/bootstrap.min.js
src/static/js/flot/chart-data-flot.js renamed to src/misc/static/js/flot/chart-data-flot.js
src/static/js/flot/excanvas.min.js renamed to src/misc/static/js/flot/excanvas.min.js
src/static/js/flot/jquery.flot.js renamed to src/misc/static/js/flot/jquery.flot.js
src/static/js/flot/jquery.flot.pie.js renamed to src/misc/static/js/flot/jquery.flot.pie.js
src/static/js/flot/jquery.flot.resize.js renamed to src/misc/static/js/flot/jquery.flot.resize.js
src/static/js/flot/jquery.flot.tooltip.min.js renamed to src/misc/static/js/flot/jquery.flot.tooltip.min.js
src/static/js/jquery-1.10.2.js renamed to src/misc/static/js/jquery-1.10.2.js
src/static/js/jquery.formset.js renamed to src/misc/static/js/jquery.formset.js
src/static/js/jquery.formset.min.js renamed to src/misc/static/js/jquery.formset.min.js
src/static/js/morris/chart-data-morris.js renamed to src/misc/static/js/morris/chart-data-morris.js
src/static/js/tablesorter/jquery.tablesorter.js renamed to src/misc/static/js/tablesorter/jquery.tablesorter.js
src/static/js/tablesorter/tables.js renamed to src/misc/static/js/tablesorter/tables.js
src/templates/base.html renamed to src/misc/templates/base.html
src/pyros/settings.py
... | ... | @@ -94,7 +94,7 @@ ROOT_URLCONF = 'pyros.urls' |
94 | 94 | TEMPLATES = [ |
95 | 95 | { |
96 | 96 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
97 | - 'DIRS': ['templates'], | |
97 | + 'DIRS': ['misc/templates'], | |
98 | 98 | 'APP_DIRS': True, |
99 | 99 | 'OPTIONS': { |
100 | 100 | 'context_processors': [ |
... | ... | @@ -110,7 +110,7 @@ TEMPLATES = [ |
110 | 110 | WSGI_APPLICATION = 'pyros.wsgi.application' |
111 | 111 | |
112 | 112 | FIXTURE_DIRS = ( |
113 | - 'fixtures/', | |
113 | + 'misc/fixtures/', | |
114 | 114 | ) |
115 | 115 | |
116 | 116 | LOGIN_URL = "/" |
... | ... | @@ -202,7 +202,7 @@ STATIC_URL = '/static/' |
202 | 202 | |
203 | 203 | # To find the static files in src/static/. Any local directory can be added to this list. |
204 | 204 | STATICFILES_DIRS = ( |
205 | - os.path.join(BASE_DIR, "static"), | |
205 | + os.path.join(BASE_DIR, "misc", "static"), | |
206 | 206 | ) |
207 | 207 | |
208 | 208 | # Used for deployment (DEBUG = False). Need to run "python manage.py collectstatic" to fill it. | ... | ... |
src/routine_manager/tests.py
... | ... | @@ -2,6 +2,8 @@ from django.test import TestCase |
2 | 2 | from common.models import * |
3 | 3 | import os |
4 | 4 | |
5 | +SAVED_REQUESTS_FOLDER = "misc/saved_requests/" | |
6 | + | |
5 | 7 | class TestRoutineManager(TestCase): |
6 | 8 | |
7 | 9 | fixtures = ["tests/routine_mgr_test.json"] |
... | ... | @@ -27,7 +29,7 @@ class TestRoutineManager(TestCase): |
27 | 29 | def test_import(self): |
28 | 30 | self.client.login(username="test@test.test", password="test") |
29 | 31 | path = "/routine_manager/import_request" |
30 | - with open("saved_requests/request_unittest.xml") as file: | |
32 | + with open(SAVED_REQUESTS_FOLDER + "request_unittest.xml") as file: | |
31 | 33 | response = self.client.post(path, {"request_file": file}, follow=True) |
32 | 34 | self.assertTrue("success" in response.context.keys(), "There should be a success message") |
33 | 35 | self.assertEqual(Request.objects.count(), 2, "There should still be two request") |
... | ... | @@ -47,6 +49,6 @@ class TestRoutineManager(TestCase): |
47 | 49 | self.client.login(username="test@test.test", password="test") |
48 | 50 | path = "/routine_manager/export_request/" + str(req.id) |
49 | 51 | response = self.client.get(path, follow=True) |
50 | - file_path = "saved_requests/request" + str(req.id) + ".xml" | |
52 | + file_path = SAVED_REQUESTS_FOLDER + "request" + str(req.id) + ".xml" | |
51 | 53 | self.assertTrue(os.path.isfile(file_path), "There should be a new file %s" % (file_path,)) |
52 | 54 | os.remove(file_path) | ... | ... |
src/routine_manager/views.py
... | ... | @@ -13,9 +13,11 @@ from django.utils.encoding import smart_str |
13 | 13 | from django.http import HttpResponse |
14 | 14 | import mimetypes |
15 | 15 | import os |
16 | - | |
17 | 16 | from pprint import pprint |
18 | 17 | |
18 | +SAVED_REQUESTS_FOLDER = "misc/saved_requests/" | |
19 | + | |
20 | + | |
19 | 21 | @login_required |
20 | 22 | def requests_list(request, status=0, message=""): |
21 | 23 | """ |
... | ... | @@ -440,7 +442,7 @@ def export_request(request, req_id): |
440 | 442 | message = "Request must be completely valid to be serialized" |
441 | 443 | return redirect(action_request, req_id=req_id, action="view", status=-1, message=message) |
442 | 444 | |
443 | - file_name = "saved_requests/request" + str(req.id) + ".xml" | |
445 | + file_name = SAVED_REQUESTS_FOLDER + "request" + str(req.id) + ".xml" | |
444 | 446 | rs = RequestSerializer() |
445 | 447 | rs.serialize(req, file_name) |
446 | 448 | ... | ... |