From fab71939ad6723f9fc28dffb74a6351c5d418cc7 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Tue, 5 Dec 2023 21:06:29 +0100 Subject: [PATCH] rename --- .ruff.toml | 2 +- init-server.py | 10 +++++----- setup.py | 4 ++-- {lib => ssh_lib}/__init__.py | 0 {lib => ssh_lib}/config.py | 0 {lib => ssh_lib}/dns.py | 2 +- {lib => ssh_lib}/kernel.py | 4 ++-- {lib => ssh_lib}/nginx.py | 4 ++-- {lib => ssh_lib}/pkg_base.py | 4 ++-- {lib => ssh_lib}/planetiler.py | 4 ++-- {lib => ssh_lib}/utils.py | 0 11 files changed, 17 insertions(+), 17 deletions(-) rename {lib => ssh_lib}/__init__.py (100%) rename {lib => ssh_lib}/config.py (100%) rename {lib => ssh_lib}/dns.py (92%) rename {lib => ssh_lib}/kernel.py (80%) rename {lib => ssh_lib}/nginx.py (96%) rename {lib => ssh_lib}/pkg_base.py (90%) rename {lib => ssh_lib}/planetiler.py (86%) rename {lib => ssh_lib}/utils.py (100%) diff --git a/.ruff.toml b/.ruff.toml index 325dbdd..66fb03c 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -37,7 +37,7 @@ ignore = [ quote-style = "single" [isort] -known-first-party = ["lib"] +known-first-party = ["ssh_lib"] lines-after-imports = 2 [flake8-comprehensions] diff --git a/init-server.py b/init-server.py index e1f4aed..9d32c78 100755 --- a/init-server.py +++ b/init-server.py @@ -4,11 +4,11 @@ import sys from dotenv import dotenv_values from fabric import Config, Connection -from lib.kernel import set_cpu_governor, setup_kernel_settings -from lib.nginx import certbot, nginx -from lib.pkg_base import pkg_base, pkg_clean, pkg_upgrade -from lib.planetiler import install_planetiler -from lib.utils import reboot, setup_time +from ssh_lib.kernel import set_cpu_governor, setup_kernel_settings +from ssh_lib.nginx import certbot, nginx +from ssh_lib.pkg_base import pkg_base, pkg_clean, pkg_upgrade +from ssh_lib.planetiler import install_planetiler +from ssh_lib.utils import reboot, setup_time def prepare_server(c): diff --git a/setup.py b/setup.py index 88fc4cb..a5d0da4 100644 --- a/setup.py +++ b/setup.py @@ -8,8 +8,8 @@ requirements = [ ] setup( + name='openfreemaps', python_requires='>=3.10', install_requires=requirements, - name='lib', - packages=['lib'], + packages=['ssh_lib'], ) diff --git a/lib/__init__.py b/ssh_lib/__init__.py similarity index 100% rename from lib/__init__.py rename to ssh_lib/__init__.py diff --git a/lib/config.py b/ssh_lib/config.py similarity index 100% rename from lib/config.py rename to ssh_lib/config.py diff --git a/lib/dns.py b/ssh_lib/dns.py similarity index 92% rename from lib/dns.py rename to ssh_lib/dns.py index a579f1c..fa55c4b 100644 --- a/lib/dns.py +++ b/ssh_lib/dns.py @@ -1,6 +1,6 @@ import time -from lib.utils import apt_get_purge, exists, put_str +from ssh_lib.utils import apt_get_purge, exists, put_str def setup_dns(c): diff --git a/lib/kernel.py b/ssh_lib/kernel.py similarity index 80% rename from lib/kernel.py rename to ssh_lib/kernel.py index 79ed393..6d592fe 100644 --- a/lib/kernel.py +++ b/ssh_lib/kernel.py @@ -1,5 +1,5 @@ -from lib.config import templates -from lib.utils import apt_get_install, apt_get_purge, put, put_str +from ssh_lib.config import templates +from ssh_lib.utils import apt_get_install, apt_get_purge, put, put_str def setup_kernel_settings(c): diff --git a/lib/nginx.py b/ssh_lib/nginx.py similarity index 96% rename from lib/nginx.py rename to ssh_lib/nginx.py index 13952b0..f7d06f5 100644 --- a/lib/nginx.py +++ b/ssh_lib/nginx.py @@ -1,5 +1,5 @@ -from lib.config import templates -from lib.utils import ( +from ssh_lib.config import templates +from ssh_lib.utils import ( apt_get_install, apt_get_purge, apt_get_update, diff --git a/lib/pkg_base.py b/ssh_lib/pkg_base.py similarity index 90% rename from lib/pkg_base.py rename to ssh_lib/pkg_base.py index b907a22..abb88eb 100644 --- a/lib/pkg_base.py +++ b/ssh_lib/pkg_base.py @@ -1,4 +1,4 @@ -from lib.utils import ( +from ssh_lib.utils import ( apt_get_autoremove, apt_get_install, apt_get_purge, @@ -35,4 +35,4 @@ def pkg_clean(c): def pkg_base(c): - apt_get_install(c, 'nload iftop') + apt_get_install(c, 'python3 nload iftop') diff --git a/lib/planetiler.py b/ssh_lib/planetiler.py similarity index 86% rename from lib/planetiler.py rename to ssh_lib/planetiler.py index f1971e8..98d5e14 100644 --- a/lib/planetiler.py +++ b/ssh_lib/planetiler.py @@ -1,5 +1,5 @@ -from lib.config import templates -from lib.utils import apt_get_install, apt_get_update, put +from ssh_lib.config import templates +from ssh_lib.utils import apt_get_install, apt_get_update, put PLANETILER_VERSION = '0.7.0' diff --git a/lib/utils.py b/ssh_lib/utils.py similarity index 100% rename from lib/utils.py rename to ssh_lib/utils.py