Merge pull request 'clan-cli: clan_cli.inventory -> clan_lib.inventory' (#3730) from clan_lib_inv into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3730
This commit is contained in:
lassulus
2025-05-21 10:33:08 +00:00
10 changed files with 9 additions and 9 deletions

View File

@@ -104,7 +104,7 @@ def generate_service_facts(
service, machine.facts_data[service]["generator"]["prompt"]
)
env["prompt_value"] = prompt_value
from clan_cli import bwrap
from clan_lib import bwrap
if sys.platform == "linux" and bwrap.bubblewrap_works():
cmd = bubblewrap_cmd(generator, facts_dir, secrets_dir)

View File

@@ -3,10 +3,10 @@ import logging
import shutil
from pathlib import Path
from clan_lib import inventory
from clan_lib.api import API
from clan_lib.dirs import specific_machine_dir
from clan_cli import inventory
from clan_cli.completions import add_dynamic_completer, complete_machines
from clan_cli.machines.machines import Machine
from clan_cli.secrets.folders import sops_secrets_folder

View File

@@ -1,11 +1,11 @@
import pytest
from clan_cli.inventory import load_inventory_json
from clan_cli.secrets.folders import sops_machines_folder
from clan_cli.tests import fixtures_flakes
from clan_cli.tests.age_keys import SopsSetup, assert_secrets_file_recipients
from clan_cli.tests.helpers import cli
from clan_cli.tests.stdout import CaptureOutput
from clan_lib.flake import Flake
from clan_lib.inventory import load_inventory_json
@pytest.mark.impure

View File

@@ -218,7 +218,7 @@ def execute_generator(
prompt_file = tmpdir_prompts / prompt.name
value = get_prompt_value(prompt.name)
prompt_file.write_text(value)
from clan_cli import bwrap
from clan_lib import bwrap
final_script = generator.final_script()

View File

@@ -1,7 +1,7 @@
import sys
import pytest
from clan_cli.bwrap import bubblewrap_works
from clan_lib.bwrap import bubblewrap_works
@pytest.mark.skipif(sys.platform != "linux", reason="bubblewrap only works on linux")

View File

@@ -8,7 +8,7 @@ Instead use:
Which is an abstraction over the inventory
Interacting with 'clan_cli.inventory' is NOT recommended and will be removed
Interacting with 'clan_lib.inventory' is NOT recommended and will be removed
"""
import json

View File

@@ -1,5 +1,5 @@
# DO NOT EDIT THIS FILE MANUALLY. IT IS GENERATED.
# This file was generated by running `pkgs/clan-cli/clan_cli/inventory/update.sh`
# This file was generated by running `pkgs/clan-cli/clan_lib.inventory/update.sh`
#
# ruff: noqa: N815
# ruff: noqa: N806

View File

@@ -8,7 +8,6 @@ from typing import Any
import clan_cli.clan.create
import pytest
from clan_cli.inventory import patch_inventory_with
from clan_cli.machines.create import CreateOptions as ClanCreateOptions
from clan_cli.machines.create import create_machine
from clan_cli.machines.machines import Machine
@@ -25,6 +24,7 @@ from clan_lib.cmd import RunOpts, run
from clan_lib.dirs import specific_machine_dir
from clan_lib.errors import ClanError
from clan_lib.flake import Flake
from clan_lib.inventory import patch_inventory_with
from clan_lib.nix import nix_command
from clan_lib.nix_models.inventory import Machine as InventoryMachine
from clan_lib.nix_models.inventory import MachineDeploy

View File

@@ -393,7 +393,7 @@ def run_gen(args: argparse.Namespace) -> None:
with args.output.open("w") as f:
f.write(
"""# DO NOT EDIT THIS FILE MANUALLY. IT IS GENERATED.
# This file was generated by running `pkgs/clan-cli/clan_cli/inventory/update.sh`
# This file was generated by running `pkgs/clan-cli/clan_lib.inventory/update.sh`
#
# ruff: noqa: N815
# ruff: noqa: N806