ENCODE-DCC/encoded

Splitting off snovault - Stage A

hitz opened this issue · 2 comments

hitz commented

This is getting near finished. I finally got the 2 indexing testapps separated, and a working snovault.main()

https://github.com/ENCODE-DCC/encoded/tree/snovault-app

What remains to be done for this stage is to purge all references to "encoded" within src/snovault, remove persona, set up some kind of default authorization.

Stage B would be making a skeleton "fake" database (totally replacing encode), and turning it into a Pypi module.
Stage C is writing a script that bootstraps a project with an arbitrary name

Here is the remaining things to be purged

`/Users/hitz/Documents/workspace/encoded/src/snovault/init.py:
98
99 # Render an HTML page to browsers and a JSON document for API clients
100: config.include('encoded.renderers')
101 # these two should be application specific
102 config.include('.authentication')
103: config.include('encoded.root')
104
105 if 'elasticsearch.server' in config.registry.settings:
106 config.include('snovault.elasticsearch')
107 # needed for /search/?
108: config.include('encoded.search')
109
110 config.include(static_resources)

/Users/hitz/Documents/workspace/encoded/src/snovault/app.py:
29 import mimetypes
30 mimetypes.init()
31: mimetypes.init([resource_filename('encoded', 'static/mime.types')])
32 config.add_static_view('static', 'static', cache_max_age=STATIC_MAX_AGE)
33 config.add_static_view('profiles', 'schemas', cache_max_age=STATIC_MAX_AGE)

/Users/hitz/Documents/workspace/encoded/src/snovault/dev_servers.py:
64 logging.basicConfig()
65 # Loading app will have configured from config file. Reconfigure here:
66: logging.getLogger('encoded').setLevel(logging.DEBUG)
67
68 from snovault.tests import elasticsearch_fixture, postgresql_fixture

/Users/hitz/Documents/workspace/encoded/src/snovault/elasticsearch/create_mapping.py:
517
518 # Loading app will have configured from config file. Reconfigure here:
519: logging.getLogger('encoded').setLevel(logging.DEBUG)
520
521 return run(app, args.item_type, args.dry_run)

/Users/hitz/Documents/workspace/encoded/src/snovault/elasticsearch/es_index_listener.py:
77 # http://initd.org/psycopg/docs/advanced.html#asynchronous-notifications
78 cursor.execute("""LISTEN "snovault.transaction";""")
79: cursor.execute("""LISTEN "encoded.transaction";""") # BBB
80 log.debug("Listener connected")
81 listening = True
..
316 # Loading app will have configured from config file. Reconfigure here:
317 if args.verbose or args.dry_run:
318: logging.getLogger('encoded').setLevel(logging.DEBUG)
319
320 return run(testapp, args.poll_interval, args.dry_run, args.path)
..
/Users/hitz/Documents/workspace/encoded/src/snovault/tests/testappfixtures.py:
13 'tm.attempts': 3,
14 'multiauth.policies': 'persona session remoteuser accesskey',
15: 'multiauth.groupfinder': 'encoded.authorization.groupfinder',
16 'multiauth.policy.persona.use': 'snovault.authentication.NamespacedAuthenticationPolicy',
17: 'multiauth.policy.persona.base': 'encoded.persona.PersonaAuthenticationPolicy',
18 'multiauth.policy.persona.namespace': 'persona',
19 'multiauth.policy.session.use': 'snovault.authentication.NamespacedAuthenticationPolicy',
..
44 will have to make snovault dummy main app
45 '''
46: from encoded import main
47 return main({}, **app_settings)
48

/Users/hitz/Documents/workspace/encoded/src/snovault/tests/testing_views.py:
8 collection,
9 )
10: from encoded.types.base import paths_filtered_by_status
11 from snovault.attachment import ItemWithAttachment
`

hitz commented

I actually decided to jump to Stage B -- this is in the snowflakes branch (it will be a database of Snowflakes)

This will allow me to delete a huge amount of encode specific tests, and clean up snovault to the point where it can be made into a module.

hitz commented

Stage B (and C) has been moved to https://github.com/ENCODE-DCC/snovault.
It has a fake database called "Snowflakes".

I am going to close this ticket here; once B is complete we can delete the snovault directory from encoded and just import the pypi module. I actually may skip this step too and import from github.