This gains a 30-40% speedup, based on initial test tests. I haven't tested everything, so some tests may need some user apps available -- and if not, we need to add tests that cover the user apps. Also, of course, we want to make it some sort of test config option, so that in real usage the user apps are installed.
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py index 57e43d6..2cf2994 100644 --- a/Allura/allura/model/project.py +++ b/Allura/allura/model/project.py @@ -574,10 +574,7 @@ def configure_project( if users is None: users = [ c.user ] if apps is None: if is_user_project: - apps = [('Wiki', 'wiki', 'Wiki'), - ('profile', 'profile', 'Profile'), - ('admin', 'admin', 'Admin'), - ('search', 'search', 'Search')] + apps = [] else: apps = [('admin', 'admin', 'Admin'), ('search', 'search', 'Search')] diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py index e66e469..e985e17 100644 --- a/Allura/allura/model/auth.py +++ b/Allura/allura/model/auth.py @@ -402,11 +402,12 @@ def register(cls, doc, make_project=True): p._extra_tool_status = ['user'] # add user project informative text to home home_app = p.app_instance('wiki') - home_page = WM.Page.query.get(app_config_id=home_app.config._id) - home_page.text = ("This is the personal project of %s." - " This project is created automatically during user registration" - " as an easy place to store personal data that doesn't need its own" - " project such as cloned repositories.") % user.display_name + if home_app: + home_page = WM.Page.query.get(app_config_id=home_app.config._id) + home_page.text = ("This is the personal project of %s." + " This project is created automatically during user registration" + " as an easy place to store personal data that doesn't need its own" + " project such as cloned repositories.") % user.display_name return user def private_project(self):
If this avoids writing repos to disk, then we may be one step closer to being able to run tests in parallel.
The existing diff was just for testing purposes, and is not appropriate for actual usage.
Changes probably should be made in bootstrap.py where it already distinguishes between running under test, and for real. Passing
make_project=False
toM.User.register
may be very useful.forge:tv/3642
paster setup-app production.ini
. Confirm /u neighborhood has user projects for the default users.