8 Commits

Author SHA1 Message Date
Mario Fetka
502885fd23 update compat 2023-07-01 11:55:09 +02:00
Mario Fetka
6efd4c00f8 Bump 2021-10-27 08:44:51 +02:00
Mario Fetka
38ddc53c2c build for stretch and jessie 2021-10-26 16:18:10 +02:00
Mario Fetka
16495c72e8 build for stretch and jessie 2021-10-26 16:07:46 +02:00
Mario Fetka
eb632a902b build for stretch and jessie 2021-10-26 16:04:21 +02:00
Mario Fetka
70834e1808 build for stretch and jessie 2021-10-26 15:02:23 +02:00
Mario Fetka
fdfbc23d0f build for stretch and jessie 2021-10-26 14:14:08 +02:00
Mario Fetka
3684dca243 correct deeps for bullseye 2021-10-26 13:17:45 +02:00
10 changed files with 120 additions and 1 deletions

37
.travis.yml Normal file
View File

@@ -0,0 +1,37 @@
language: python
dist: xenial
python:
- "3.6"
- "3.7"
- "3.8"
# TODO add 3.9
- "3.9-dev"
install: pip install tox-travis tox tox-venv
# Used by the `test` stage.
script: tox
stages:
- test
- lint
jobs:
allow_failures:
- python: "3.9-dev"
include:
# The `test` stage using the `python` matrix defined above
# is included implicitly.
- stage: lint
name: "Code Linting"
python: "3.7"
script: TOXENV=lint tox
- stage: check-docs
name: "Docs check"
python: "3.7"
script: TOXENV=check-docs tox

3
debian/changelog vendored
View File

@@ -1,3 +1,5 @@
<<<<<<< HEAD
=======
afancontrol (3.1.0-1) unstable; urgency=medium afancontrol (3.1.0-1) unstable; urgency=medium
[ Juha Yrjölä ] [ Juha Yrjölä ]
@@ -14,6 +16,7 @@ afancontrol (3.0.0-2) unstable; urgency=medium
-- Kostya Esmukov <kostya@esmukov.ru> Mon, 02 Aug 2021 19:19:34 +0000 -- Kostya Esmukov <kostya@esmukov.ru> Mon, 02 Aug 2021 19:19:34 +0000
>>>>>>> upstream/3.1.0
afancontrol (3.0.0-1) unstable; urgency=medium afancontrol (3.0.0-1) unstable; urgency=medium
* Drop support for prometheus-client < 0.1.0 (debian stretch) * Drop support for prometheus-client < 0.1.0 (debian stretch)

14
debian/control vendored
View File

@@ -4,6 +4,7 @@ Priority: optional
Maintainer: Kostya Esmukov <kostya@esmukov.ru> Maintainer: Kostya Esmukov <kostya@esmukov.ru>
Build-Depends: debhelper-compat (= 13), Build-Depends: debhelper-compat (= 13),
dh-python, dh-python,
debhelper (>= 9.20160709) | dh-systemd,
python3-all, python3-all,
python3-click, python3-click,
python3-prometheus-client (>= 0.1.0), python3-prometheus-client (>= 0.1.0),
@@ -11,6 +12,14 @@ Build-Depends: debhelper-compat (= 13),
python3-requests, python3-requests,
python3-serial, python3-serial,
python3-setuptools python3-setuptools
<<<<<<< HEAD
Build-Depends-Indep: python3-pytest,
python3-requests,
python3-click,
python3-prometheus-client (>= 0.1.0),
python3-serial
=======
>>>>>>> upstream/3.1.0
Standards-Version: 3.9.8 Standards-Version: 3.9.8
Homepage: https://github.com/KostyaEsmukov/afancontrol Homepage: https://github.com/KostyaEsmukov/afancontrol
@@ -21,10 +30,15 @@ Depends: hddtemp,
python3-click, python3-click,
python3-pkg-resources, python3-pkg-resources,
python3-prometheus-client (>= 0.1.0), python3-prometheus-client (>= 0.1.0),
<<<<<<< HEAD
python3-serial
Suggests: freeipmi-tools,
=======
python3-serial, python3-serial,
${misc:Depends}, ${misc:Depends},
${python3:Depends} ${python3:Depends}
Suggests: freeipmi-tools Suggests: freeipmi-tools
>>>>>>> upstream/3.1.0
Description: Advanced Fan Control program (Python 3) Description: Advanced Fan Control program (Python 3)
afancontrol is an Advanced Fan Control program, which controls PWM afancontrol is an Advanced Fan Control program, which controls PWM
fans according to the current temperatures of the system components. fans according to the current temperatures of the system components.

