Permalink
Browse files

add monolith namespace package

  • Loading branch information...
1 parent 523e551 commit 2de6282c50985f0c89c047089ab38d7590f0ade6 @hannosch hannosch committed Feb 27, 2013
Showing with 68 additions and 14,798 deletions.
  1. +2 −0 .gitignore
  2. +3 −3 MANIFEST.in
  3. +2 −2 Makefile
  4. +8 −3 README.rst
  5. +1 −1 jenkins.sh
  6. +1 −1 monolith.ini
  7. +1 −43 monolith/__init__.py
  8. +0 −1,764 monolith/media/lib/angular-mocks.js
  9. +0 −160 monolith/media/lib/angular.min.js
  10. +0 −454 monolith/media/lib/bootstrap-datepicker.js
  11. +0 −2,046 monolith/media/lib/bootstrap.js
  12. +0 −9,133 monolith/media/lib/jquery-ui.js
  13. +0 −836 monolith/media/lib/jquery.class.js
  14. +0 −4 monolith/media/lib/jquery.min.js
  15. +0 −342 monolith/media/lib/monolith.js
  16. +43 −0 monolith/web/__init__.py
  17. 0 monolith/{ → web}/media/app.js
  18. 0 monolith/{ → web}/media/bootstrap-responsive.css
  19. 0 monolith/{ → web}/media/bootstrap.css
  20. 0 monolith/{ → web}/media/datepicker.css
  21. BIN monolith/{ → web}/media/images/animated-overlay.gif
  22. BIN monolith/{ → web}/media/images/ui-bg_flat_0_aaaaaa_40x100.png
  23. BIN monolith/{ → web}/media/images/ui-bg_flat_75_ffffff_40x100.png
  24. BIN monolith/{ → web}/media/images/ui-bg_glass_55_fbf9ee_1x400.png
  25. BIN monolith/{ → web}/media/images/ui-bg_glass_65_ffffff_1x400.png
  26. BIN monolith/{ → web}/media/images/ui-bg_glass_75_dadada_1x400.png
  27. BIN monolith/{ → web}/media/images/ui-bg_glass_75_e6e6e6_1x400.png
  28. BIN monolith/{ → web}/media/images/ui-bg_glass_95_fef1ec_1x400.png
  29. BIN monolith/{ → web}/media/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  30. BIN monolith/{ → web}/media/images/ui-icons_222222_256x240.png
  31. BIN monolith/{ → web}/media/images/ui-icons_2e83ff_256x240.png
  32. BIN monolith/{ → web}/media/images/ui-icons_454545_256x240.png
  33. BIN monolith/{ → web}/media/images/ui-icons_888888_256x240.png
  34. BIN monolith/{ → web}/media/images/ui-icons_cd0a0a_256x240.png
  35. 0 monolith/{ → web}/media/index.html
  36. 0 monolith/{ → web}/media/jquery-ui.css
  37. 0 monolith/{ → web}/media/monolith.css
  38. 0 monolith/{ → web}/tests/__init__.py
  39. +1 −1 monolith/{ → web}/tests/monolith.ini
  40. 0 monolith/{ → web}/tests/test_monolith.js
  41. +1 −1 monolith/{ → web}/tests/tests_views.py
  42. 0 monolith/{ → web}/views.py
  43. +5 −4 setup.py
View
@@ -1,6 +1,8 @@
*.py[co]
*.sw[po]
.coverage
+coverage.xml
+nosetests.xml
pip-log.txt
bin
build.py
View
@@ -1,3 +1,3 @@
-recursive-include monolith/media *.js
-recursive-include monolith/media *.htm
-
+recursive-include monolith *.py
+recursive-include monolith/web/media *.js
+recursive-include monolith/web/media *.htm
View
@@ -18,7 +18,7 @@ $(PYTHON):
build: $(PYTHON) elasticsearch
$(PYTHON) setup.py develop
- $(INSTALL) monolith[test]
+ $(INSTALL) monolith.web[test]
clean:
rm -rf $(BUILD_DIRS)
@@ -29,7 +29,7 @@ test: build
testjs: build
rm -rf elasticsearch/data/monotest/
elasticsearch/bin/elasticsearch -p es.pid
- bin/pserve --pid-file monolith.pid --daemon monolith/tests/monolith.ini
+ bin/pserve --pid-file monolith.pid --daemon monolith/web/tests/monolith.ini
sleep 5
$(BIN)/python tools/create_es.py 9998
-testacular start --single-run
View
@@ -1,4 +1,9 @@
-Monolith
-=========
+Monolith Web
+============
-Monolith provides a set of APIs to build time series charts.
+Mozilla Monolith is an application to provide statistics and charts for
+analytics like time series data.
+
+This library implements the REST-ful web service interface.
+
+You can read more about it at https://mozilla-monolith.readthedocs.org/
View
@@ -11,6 +11,6 @@ make build
echo "Starting tests..."
bin/nosetests -s -d -v --with-xunit --with-coverage --cover-package monolith monolith
-bin/coverage xml $(find monolith -name '*.py')
+bin/coverage xml $(find monolith/web -name '*.py')
echo "FIN"
View
@@ -1,5 +1,5 @@
[app:main]
-use = egg:monolith
+use = egg:monolith.web
elasticsearch.hosts = localhost:9200
cors.origins = *
View
@@ -1,43 +1 @@
-"""Main entry point
-"""
-import datetime
-
-from pyramid.config import Configurator
-from pyramid.events import NewRequest
-from pyramid.renderers import JSON
-
-from pyelasticsearch import ElasticSearch
-
-
-def attach_elasticsearch(event):
- request = event.request
- event.request.es = request.registry.es
-
-
-def main(global_config, **settings):
- config = Configurator(settings=settings)
- config.include("cornice")
- config.scan("monolith.views")
- config.add_static_view(name='media', path='monolith:media')
- json_renderer = JSON()
-
- def datetime_adapter(obj, request):
- return obj.isoformat()
-
- def date_adapter(obj, request):
- return '%sT00:00:00' % obj.isoformat()
-
- json_renderer.add_adapter(datetime.datetime, datetime_adapter)
- json_renderer.add_adapter(datetime.date, date_adapter)
- config.add_renderer('json', json_renderer)
- settings = config.registry.settings
-
- host = settings.get('elasticsearch.host', 'http://localhost:9200')
-
- # XXX we need a way to lazy-inject this to the cornice views
- cors_origins = settings.get('cors.origins', '*')
- cors_origins = cors_origins.split(',')
-
- config.registry.es = ElasticSearch(host)
- config.add_subscriber(attach_elasticsearch, NewRequest)
- return config.make_wsgi_app()
+__import__('pkg_resources').declare_namespace(__name__)
Oops, something went wrong.

0 comments on commit 2de6282

Please sign in to comment.