From 6b8a5f5bb8209c023c5c6cd2b8eabe6233222de4 Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 18 Nov 2024 16:22:57 +0800 Subject: [PATCH] Rename the Pytec library to PyThermostat Pytec is a misnomer, as the Thermostat is not limited to just controlling TEC modules. The library also interfaces with and controls the Thermostat itself, and not the TEC module directly. See https://git.m-labs.hk/M-Labs/thermostat/pulls/149#issuecomment-12758 --- doc/PID tuning.md | 6 +++--- flake.nix | 8 ++++---- {pytec => pythermostat}/autotune.py | 0 {pytec => pythermostat}/example.py | 0 {pytec => pythermostat}/plot.py | 0 {pytec/pytec => pythermostat/pythermostat}/__init__.py | 0 {pytec/pytec => pythermostat/pythermostat}/client.py | 0 {pytec => pythermostat}/setup.py | 2 +- {pytec => pythermostat}/test.py | 0 9 files changed, 8 insertions(+), 8 deletions(-) rename {pytec => pythermostat}/autotune.py (100%) rename {pytec => pythermostat}/example.py (100%) rename {pytec => pythermostat}/plot.py (100%) rename {pytec/pytec => pythermostat/pythermostat}/__init__.py (100%) rename {pytec/pytec => pythermostat/pythermostat}/client.py (100%) rename {pytec => pythermostat}/setup.py (91%) rename {pytec => pythermostat}/test.py (100%) diff --git a/doc/PID tuning.md b/doc/PID tuning.md index 51abc74..767704c 100644 --- a/doc/PID tuning.md +++ b/doc/PID tuning.md @@ -13,7 +13,7 @@ When tuning Thermostat PID parameters, it is helpful to view the temperature, PI To use the Python real-time plotting utility, run ```shell -python pytec/plot.py +python pythermostat/plot.py ``` ![default view](./assets/default%20view.png) @@ -44,12 +44,12 @@ Below are some general guidelines for manually tuning PID loops. Note that every ## Auto Tuning -A PID auto tuning utility is provided in the Pytec library. The auto tuning utility drives the the load to a controlled oscillation, observes the ultimate gain and oscillation period and calculates a set of PID parameters. +A PID auto tuning utility is provided in the PyThermostat library. The auto tuning utility drives the the load to a controlled oscillation, observes the ultimate gain and oscillation period and calculates a set of PID parameters. To run the auto tuning utility, run ```shell -python pytec/autotune.py +python pythermostat/autotune.py ``` After some time, the auto tuning utility will output the auto tuning results, below is a sample output diff --git a/flake.nix b/flake.nix index a3a0d48..c846d21 100644 --- a/flake.nix +++ b/flake.nix @@ -58,10 +58,10 @@ auditable = false; }; - pytec = pkgs.python3Packages.buildPythonPackage { - pname = "pytec"; + pythermostat = pkgs.python3Packages.buildPythonPackage { + pname = "pythermostat"; version = "0.0.0"; - src = "${self}/pytec"; + src = "${self}/pythermostat"; propagatedBuildInputs = with pkgs.python3Packages; [ @@ -72,7 +72,7 @@ in { packages.x86_64-linux = { - inherit thermostat pytec; + inherit thermostat pythermostat; default = thermostat; }; diff --git a/pytec/autotune.py b/pythermostat/autotune.py similarity index 100% rename from pytec/autotune.py rename to pythermostat/autotune.py diff --git a/pytec/example.py b/pythermostat/example.py similarity index 100% rename from pytec/example.py rename to pythermostat/example.py diff --git a/pytec/plot.py b/pythermostat/plot.py similarity index 100% rename from pytec/plot.py rename to pythermostat/plot.py diff --git a/pytec/pytec/__init__.py b/pythermostat/pythermostat/__init__.py similarity index 100% rename from pytec/pytec/__init__.py rename to pythermostat/pythermostat/__init__.py diff --git a/pytec/pytec/client.py b/pythermostat/pythermostat/client.py similarity index 100% rename from pytec/pytec/client.py rename to pythermostat/pythermostat/client.py diff --git a/pytec/setup.py b/pythermostat/setup.py similarity index 91% rename from pytec/setup.py rename to pythermostat/setup.py index 3a46a57..e1f7c87 100644 --- a/pytec/setup.py +++ b/pythermostat/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup( - name="pytec", + name="pythermostat", version="0.0", author="M-Labs", url="https://git.m-labs.hk/M-Labs/thermostat", diff --git a/pytec/test.py b/pythermostat/test.py similarity index 100% rename from pytec/test.py rename to pythermostat/test.py -- 2.44.2