2
debian/rules vendored
View File

@@ -9,4 +9,4 @@ export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS={dir}/tests/ export PYBUILD_TEST_ARGS={dir}/tests/
%: %:
dh $@ --with python3 --buildsystem=pybuild dh $@ --with systemd,python3 --buildsystem=pybuild

View File

@@ -26,7 +26,15 @@ per-file-ignores =
[isort] [isort]
multi_line_output = 3 multi_line_output = 3
<<<<<<< HEAD
; https://github.com/ambv/black#how-black-wraps-lines
include_trailing_comma = True
force_grid_wrap = 0
combine_as_imports = True
line_length = 88
=======
profile = black profile = black
>>>>>>> upstream/3.1.0
[metadata] [metadata]
author = Kostya Esmukov author = Kostya Esmukov
@@ -40,6 +48,13 @@ classifier =
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 :: Only
<<<<<<< HEAD
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
=======
>>>>>>> upstream/3.1.0
Topic :: System :: Hardware Topic :: System :: Hardware
Topic :: System :: Monitoring Topic :: System :: Monitoring
Topic :: System :: Systems Administration Topic :: System :: Systems Administration
@@ -67,7 +82,11 @@ install_requires =
package_dir = package_dir =
= src = src
packages = find: packages = find:
<<<<<<< HEAD
python_requires = >=3.6
=======
python_requires = >=3.7 python_requires = >=3.7
>>>>>>> upstream/3.1.0
[options.entry_points] [options.entry_points]
console_scripts = console_scripts =
@@ -79,6 +98,17 @@ arduino =
metrics = metrics =
prometheus-client>=0.1.0 prometheus-client>=0.1.0
dev = dev =
<<<<<<< HEAD
black==20.8b1
coverage==5.3
flake8==3.8.4
isort==5.5.4
mypy==0.782
pytest==6.1.0
requests
sphinx==3.2.1
wheel
=======
black==22.10.0 black==22.10.0
coverage==6.5.0 coverage==6.5.0
flake8==5.0.4 flake8==5.0.4
@@ -89,6 +119,7 @@ dev =
vcrpy==4.2.1 vcrpy==4.2.1
requests requests
types-requests types-requests
>>>>>>> upstream/3.1.0
[options.packages.find] [options.packages.find]
where = src where = src

View File

@@ -1 +1,5 @@
<<<<<<< HEAD
__version__ = "3.0.0"
=======
__version__ = "3.1.0" __version__ = "3.1.0"
>>>>>>> upstream/3.1.0

View File

@@ -1,5 +1,8 @@
import configparser import configparser
<<<<<<< HEAD
=======
import glob import glob
>>>>>>> upstream/3.1.0
from typing import Any, Generic, Iterator, Optional, Type, TypeVar, Union, overload from typing import Any, Generic, Iterator, Optional, Type, TypeVar, Union, overload
T = TypeVar("T", bound=str) T = TypeVar("T", bound=str)
@@ -128,6 +131,8 @@ class ConfigParserSection(Generic[T]):
"[%s] %r option is expected to be set" % (self.__section.name, option) "[%s] %r option is expected to be set" % (self.__section.name, option)
) )
return res return res
<<<<<<< HEAD
=======
def expand_glob(path: str): def expand_glob(path: str):
@@ -137,3 +142,4 @@ def expand_glob(path: str):
if len(matches) == 1: if len(matches) == 1:
return matches[0] return matches[0]
raise ValueError("Expected glob to expand to a single path, got %r" % (matches,)) raise ValueError("Expected glob to expand to a single path, got %r" % (matches,))
>>>>>>> upstream/3.1.0

