From e3fc7a766624d2e53642cab8e64e6cb9a85b3ce5 Mon Sep 17 00:00:00 2001 From: Mike Cifelli <1836280-mike-cifelli@users.noreply.gitlab.com> Date: Tue, 7 Feb 2023 08:53:04 -0500 Subject: [PATCH] Refactor code --- install-on-device-fs | 10 +++++----- main.py | 12 ++++++------ {networking => net}/__init__.py | 0 {networking => net}/adafruit_io.py | 0 {networking => net}/config.sample.py | 0 {networking => net}/http.py | 0 {networking => net}/logging.py | 0 {networking => net}/ntp.py | 0 {networking => net}/server.py | 0 {networking => net}/templates.py | 0 {networking => net}/util.py | 0 {networking => net}/wifi.py | 0 12 files changed, 11 insertions(+), 11 deletions(-) rename {networking => net}/__init__.py (100%) rename {networking => net}/adafruit_io.py (100%) rename {networking => net}/config.sample.py (100%) rename {networking => net}/http.py (100%) rename {networking => net}/logging.py (100%) rename {networking => net}/ntp.py (100%) rename {networking => net}/server.py (100%) rename {networking => net}/templates.py (100%) rename {networking => net}/util.py (100%) rename {networking => net}/wifi.py (100%) diff --git a/install-on-device-fs b/install-on-device-fs index dcc16f4..ae10eb9 100755 --- a/install-on-device-fs +++ b/install-on-device-fs @@ -45,11 +45,11 @@ function copy { } -create_directory networking +create_directory net create_directory sensors create_directory www -copy "main.py" : -copy "networking/*.py" :networking/ -copy "sensors/*.py" :sensors/ -copy "www/*" :www/ +copy "main.py" : +copy "net/*.py" :net/ +copy "sensors/*.py" :sensors/ +copy "www/*" :www/ diff --git a/main.py b/main.py index 4421002..a9afdd2 100644 --- a/main.py +++ b/main.py @@ -2,12 +2,12 @@ import json import time from machine import Pin -from networking import AdafruitIO -from networking import logging -from networking import ntp -from networking import Server -from networking import templates -from networking import util +from net import AdafruitIO +from net import logging +from net import ntp +from net import Server +from net import templates +from net import util class LedServer(Server): diff --git a/networking/__init__.py b/net/__init__.py similarity index 100% rename from networking/__init__.py rename to net/__init__.py diff --git a/networking/adafruit_io.py b/net/adafruit_io.py similarity index 100% rename from networking/adafruit_io.py rename to net/adafruit_io.py diff --git a/networking/config.sample.py b/net/config.sample.py similarity index 100% rename from networking/config.sample.py rename to net/config.sample.py diff --git a/networking/http.py b/net/http.py similarity index 100% rename from networking/http.py rename to net/http.py diff --git a/networking/logging.py b/net/logging.py similarity index 100% rename from networking/logging.py rename to net/logging.py diff --git a/networking/ntp.py b/net/ntp.py similarity index 100% rename from networking/ntp.py rename to net/ntp.py diff --git a/networking/server.py b/net/server.py similarity index 100% rename from networking/server.py rename to net/server.py diff --git a/networking/templates.py b/net/templates.py similarity index 100% rename from networking/templates.py rename to net/templates.py diff --git a/networking/util.py b/net/util.py similarity index 100% rename from networking/util.py rename to net/util.py diff --git a/networking/wifi.py b/net/wifi.py similarity index 100% rename from networking/wifi.py rename to net/wifi.py