diff --git a/local.py b/local.py deleted file mode 100644 index 2cf76eb..0000000 --- a/local.py +++ /dev/null @@ -1,30 +0,0 @@ - -from os.path import join, expanduser, abspath, exists -import shutil -import sys - - -def main(path_pkg: str, path_site: str): - if exists(path_site): - shutil.rmtree(path_site) - - shutil.copytree(path_pkg, path_site) - - -if __name__ == "__main__": - - name_pkg = sys.argv[1] - path_pkg = abspath(name_pkg) - name_env = sys.argv[2] - version_python = "3.8" - path_site = join(expanduser("~"), - ".local", - "share", - "virtualenvs", - name_env, - "lib", - "python" + version_python, - "site-packages", - name_pkg) - - main(path_pkg, path_site) diff --git a/test/__init__.py b/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_camera_not_observed.py b/test/test_camera_not_observed.py deleted file mode 100755 index e4c9bb8..0000000 --- a/test/test_camera_not_observed.py +++ /dev/null @@ -1,24 +0,0 @@ - -import time - -import pigpio -from pisat.handler import PigpioDigitalInputHandler - -from camera import FlightCamera - - -def test_flight_camera(): - - PIN = 17 - - pi = pigpio.pi() - handler = PigpioDigitalInputHandler(pi, PIN, pulldown=True) - camera = FlightCamera(handler) - - camera.start_record(blocking=False) - time.sleep(10) - camera.stop_record() - - -if __name__ == "__main__": - test_flight_camera() diff --git a/test/test_camera_observed.py b/test/test_camera_observed.py deleted file mode 100644 index b9dd6e9..0000000 --- a/test/test_camera_observed.py +++ /dev/null @@ -1,22 +0,0 @@ - -import time - -import pigpio -from pisat.handler import PigpioDigitalInputHandler - -from camera import FlightCamera - - -def main(): - - PIN = 17 - - pi = pigpio.pi() - handler = PigpioDigitalInputHandler(pi, PIN, pulldown=True) - camera = FlightCamera(handler) - - camera.start_record() - - -if __name__ == "__main__": - main() diff --git a/test/test_time_parse.py b/test/test_time_parse.py deleted file mode 100644 index 3be4a55..0000000 --- a/test/test_time_parse.py +++ /dev/null @@ -1,48 +0,0 @@ - -import sys -import time - - -SIGN_HOUR = "h" -SIGN_MIN = "m" -SIGN_SEC = "s" - - -def parse_time(time: str) -> float: - result = 0 - temp = [] - - for char in time: - if str.isnumeric(char) or char == ".": - temp.append(char) - continue - - alpha = str.lower(char) - num = float("".join(temp)) - temp.clear() - - if alpha == SIGN_HOUR: - result += num * 3600 - elif alpha == SIGN_MIN: - result += num * 60 - elif alpha == SIGN_SEC: - result += num - else: - raise ValueError( - "Invalid time format was detected. " + - "You can use charactors 's', 'm' and 'h' " + - "to represent the time format." - ) - - if len(temp): - result += float("".join(temp)) - - return result - - -if __name__ == "__main__": - init_time = time.time() - result = parse_time(sys.argv[1]) - exec_time = time.time() - init_time - - print(f"result: {result}, time: {exec_time}") \ No newline at end of file