From dacf0721e78e64fdaf1f2c2167a08611742ea294 Mon Sep 17 00:00:00 2001 From: mcgillij Date: Sat, 10 Apr 2021 19:51:18 -0300 Subject: [PATCH 1/2] update to make importing as a lib easier --- PKGBUILD | 10 +++++----- pyproject.toml | 2 +- {amdfan => src/amdfan}/__init__.py | 0 {amdfan => src/amdfan}/amdfan.py | 4 ++-- {amdfan => src/amdfan}/amdfan.service | 0 tests/test_card.py | 2 +- tests/test_cli.py | 2 +- tests/test_curve.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) rename {amdfan => src/amdfan}/__init__.py (100%) rename {amdfan => src/amdfan}/amdfan.py (99%) rename {amdfan => src/amdfan}/amdfan.service (100%) diff --git a/PKGBUILD b/PKGBUILD index bd3880f..59a13c0 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,15 +3,15 @@ pkgname=amdfan pkgdesc="Python daemon for controlling the fans on amdgpu cards" -pkgver=0.1.7 +pkgver=0.1.8 pkgrel=1 arch=('any') license=('GPL2') depends=('python' 'python-yaml' 'python-numpy' 'python-rich' 'python-click') makedepends=('python-setuptools') url="https://github.com/mcgillij/amdfan" -source=("https://github.com/mcgillij/amdfan/releases/download/0.1.7/amdfan-0.1.7.tar.gz") -md5sums=('c6c556f72fbe35a4bdb777754e8e41aa') +source=("https://github.com/mcgillij/amdfan/releases/download/0.1.8/amdfan-0.1.8.tar.gz") +md5sums=('47964c44e9a345d8944dfcb6325e99ec') build() { cd "$srcdir/$pkgname-$pkgver" @@ -22,5 +22,5 @@ package() { cd "$srcdir/$pkgname-$pkgver" python setup.py install --prefix=/usr --root="$pkgdir" mkdir -p "$pkgdir/usr/lib/systemd/system" - install -Dm644 amdfan/amdfan.service "$pkgdir/usr/lib/systemd/system/" -} + install -Dm644 src/amdfan/amdfan.service "$pkgdir/usr/lib/systemd/system/" +} diff --git a/pyproject.toml b/pyproject.toml index 52958d5..4d44d63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "amdfan" -version = "0.1.7" +version = "0.1.8" description = "Fan monitor and controller for AMD gpus in Linux" authors = ["mcgillij "] license = "GPL-2.0-only" diff --git a/amdfan/__init__.py b/src/amdfan/__init__.py similarity index 100% rename from amdfan/__init__.py rename to src/amdfan/__init__.py diff --git a/amdfan/amdfan.py b/src/amdfan/amdfan.py similarity index 99% rename from amdfan/amdfan.py rename to src/amdfan/amdfan.py index 63716f5..305a8a2 100755 --- a/amdfan/amdfan.py +++ b/src/amdfan/amdfan.py @@ -320,13 +320,13 @@ def load_config(path): "--configuration", is_flag=True, default=False, - help="Prints out the default configuration for you to use" + help="Prints out the default configuration for you to use", ) @click.option( "--service", is_flag=True, default=False, - help="Prints out the amdfan.service file to use with systemd" + help="Prints out the amdfan.service file to use with systemd", ) def cli(daemon, monitor, manual, configuration, service): if daemon: diff --git a/amdfan/amdfan.service b/src/amdfan/amdfan.service similarity index 100% rename from amdfan/amdfan.service rename to src/amdfan/amdfan.service diff --git a/tests/test_card.py b/tests/test_card.py index fb19bb9..8bf05b9 100644 --- a/tests/test_card.py +++ b/tests/test_card.py @@ -1,6 +1,6 @@ import unittest -from amdfan.amdfan import Card +from src.amdfan.amdfan import Card pwm_max = 250 diff --git a/tests/test_cli.py b/tests/test_cli.py index 1dff60b..285f942 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,7 +1,7 @@ import unittest from click.testing import CliRunner -from amdfan.amdfan import cli +from src.amdfan.amdfan import cli class TestCli(unittest.TestCase): diff --git a/tests/test_curve.py b/tests/test_curve.py index 0debeb7..c7fb171 100644 --- a/tests/test_curve.py +++ b/tests/test_curve.py @@ -1,6 +1,6 @@ import unittest -from amdfan.amdfan import Curve +from src.amdfan.amdfan import Curve class TestCurve(unittest.TestCase): From 00d0832aced294f71946c58a5b2bc45ae3f72df7 Mon Sep 17 00:00:00 2001 From: mcgillij Date: Sat, 10 Apr 2021 19:55:03 -0300 Subject: [PATCH 2/2] update tests to point to the right location --- tests/test_card.py | 2 +- tests/test_cli.py | 2 +- tests/test_curve.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_card.py b/tests/test_card.py index 8bf05b9..fb19bb9 100644 --- a/tests/test_card.py +++ b/tests/test_card.py @@ -1,6 +1,6 @@ import unittest -from src.amdfan.amdfan import Card +from amdfan.amdfan import Card pwm_max = 250 diff --git a/tests/test_cli.py b/tests/test_cli.py index 285f942..1dff60b 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,7 +1,7 @@ import unittest from click.testing import CliRunner -from src.amdfan.amdfan import cli +from amdfan.amdfan import cli class TestCli(unittest.TestCase): diff --git a/tests/test_curve.py b/tests/test_curve.py index c7fb171..0debeb7 100644 --- a/tests/test_curve.py +++ b/tests/test_curve.py @@ -1,6 +1,6 @@ import unittest -from src.amdfan.amdfan import Curve +from amdfan.amdfan import Curve class TestCurve(unittest.TestCase):