Skip to content

Commit

Permalink
Merge pull request #15 from percival-detector/repackage
Browse files Browse the repository at this point in the history
Repackaged odin and plugins to separate repos
  • Loading branch information
timcnicholls committed Nov 3, 2016
2 parents 774de95 + c88cb0d commit e52c725
Show file tree
Hide file tree
Showing 82 changed files with 27 additions and 1,600 deletions.
10 changes: 5 additions & 5 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ratings:
- "**.py"
- "**.rb"
exclude_paths:
- "server/versioneer.py"
- "server/odin/_version.py"
- "server/odin/testing/**/*"
- "server/odin/static/js/bootstrap*/**/*"
- "server/odin/static/js/jquery*.js"
- "versioneer.py"
- "odin/_version.py"
- "odin/testing/**/*"
- "odin/static/js/bootstrap*/**/*"
- "odin/static/js/jquery*.js"
File renamed without changes.
File renamed without changes.
25 changes: 13 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ addons:
repo_token: c284526db8bf58103c7a4d742630230d7e50c750b0c27596e05a66919c7f5cfb

install:
- cd server
# - cd server
- pip install -r requirements.txt
- python setup.py install
- cd ..
- cd plugins/excalibur
- python setup.py install
- cd ../..
# - cd ..
# - cd plugins/excalibur
# - python setup.py install
# - cd ../..
- pip install coveralls

script:
- cd server
- python setup.py nosetests
- cd ..
- cd plugins/excalibur
# - cd server
- python setup.py nosetests
- cd ../..
- coverage combine server/.coverage plugins/excalibur/.coverage && coverage report -m

# - cd ..
# - cd plugins/excalibur
# - python setup.py nosetests
# - cd ../..
# - coverage combine server/.coverage plugins/excalibur/.coverage && coverage report -m
- coverage report -m

after_success:
- coveralls

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@ def __init__(self, path, default_filename='index.html'):
:param path: path to serve static content from
:param default_filename: default filename serve for directory requests
"""
# If the specified path is relative, resolve it relative to the root of package path
if not os.path.isabs(path):
file_dir = os.path.dirname(os.path.abspath(__file__))
odin_root = os.path.abspath(os.path.join(file_dir, '../..'))
path = os.path.abspath(os.path.join(odin_root, path))

if not os.path.isdir(path):
logging.warning('Default handler static path does not exist: %s', path)
logging.debug('Static path for default handler is %s', path)
else:
logging.debug('Static path for default handler is %s', path)

# Create argument dictionary to initialise default handler
self.default_handler_args = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_default_route_relative_path(self):
"""Test DefaultRoute resolves relative path for static content."""
path = '.'
def_route = DefaultRoute(path)
assert_regexp_matches(def_route.default_handler_args['path'], 'server/odin')
assert_regexp_matches(def_route.default_handler_args['path'], '.')

def test_default_route_absolute_path(self):
"""Test DefaultRoute treats absolute path for static content correctly."""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions server/odin/testing/utils.py → odin/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import time
import threading
import logging
import os

from tempfile import NamedTemporaryFile

Expand Down Expand Up @@ -64,10 +65,15 @@ def start_server(cls, adapter_config=None):
cls.server_conf_file = NamedTemporaryFile(mode='w+')
parser = SafeConfigParser()

file_dir = os.path.dirname(os.path.abspath(__file__))
static_path = os.path.join(file_dir, 'static')

parser.add_section('server')
parser.set('server', 'debug_mode', '1')
parser.set('server', 'http_port', str(cls.server_port))
parser.set('server', 'http_addr', '127.0.0.1')
parser.set('server', 'static_path', static_path)

if adapter_config is not None:
adapters = ', '.join([adapter for adapter in adapter_config])
parser.set('server', 'adapters', adapters)
Expand Down
135 changes: 0 additions & 135 deletions plugins/excalibur/excalibur/adapter.py

This file was deleted.

61 changes: 0 additions & 61 deletions plugins/excalibur/excalibur/detector.py

This file was deleted.

70 changes: 0 additions & 70 deletions plugins/excalibur/excalibur/fem.py

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/excalibur/excalibur/testing/ecalibur_test.cfg

This file was deleted.

Loading

0 comments on commit e52c725

Please sign in to comment.