Skip to content

Commit

Permalink
Renamed python module to cuckoo_time_translator_python
Browse files Browse the repository at this point in the history
This is now identical to its package/project name and apparently just the way it was expected to be.

Addressing second part of #49 (2.)
  • Loading branch information
HannesSommer committed Sep 28, 2018
1 parent 8ad6caa commit 292bcf0
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 18 deletions.
10 changes: 4 additions & 6 deletions cuckoo_time_translator_python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,20 @@ cs_add_library(${PROJECT_NAME}
src/module.cpp
NO_AUTO_EXPORT
)

string(REGEX REPLACE "_python$" "" LIB_OUTPUT_DIR ${CATKIN_PACKAGE_PYTHON_DESTINATION})
set_target_properties(${PROJECT_NAME} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${LIB_OUTPUT_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}
)

if (APPLE)
set_target_properties(${PROJECT_NAME} PROPERTIES
SUFFIX ".so" # This is apparently needed for Darvin. But why
SUFFIX ".so" # This is apparently needed for Darvin. But why?
)
endif ()

target_link_libraries(${PROJECT_NAME} ${PYTHON_LIBRARY} ${Boost_LIBRARIES})

install(FILES ${CATKIN_DEVEL_PREFIX}/${LIB_OUTPUT_DIR}/lib${PROJECT_NAME}.so
DESTINATION ${LIB_OUTPUT_DIR}
install(FILES ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}/lib${PROJECT_NAME}.so
DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION}
)

cs_export()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np
import cuckoo_time_translator.algorithms as algorithms

from cuckoo_time_translator.algorithms import LocalTime, RemoteTime
import cuckoo_time_translator_python.algorithms as algorithms
from cuckoo_time_translator_python.algorithms import LocalTime, RemoteTime


class TimestampOwt:
Expand Down
14 changes: 7 additions & 7 deletions cuckoo_time_translator_python/scripts/ctt_introspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import sys
import numpy as np

from cuckoo_time_translator import *
from cuckoo_time_translator.device_time_bags import *
from cuckoo_time_translator.timestamp_owts import *
from cuckoo_time_translator.batch_algo import printDelayStat
from cuckoo_time_translator_python import *
from cuckoo_time_translator_python.device_time_bags import *
from cuckoo_time_translator_python.timestamp_owts import *
from cuckoo_time_translator_python.batch_algo import printDelayStat

from cuckoo_time_translator.tools import *
from cuckoo_time_translator_python.tools import *

OwtsDefault = 'KalmanOwt(), ConvexHullOwt(switchTime = 100)'

Expand Down Expand Up @@ -96,9 +96,9 @@ def addToPlot(times, label, color):
for d, lab in zip(delaysToPlot, labels):
printDelayStat(d, lab)

from cuckoo_time_translator.plotting import plotMultiDelays, show
from cuckoo_time_translator_python.plotting import plotMultiDelays, show
plotMultiDelays(base_times, delaysToPlot, "time [sec]", labels, markersize=4, colors=colors, fileName=args.output, overwrite=args.force, show=False)

if not args.output:
from cuckoo_time_translator.plotting import show
from cuckoo_time_translator_python.plotting import show
show()
2 changes: 1 addition & 1 deletion cuckoo_time_translator_python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['cuckoo_time_translator'],
packages=['cuckoo_time_translator_python'],
package_dir={'':'python'},
scripts=['scripts/ctt_introspect.py']
)
Expand Down
2 changes: 1 addition & 1 deletion cuckoo_time_translator_python/test/Test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
from cuckoo_time_translator.algorithms import *
from cuckoo_time_translator_python.algorithms import *

import unittest

Expand Down

0 comments on commit 292bcf0

Please sign in to comment.