From c2b842c475463e491639a15208e46103ec8e4260 Mon Sep 17 00:00:00 2001 From: lordlogo2002 Date: Sat, 4 Apr 2026 12:02:15 +0200 Subject: [PATCH] renamed to chipnut --- MANIFEST.in | 2 +- {nut => chipnut}/__init__.py | 0 {nut => chipnut}/__main__.py | 12 ++++++------ {nut => chipnut}/cli.py | 2 +- {nut => chipnut}/commands/__init__.py | 0 {nut => chipnut}/commands/compiler.py | 8 ++++---- {nut => chipnut}/commands/setup.py | 4 ++-- {nut => chipnut}/config.py | 0 {nut => chipnut}/logger.py | 0 {nut => chipnut}/paths.py | 0 {nut => chipnut}/templates/builtins/__init__.py | 0 {nut => chipnut}/templates/builtins/base.py | 0 {nut => chipnut}/templates/project/Nutfile | 0 {nut => chipnut}/templates/project/src/main.nut | 0 {nut => chipnut}/utils.py | 0 setup.py | 6 +++--- 16 files changed, 17 insertions(+), 17 deletions(-) rename {nut => chipnut}/__init__.py (100%) rename {nut => chipnut}/__main__.py (82%) rename {nut => chipnut}/cli.py (99%) rename {nut => chipnut}/commands/__init__.py (100%) rename {nut => chipnut}/commands/compiler.py (97%) rename {nut => chipnut}/commands/setup.py (93%) rename {nut => chipnut}/config.py (100%) rename {nut => chipnut}/logger.py (100%) rename {nut => chipnut}/paths.py (100%) rename {nut => chipnut}/templates/builtins/__init__.py (100%) rename {nut => chipnut}/templates/builtins/base.py (100%) rename {nut => chipnut}/templates/project/Nutfile (100%) rename {nut => chipnut}/templates/project/src/main.nut (100%) rename {nut => chipnut}/utils.py (100%) diff --git a/MANIFEST.in b/MANIFEST.in index ce9ffce..cd28da4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ include setup.py include README.md -recursive-include nut/templates * +recursive-include chipnut/templates * global-exclude __pycache__/ global-exclude *.py[cod] diff --git a/nut/__init__.py b/chipnut/__init__.py similarity index 100% rename from nut/__init__.py rename to chipnut/__init__.py diff --git a/nut/__main__.py b/chipnut/__main__.py similarity index 82% rename from nut/__main__.py rename to chipnut/__main__.py index 6b4a329..05e9774 100644 --- a/nut/__main__.py +++ b/chipnut/__main__.py @@ -2,12 +2,12 @@ from .cli import CLI from .config import ConfigError, load_config -from .commands.setup import is_nut_workspace, find_template_conflicts, copy_template_files +from .commands.setup import is_chipnut_workspace, find_template_conflicts, copy_template_files from .commands.compiler import compile as compile_project def help_text(): return [ - "%bold%%cyan%nut CLI: tiny shell, big squirrel energy :3%reset%", + "%bold%%cyan%chipnut CLI: tiny shell, big squirrel energy :3%reset%", ] def main() -> int: @@ -15,9 +15,9 @@ def main() -> int: cli.command( "init", - help="Create an empty nut workspace or reinitialize with --force", + help="Create an empty chipnut workspace or reinitialize with --force", description=( - "Initialize a nut development workspace by creating a Nutfile and default project files. " + "Initialize a chipnut development workspace by creating a Nutfile and default project files. " "If a Nutfile already exists, initialization should fail unless --force is used." ), ).flag( @@ -61,8 +61,8 @@ def cmd_build(args, flags) -> int: build_folder_override = flags["build_folder"] file_name_override = flags["name"] - if config_path == "Nutfile" and not is_nut_workspace(): - print("Error: No Nutfile found. Please run 'nut init' to create a workspace.") + if config_path == "Nutfile" and not is_chipnut_workspace(): + print("Error: No Nutfile found. Please run 'chipnut init' to create a workspace.") return 1 try: diff --git a/nut/cli.py b/chipnut/cli.py similarity index 99% rename from nut/cli.py rename to chipnut/cli.py index 8d172ef..6350a18 100644 --- a/nut/cli.py +++ b/chipnut/cli.py @@ -117,7 +117,7 @@ class _CommandSpec: class CLI: def __init__( self, - prog: str = "nut", + prog: str = "chipnut", help_callback: Optional[Callable[[], Iterable[str]]] = None, ): self.prog = prog diff --git a/nut/commands/__init__.py b/chipnut/commands/__init__.py similarity index 100% rename from nut/commands/__init__.py rename to chipnut/commands/__init__.py diff --git a/nut/commands/compiler.py b/chipnut/commands/compiler.py similarity index 97% rename from nut/commands/compiler.py rename to chipnut/commands/compiler.py index 414c922..46cdcfd 100644 --- a/nut/commands/compiler.py +++ b/chipnut/commands/compiler.py @@ -4,10 +4,10 @@ from typing import Optional import shutil -from nut.config import Config -from nut.paths import get_templates_path -from nut.utils import zip_dir -from nut.logger import logger +from ..config import Config +from ..paths import get_templates_path +from ..utils import zip_dir +from ..logger import logger @dataclass(frozen=True) class CompileContext: diff --git a/nut/commands/setup.py b/chipnut/commands/setup.py similarity index 93% rename from nut/commands/setup.py rename to chipnut/commands/setup.py index de9ff94..467a0cd 100644 --- a/nut/commands/setup.py +++ b/chipnut/commands/setup.py @@ -1,4 +1,4 @@ -from nut.paths import get_templates_path +from ..paths import get_templates_path import shutil import os @@ -43,5 +43,5 @@ def copy_template_files(dest_dir: str, force: bool = False, checked: bool = Fals dirs_exist_ok=True ) -def is_nut_workspace(path: str = ".") -> bool: +def is_chipnut_workspace(path: str = ".") -> bool: return os.path.isfile(os.path.join(path, "Nutfile")) diff --git a/nut/config.py b/chipnut/config.py similarity index 100% rename from nut/config.py rename to chipnut/config.py diff --git a/nut/logger.py b/chipnut/logger.py similarity index 100% rename from nut/logger.py rename to chipnut/logger.py diff --git a/nut/paths.py b/chipnut/paths.py similarity index 100% rename from nut/paths.py rename to chipnut/paths.py diff --git a/nut/templates/builtins/__init__.py b/chipnut/templates/builtins/__init__.py similarity index 100% rename from nut/templates/builtins/__init__.py rename to chipnut/templates/builtins/__init__.py diff --git a/nut/templates/builtins/base.py b/chipnut/templates/builtins/base.py similarity index 100% rename from nut/templates/builtins/base.py rename to chipnut/templates/builtins/base.py diff --git a/nut/templates/project/Nutfile b/chipnut/templates/project/Nutfile similarity index 100% rename from nut/templates/project/Nutfile rename to chipnut/templates/project/Nutfile diff --git a/nut/templates/project/src/main.nut b/chipnut/templates/project/src/main.nut similarity index 100% rename from nut/templates/project/src/main.nut rename to chipnut/templates/project/src/main.nut diff --git a/nut/utils.py b/chipnut/utils.py similarity index 100% rename from nut/utils.py rename to chipnut/utils.py diff --git a/setup.py b/setup.py index 5be41dc..ef4075b 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,12 @@ from setuptools import find_packages, setup setup( - name="nut", + name="chipnut", version="0.1.0", - description="Core package and CLI entrypoint for nut", + description="Core package and CLI entrypoint for chipnut", author="Chipperfluff", packages=find_packages(), include_package_data=True, python_requires=">=3.8", install_requires=["chipenv", "colorama", "PyYAML"], -) \ No newline at end of file +)