From 7a928c3e8cb83946fee478ad32f47d8cccb36317 Mon Sep 17 00:00:00 2001 From: Matt Prahl Date: Tue, 26 Jul 2016 09:31:18 -0400 Subject: [PATCH 1/4] Adds database migration support, converts rida.conf to config.py, adds Vagrant support, seperates out app views to views.py, control of the app now manage.py --- .gitignore | 2 + README.rst | 4 +- Vagrantfile | 19 +++ config.py | 56 +++++++++ createdb.py | 8 -- manage.py | 146 +++++++++++++++++++++++ migrations/README | 1 + migrations/alembic.ini | 45 +++++++ migrations/env.py | 87 ++++++++++++++ migrations/script.py.mako | 22 ++++ migrations/versions/a7a553e5ca1d_.py | 57 +++++++++ requirements.txt | 4 + rida.conf | 41 ------- rida/__init__.py | 24 +++- rida/builder.py | 2 +- rida/config.py | 70 +++++------ rida/{database.py => models.py} | 123 +++++-------------- rida/scheduler/handlers/components.py | 10 +- rida/scheduler/handlers/modules.py | 9 +- rida/scheduler/handlers/repos.py | 11 +- rida/scheduler/main.py | 81 +++++-------- rida/scm.py | 4 +- rida/utils.py | 4 +- rida.py => rida/views.py | 84 +++---------- test-buildroot.py | 28 ----- test-pdc.py | 22 ---- tests/test_scheduler/test_module_wait.py | 2 +- tests/test_scheduler/test_repo_done.py | 4 +- 28 files changed, 590 insertions(+), 380 deletions(-) create mode 100644 Vagrantfile create mode 100644 config.py delete mode 100755 createdb.py create mode 100644 manage.py create mode 100755 migrations/README create mode 100644 migrations/alembic.ini create mode 100755 migrations/env.py create mode 100755 migrations/script.py.mako create mode 100644 migrations/versions/a7a553e5ca1d_.py delete mode 100644 rida.conf rename rida/{database.py => models.py} (72%) rename rida.py => rida/views.py (68%) mode change 100755 => 100644 delete mode 100755 test-buildroot.py delete mode 100755 test-pdc.py diff --git a/.gitignore b/.gitignore index 7361038f..f1a5c7b0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ rida.db server.crt server.key +.vagrant +.idea diff --git a/README.rst b/README.rst index 2f7c33cf..ad0735f4 100644 --- a/README.rst +++ b/README.rst @@ -137,8 +137,8 @@ _`Module Build States` You can see the list of possible states with:: - import rida - print(rida.BUILD_STATES) + from rida.models import BUILD_STATES + print(BUILD_STATES) Here's a description of what each of them means: diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 00000000..b610908c --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,19 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +$script = <