diff --git a/flake.nix b/flake.nix index f2b406e..109ef27 100644 --- a/flake.nix +++ b/flake.nix @@ -86,13 +86,13 @@ # Package a virtual environment as our main application. # # Enable no optional dependencies for production build. - packages.x86_64-linux.default = pythonSet.mkVirtualEnv "hello-world-env" workspace.deps.default; + packages.x86_64-linux.default = pythonSet.mkVirtualEnv "lego-monitoring-env" workspace.deps.default; - # Make hello runnable with `nix run` + # Make service runnable with `nix run` apps.x86_64-linux = { default = { type = "app"; - program = "${self.packages.x86_64-linux.default}/bin/hello"; + program = "${self.packages.x86_64-linux.default}/bin/service"; }; }; @@ -147,7 +147,7 @@ # Apply fixups for building an editable package of your workspace packages (final: prev: { - hello-world = prev.hello-world.overrideAttrs (old: { + lego-monitoring = prev.lego-monitoring.overrideAttrs (old: { # It's a good idea to filter the sources going into an editable build # so the editable package doesn't have to be rebuilt on every change. src = lib.fileset.toSource { @@ -155,7 +155,7 @@ fileset = lib.fileset.unions [ (old.src + "/pyproject.toml") (old.src + "/README.md") - (old.src + "/src/hello_world/__init__.py") + (old.src + "/src/lego_monitoring/__init__.py") ]; }; @@ -179,7 +179,7 @@ # Build virtual environment, with local packages being editable. # # Enable all optional dependencies for development. - virtualenv = editablePythonSet.mkVirtualEnv "hello-world-dev-env" workspace.deps.all; + virtualenv = editablePythonSet.mkVirtualEnv "lego-monitoring-dev-env" workspace.deps.all; in pkgs.mkShell { diff --git a/pyproject.toml b/pyproject.toml index 95475f0..52ead61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,15 @@ [project] -name = "hello-world" +name = "lego-monitoring" version = "0.1.0" -description = "Add your description here" +description = "Monitoring software for the lego server" readme = "README.md" requires-python = ">=3.12" dependencies = [ - "urllib3>=2.2.3", + #"urllib3>=2.2.3", ] [project.scripts] -hello = "hello_world:hello" +service = "lego_monitoring:main" [build-system] requires = ["hatchling"] @@ -17,5 +17,5 @@ build-backend = "hatchling.build" [dependency-groups] dev = [ - "ruff>=0.6.7", + #"ruff>=0.6.7", ] diff --git a/src/hello_world/__init__.py b/src/lego_monitoring/__init__.py similarity index 63% rename from src/hello_world/__init__.py rename to src/lego_monitoring/__init__.py index aa5ad22..6ee5cb9 100644 --- a/src/hello_world/__init__.py +++ b/src/lego_monitoring/__init__.py @@ -1,2 +1,2 @@ -def hello() -> None: +def main() -> None: print("Hello from hello-world!")