Skip to content
Snippets Groups Projects
Commit a3c43a8c authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Project structure refactoring

parent 22419f04
No related branches found
No related tags found
No related merge requests found
[run]
source = CLMCservice
omit = CLMCservice/tests.py
......@@ -40,45 +40,22 @@ def get_version(fname):
return git_revision
requires = [
'plaster_pastedeploy',
'pyramid',
'pyramid_debugtoolbar',
'waitress',
'influxdb',
]
tests_require = [
'WebTest >= 1.3.1', # py3 compat
'pytest',
'pytest-cov',
]
setup(
name = "CLMCservice",
name = "clmctest",
version = get_version("clmctest/_version.py"),
author = "Michael Boniface",
author_email = "mjb@it-innovation.soton.ac.uk",
description = "FLAME CLMC Service and Test Module",
long_description="FLAME CLMC tests",
description = "FLAME CLMC Test Module",
license = "https://gitlab.it-innovation.soton.ac.uk/FLAME/flame-clmc/blob/integration/LICENSE",
keywords = "FLAME CLMC service tests",
url = 'https://gitlab.it-innovation.soton.ac.uk/FLAME/flame-clmc',
keywords = "FLAME CLMC tests",
url='https://gitlab.it-innovation.soton.ac.uk/FLAME/flame-clmc',
packages=find_packages(exclude=["services"]),
include_package_data=True,
install_requires=requires,
extras_require={
'testing': tests_require,
},
package_data={'': ['_version.py', '*.yml', '*.sh', '*.json', '*.conf']},
long_description="FLAME CLMC tests",
classifiers=[
"Development Status :: Alpha",
"Topic :: FLAME Tests",
"License :: ",
],
entry_points={
'paste.app_factory': [
'main = CLMCservice:main',
],
},
)
\ No newline at end of file
)
[run]
source = clmcservice
omit = clmcservice/tests.py
include MANIFEST.in
recursive-include clmcservice
\ No newline at end of file
from pyramid.config import Configurator
from pyramid.settings import asbool
from CLMCservice.views import AggregatorConfig
from clmcservice.views import AggregatorConfig
def main(global_config, **settings):
......
......@@ -26,7 +26,7 @@ class TestAggregatorConfig(object):
Tests the GET method for the status of the aggregator.
"""
from CLMCservice.views import AggregatorConfig # nested import so that importing the class view is part of the test itself
from clmcservice.views import AggregatorConfig # nested import so that importing the class view is part of the test itself
assert not self.config.get_settings().get('aggregator_running'), "Initially aggregator is not running."
......@@ -54,7 +54,7 @@ class TestAggregatorConfig(object):
:param output_val: the expected output value, None for expecting an Exception
"""
from CLMCservice.views import AggregatorConfig # nested import so that importing the class view is part of the test itself
from clmcservice.views import AggregatorConfig # nested import so that importing the class view is part of the test itself
assert not self.config.get_settings().get('aggregator_running'), "Initially aggregator is not running."
......
File moved
from pyramid.view import view_defaults
from pyramid.httpexceptions import HTTPBadRequest
from CLMCservice.utilities import str_to_bool
from clmcservice.utilities import str_to_bool
@view_defaults(route_name='aggregator', renderer='json')
......
......@@ -4,7 +4,7 @@
###
[app:main]
use = egg:CLMCservice
use = egg:clmcservice
pyramid.reload_templates = true
pyramid.debug_authorization = false
......@@ -32,7 +32,7 @@ listen = localhost:8080
###
[loggers]
keys = root, CLMCservice
keys = root, clmcservice
[handlers]
keys = console
......@@ -44,10 +44,10 @@ keys = generic
level = INFO
handlers = console
[logger_CLMCservice]
[logger_clmcservice]
level = DEBUG
handlers =
qualname = CLMCservice
qualname = clmcservice
[handler_console]
class = StreamHandler
......
......@@ -4,7 +4,7 @@
###
[app:main]
use = egg:CLMCservice
use = egg:clmcservice
pyramid.reload_templates = false
pyramid.debug_authorization = false
......@@ -27,7 +27,7 @@ listen = *:8080
###
[loggers]
keys = root, CLMCservice
keys = root, clmcservice
[handlers]
keys = console
......@@ -39,10 +39,10 @@ keys = generic
level = WARN
handlers = console
[logger_CLMCservice]
[logger_clmcservice]
level = WARN
handlers =
qualname = CLMCservice
qualname = clmcservice
[handler_console]
class = StreamHandler
......
[pytest]
testpaths = CLMCservice
testpaths = clmcservice
python_files = *.py
"""
// © University of Southampton IT Innovation Centre, 2018
//
// Copyright in this software belongs to University of Southampton
// IT Innovation Centre of Gamma House, Enterprise Road,
// Chilworth Science Park, Southampton, SO16 7NS, UK.
//
// This software may not be used, sold, licensed, transferred, copied
// or reproduced in whole or in part in any manner or form or in or
// on any media by any person other than in accordance with the terms
// of the Licence Agreement supplied with the software, or otherwise
// without the prior written consent of the copyright owners.
//
// This software is distributed WITHOUT ANY WARRANTY, without even the
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE, except where stated in the Licence Agreement supplied with
// the software.
//
// Created By : Michael Boniface
// Created Date : 25-03-2018
// Created for Project : FLAME
"""
import os
import os.path
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def get_version(fname):
if os.path.isfile(fname):
git_revision = read(fname)
else:
git_revision = "SNAPSHOT"
return git_revision
requires = [
'plaster_pastedeploy',
'pyramid',
'pyramid_debugtoolbar',
'waitress',
'influxdb',
]
tests_require = [
'WebTest >= 1.3.1', # py3 compat
'pytest',
'pytest-cov',
]
setup(
name = "clmcservice",
version = get_version("_version.py"),
author = "Michael Boniface",
author_email = "mjb@it-innovation.soton.ac.uk",
description = "FLAME CLMC Service Module",
long_description="FLAME CLMC Service",
license = "https://gitlab.it-innovation.soton.ac.uk/FLAME/flame-clmc/blob/integration/LICENSE",
keywords = "FLAME CLMC service",
url = 'https://gitlab.it-innovation.soton.ac.uk/FLAME/flame-clmc',
packages=find_packages(),
include_package_data=True,
install_requires=requires,
extras_require={
'testing': tests_require,
},
package_data={'': ['_version.py']},
classifiers=[
"Development Status :: Alpha",
"Topic :: FLAME CLMC Service",
"License :: ",
],
entry_points={
'paste.app_factory': [
'main = clmcservice:main',
],
},
)
\ No newline at end of file
[tox]
envlist = py36
[testenv]
deps=pytest
commands=pytest
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment