summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-03-09 14:26:07 +0000
committerCoprDistGit <infra@openeuler.org>2023-03-09 14:26:07 +0000
commita7cae38c5d5a395917ef8ab089724b6dbceb7e12 (patch)
treee5ed179e67ecd402cc1bc45b478e6044a51aaed9
parent966606ff4563f934d1aa4b9d2db47ce2b7acc2c7 (diff)
automatic import of python-nuheat
-rw-r--r--.gitignore1
-rw-r--r--python-nuheat.spec412
-rw-r--r--sources1
3 files changed, 414 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d62218d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/nuheat-1.0.1.tar.gz
diff --git a/python-nuheat.spec b/python-nuheat.spec
new file mode 100644
index 0000000..f38ae42
--- /dev/null
+++ b/python-nuheat.spec
@@ -0,0 +1,412 @@
+%global _empty_manifest_terminate_build 0
+Name: python-nuheat
+Version: 1.0.1
+Release: 1
+Summary: A Python library that allows control of connected NuHeat Signature radiant floor thermostats.
+License: MIT
+URL: https://github.com/broox/python-nuheat
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/96/1f/89b24cfec1b477f831f9eb9f1d7acd7364c6137dbffcb9d2b617aa83496c/nuheat-1.0.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-coveralls
+Requires: python3-coverage
+Requires: python3-mock
+Requires: python3-pytest
+Requires: python3-pytest-cov
+Requires: python3-responses
+
+%description
+# Python NuHeat
+
+[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![PyPI - Version](https://img.shields.io/pypi/v/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![PyPI - Downloads](https://img.shields.io/pypi/dm/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/broox/python-nuheat/Python%20package?style=flat-square)](https://github.com/broox/python-nuheat/actions?query=branch%3Amaster)
+[![Coveralls](https://img.shields.io/coveralls/github/broox/python-nuheat?style=flat-square)](https://coveralls.io/github/broox/python-nuheat?branch=master)
+[![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/broox/python-nuheat?style=flat-square)](https://snyk.io/advisor/python/nuheat)
+
+A Python 3 library that allows control of connected [NuHeat Signature](http://www.nuheat.com/products/thermostats/signature-thermostat) radiant floor thermostats.
+
+* This uses the web-based NuHeat API, so it requires an external internet connection
+* The API in use is not an officially published API, so it could change without notice
+* Please contribute!
+
+# Installation
+
+```shell
+$ pip install nuheat
+```
+
+# Usage
+
+```python
+from nuheat import NuHeat
+
+# Initalize an API session with your login credentials
+api = NuHeat("email@example.com", "your-secure-password")
+api.authenticate()
+
+# Fetch a thermostat by serial number / ID. This can be found on the NuHeat website by selecting
+# your thermostat and noting the Thermostat ID
+thermostat = api.get_thermostat("12345")
+
+# Get the current temperature of the thermostat
+thermostat.fahrenheit
+thermostat.celsius
+
+# Get the current target temperature of the thermostat
+thermostat.target_fahrenheit
+thermostat.target_celsius
+
+# Get the minimum and maximum temperatures supported by the thermostat
+thermostat.min_fahrenheit
+thermostat.max_fahrenheit
+thermostat.min_celsius
+thermostat.max_celsius
+
+# Get the current mode of the thermostat
+thermostat.schedule_mode
+
+# The possible schedule modes are one of the following 3 integers:
+# 1. Run the schedule programmed into the thermostat
+# 2. Temporarily hold a target temperature until the next scheduled event
+# 3. Permanently hold a target temperature until the mode is manually changed
+
+# Get other properties
+thermostat.heating
+thermostat.online
+thermostat.serial_number
+
+# Set a new temperature and permanently hold
+# Note: Any pre-programmed thermostat schedules will be ignored until you resume the schedule or
+# change the mode.
+thermostat.set_target_fahrenheit(72)
+
+# If you prefer celsius...
+thermostat.set_target_celsius(22)
+
+# You can also do this via the convenience property setters
+thermostat.target_fahrenheit = 72
+
+# or with celsius
+thermostat.target_celsius = 22
+
+# To resume the schedule programmed into the thermostat
+thermostat.resume_schedule()
+
+# Which is effectively the same as explicitly changing the mode like so
+thermostat.schedule_mode = 1
+
+# To set a new target temperature with an explicit schedule mode
+thermostat.set_target_fahrenheit(72, mode=2)
+
+# If you prefer celsius, you can use that too
+thermostat.set_target_celsius(22, mode=2)
+
+# Set a target temperature until a specified datetime
+# Note: A timezone aware datetime should be passed in, otherwise UTC will be assumed
+from datetime import datetime, timedelta, timezone
+hold_time = datetime.now() + timedelta(hours=4)
+thermostat.set_target_fahrenheit(69, mode=2, hold_time=hold_time)
+```
+
+# Contributing
+
+Pull requests are always welcome!
+
+## Running locally with Docker
+
+```shell
+# Build and run the docker container:
+$ docker build -t python-nuheat .
+$ docker run -it --rm -v $(pwd):/python-nuheat python-nuheat
+
+# To run the interactive shell:
+$ ipython
+
+# To run tests:
+$ pytest
+```
+
+
+%package -n python3-nuheat
+Summary: A Python library that allows control of connected NuHeat Signature radiant floor thermostats.
+Provides: python-nuheat
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-nuheat
+# Python NuHeat
+
+[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![PyPI - Version](https://img.shields.io/pypi/v/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![PyPI - Downloads](https://img.shields.io/pypi/dm/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/broox/python-nuheat/Python%20package?style=flat-square)](https://github.com/broox/python-nuheat/actions?query=branch%3Amaster)
+[![Coveralls](https://img.shields.io/coveralls/github/broox/python-nuheat?style=flat-square)](https://coveralls.io/github/broox/python-nuheat?branch=master)
+[![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/broox/python-nuheat?style=flat-square)](https://snyk.io/advisor/python/nuheat)
+
+A Python 3 library that allows control of connected [NuHeat Signature](http://www.nuheat.com/products/thermostats/signature-thermostat) radiant floor thermostats.
+
+* This uses the web-based NuHeat API, so it requires an external internet connection
+* The API in use is not an officially published API, so it could change without notice
+* Please contribute!
+
+# Installation
+
+```shell
+$ pip install nuheat
+```
+
+# Usage
+
+```python
+from nuheat import NuHeat
+
+# Initalize an API session with your login credentials
+api = NuHeat("email@example.com", "your-secure-password")
+api.authenticate()
+
+# Fetch a thermostat by serial number / ID. This can be found on the NuHeat website by selecting
+# your thermostat and noting the Thermostat ID
+thermostat = api.get_thermostat("12345")
+
+# Get the current temperature of the thermostat
+thermostat.fahrenheit
+thermostat.celsius
+
+# Get the current target temperature of the thermostat
+thermostat.target_fahrenheit
+thermostat.target_celsius
+
+# Get the minimum and maximum temperatures supported by the thermostat
+thermostat.min_fahrenheit
+thermostat.max_fahrenheit
+thermostat.min_celsius
+thermostat.max_celsius
+
+# Get the current mode of the thermostat
+thermostat.schedule_mode
+
+# The possible schedule modes are one of the following 3 integers:
+# 1. Run the schedule programmed into the thermostat
+# 2. Temporarily hold a target temperature until the next scheduled event
+# 3. Permanently hold a target temperature until the mode is manually changed
+
+# Get other properties
+thermostat.heating
+thermostat.online
+thermostat.serial_number
+
+# Set a new temperature and permanently hold
+# Note: Any pre-programmed thermostat schedules will be ignored until you resume the schedule or
+# change the mode.
+thermostat.set_target_fahrenheit(72)
+
+# If you prefer celsius...
+thermostat.set_target_celsius(22)
+
+# You can also do this via the convenience property setters
+thermostat.target_fahrenheit = 72
+
+# or with celsius
+thermostat.target_celsius = 22
+
+# To resume the schedule programmed into the thermostat
+thermostat.resume_schedule()
+
+# Which is effectively the same as explicitly changing the mode like so
+thermostat.schedule_mode = 1
+
+# To set a new target temperature with an explicit schedule mode
+thermostat.set_target_fahrenheit(72, mode=2)
+
+# If you prefer celsius, you can use that too
+thermostat.set_target_celsius(22, mode=2)
+
+# Set a target temperature until a specified datetime
+# Note: A timezone aware datetime should be passed in, otherwise UTC will be assumed
+from datetime import datetime, timedelta, timezone
+hold_time = datetime.now() + timedelta(hours=4)
+thermostat.set_target_fahrenheit(69, mode=2, hold_time=hold_time)
+```
+
+# Contributing
+
+Pull requests are always welcome!
+
+## Running locally with Docker
+
+```shell
+# Build and run the docker container:
+$ docker build -t python-nuheat .
+$ docker run -it --rm -v $(pwd):/python-nuheat python-nuheat
+
+# To run the interactive shell:
+$ ipython
+
+# To run tests:
+$ pytest
+```
+
+
+%package help
+Summary: Development documents and examples for nuheat
+Provides: python3-nuheat-doc
+%description help
+# Python NuHeat
+
+[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![PyPI - Version](https://img.shields.io/pypi/v/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![PyPI - Downloads](https://img.shields.io/pypi/dm/nuheat?style=flat-square)](https://pypi.org/project/nuheat/)
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/broox/python-nuheat/Python%20package?style=flat-square)](https://github.com/broox/python-nuheat/actions?query=branch%3Amaster)
+[![Coveralls](https://img.shields.io/coveralls/github/broox/python-nuheat?style=flat-square)](https://coveralls.io/github/broox/python-nuheat?branch=master)
+[![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/broox/python-nuheat?style=flat-square)](https://snyk.io/advisor/python/nuheat)
+
+A Python 3 library that allows control of connected [NuHeat Signature](http://www.nuheat.com/products/thermostats/signature-thermostat) radiant floor thermostats.
+
+* This uses the web-based NuHeat API, so it requires an external internet connection
+* The API in use is not an officially published API, so it could change without notice
+* Please contribute!
+
+# Installation
+
+```shell
+$ pip install nuheat
+```
+
+# Usage
+
+```python
+from nuheat import NuHeat
+
+# Initalize an API session with your login credentials
+api = NuHeat("email@example.com", "your-secure-password")
+api.authenticate()
+
+# Fetch a thermostat by serial number / ID. This can be found on the NuHeat website by selecting
+# your thermostat and noting the Thermostat ID
+thermostat = api.get_thermostat("12345")
+
+# Get the current temperature of the thermostat
+thermostat.fahrenheit
+thermostat.celsius
+
+# Get the current target temperature of the thermostat
+thermostat.target_fahrenheit
+thermostat.target_celsius
+
+# Get the minimum and maximum temperatures supported by the thermostat
+thermostat.min_fahrenheit
+thermostat.max_fahrenheit
+thermostat.min_celsius
+thermostat.max_celsius
+
+# Get the current mode of the thermostat
+thermostat.schedule_mode
+
+# The possible schedule modes are one of the following 3 integers:
+# 1. Run the schedule programmed into the thermostat
+# 2. Temporarily hold a target temperature until the next scheduled event
+# 3. Permanently hold a target temperature until the mode is manually changed
+
+# Get other properties
+thermostat.heating
+thermostat.online
+thermostat.serial_number
+
+# Set a new temperature and permanently hold
+# Note: Any pre-programmed thermostat schedules will be ignored until you resume the schedule or
+# change the mode.
+thermostat.set_target_fahrenheit(72)
+
+# If you prefer celsius...
+thermostat.set_target_celsius(22)
+
+# You can also do this via the convenience property setters
+thermostat.target_fahrenheit = 72
+
+# or with celsius
+thermostat.target_celsius = 22
+
+# To resume the schedule programmed into the thermostat
+thermostat.resume_schedule()
+
+# Which is effectively the same as explicitly changing the mode like so
+thermostat.schedule_mode = 1
+
+# To set a new target temperature with an explicit schedule mode
+thermostat.set_target_fahrenheit(72, mode=2)
+
+# If you prefer celsius, you can use that too
+thermostat.set_target_celsius(22, mode=2)
+
+# Set a target temperature until a specified datetime
+# Note: A timezone aware datetime should be passed in, otherwise UTC will be assumed
+from datetime import datetime, timedelta, timezone
+hold_time = datetime.now() + timedelta(hours=4)
+thermostat.set_target_fahrenheit(69, mode=2, hold_time=hold_time)
+```
+
+# Contributing
+
+Pull requests are always welcome!
+
+## Running locally with Docker
+
+```shell
+# Build and run the docker container:
+$ docker build -t python-nuheat .
+$ docker run -it --rm -v $(pwd):/python-nuheat python-nuheat
+
+# To run the interactive shell:
+$ ipython
+
+# To run tests:
+$ pytest
+```
+
+
+%prep
+%autosetup -n nuheat-1.0.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-nuheat -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2928d4e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+ba6237e9532feb399c9d7d99a3f67726 nuheat-1.0.1.tar.gz