Skip to content

Commit

Permalink
Remove some legacy code including legacy exceptions and associated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthchirp committed Dec 4, 2017
1 parent 8d4fe73 commit 1a0dd54
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 140 deletions.
9 changes: 6 additions & 3 deletions ispyb/__init__.py
Expand Up @@ -34,6 +34,9 @@ def open(configuration_file):
return conn

# add legacy imports to top level name space
import ispyb.legacy.common.driver
legacy_get_driver = ispyb.legacy.common.driver.get_driver
legacy_Backend = ispyb.legacy.common.driver.Backend
from enum import Enum
def legacy_get_driver(_):
import ispyb.legacy.driver.mysql.main
return ispyb.legacy.driver.mysql.main.ISPyBMySQLDriver
class legacy_Backend(Enum):
DATABASE_MYSQL = 1
Empty file removed ispyb/legacy/common/__init__.py
Empty file.
36 changes: 0 additions & 36 deletions ispyb/legacy/common/driver.py

This file was deleted.

6 changes: 0 additions & 6 deletions ispyb/legacy/driver/api.py

This file was deleted.

6 changes: 0 additions & 6 deletions ispyb/legacy/driver/dummy.py

This file was deleted.

4 changes: 0 additions & 4 deletions ispyb/legacy/exception.py

This file was deleted.

11 changes: 0 additions & 11 deletions ispyb/legacy/release.sh

This file was deleted.

55 changes: 0 additions & 55 deletions ispyb/legacy/setup.py

This file was deleted.

11 changes: 0 additions & 11 deletions ispyb/legacy/test/common/test_driver.py

This file was deleted.

8 changes: 0 additions & 8 deletions ispyb/legacy/test/driver/test_common.py
Expand Up @@ -2,8 +2,6 @@

import inspect

import ispyb.legacy.driver.api
import ispyb.legacy.driver.dummy
import ispyb.legacy.driver.mysql.main
import ispyb.legacy.interface.main
import pytest
Expand All @@ -24,11 +22,5 @@ def check_interface(self, implementation):
"Implementation of function %s in database driver does not " \
"match function signature in interface definition" % fn

def test_that_the_API_driver_implementation_matches_the_interface_function_signatures(self):
self.check_interface(ispyb.legacy.driver.api.ISPyBAPIDriver)

def test_that_the_database_driver_implementation_matches_the_interface_function_signatures(self):
self.check_interface(ispyb.legacy.driver.mysql.main.ISPyBMySQLDriver)

def test_that_the_dummy_driver_implementation_matches_the_interface_function_signatures(self):
self.check_interface(ispyb.legacy.driver.dummy.ISPyBDummyDriver)

0 comments on commit 1a0dd54

Please sign in to comment.