View File

@@ -1,7 +1,11 @@
from pathlib import Path from pathlib import Path
from typing import NewType from typing import NewType
<<<<<<< HEAD
from afancontrol.configparser import ConfigParserSection
=======
from afancontrol.configparser import ConfigParserSection, expand_glob from afancontrol.configparser import ConfigParserSection, expand_glob
>>>>>>> upstream/3.1.0
from afancontrol.pwmfan.base import ( from afancontrol.pwmfan.base import (
BaseFanPWMRead, BaseFanPWMRead,
BaseFanPWMWrite, BaseFanPWMWrite,
@@ -24,6 +28,10 @@ class LinuxFanSpeed(BaseFanSpeed):
def from_configparser(cls, section: ConfigParserSection) -> BaseFanSpeed: def from_configparser(cls, section: ConfigParserSection) -> BaseFanSpeed:
return cls(FanInputDevice(section["fan_input"])) return cls(FanInputDevice(section["fan_input"]))
@classmethod
def from_configparser(cls, section: ConfigParserSection) -> BaseFanSpeed:
return cls(FanInputDevice(section["fan_input"]))
def get_speed(self) -> FanValue: def get_speed(self) -> FanValue:
return FanValue(int(self._fan_input.read_text())) return FanValue(int(self._fan_input.read_text()))
@@ -41,6 +49,10 @@ class LinuxFanPWMRead(BaseFanPWMRead):
def from_configparser(cls, section: ConfigParserSection) -> BaseFanPWMRead: def from_configparser(cls, section: ConfigParserSection) -> BaseFanPWMRead:
return cls(PWMDevice(section["pwm"])) return cls(PWMDevice(section["pwm"]))
@classmethod
def from_configparser(cls, section: ConfigParserSection) -> BaseFanPWMRead:
return cls(PWMDevice(section["pwm"]))
def get(self) -> PWMValue: def get(self) -> PWMValue:
return PWMValue(int(self._pwm.read_text())) return PWMValue(int(self._pwm.read_text()))
@@ -59,6 +71,10 @@ class LinuxFanPWMWrite(BaseFanPWMWrite):
def from_configparser(cls, section: ConfigParserSection) -> BaseFanPWMWrite: def from_configparser(cls, section: ConfigParserSection) -> BaseFanPWMWrite:
return cls(PWMDevice(section["pwm"])) return cls(PWMDevice(section["pwm"]))
@classmethod
def from_configparser(cls, section: ConfigParserSection) -> BaseFanPWMWrite:
return cls(PWMDevice(section["pwm"]))
def _set_raw(self, pwm: PWMValue) -> None: def _set_raw(self, pwm: PWMValue) -> None:
self._pwm.write_text(str(int(pwm))) self._pwm.write_text(str(int(pwm)))

View File

@@ -2,7 +2,11 @@ import re
from pathlib import Path from pathlib import Path
from typing import Optional, Tuple from typing import Optional, Tuple
<<<<<<< HEAD
from afancontrol.configparser import ConfigParserSection
=======
from afancontrol.configparser import ConfigParserSection, expand_glob from afancontrol.configparser import ConfigParserSection, expand_glob
>>>>>>> upstream/3.1.0
from afancontrol.temp.base import Temp, TempCelsius from afancontrol.temp.base import Temp, TempCelsius

View File

@@ -1,5 +1,9 @@
[tox] [tox]
<<<<<<< HEAD
envlist=py{36,37,38,39,310}{,-arduino,-metrics},lint,check-docs
=======
envlist=py{37,38,39,310,311,312}{,-arduino,-metrics},lint,check-docs envlist=py{37,38,39,310,311,312}{,-arduino,-metrics},lint,check-docs
>>>>>>> upstream/3.1.0
[testenv] [testenv]
extras = extras =