renamed package to installer while keeping poetry project as fabric

This commit is contained in:
agu3rra 2024-02-16 16:35:48 -03:00
parent 1971936a61
commit d02053a748
36 changed files with 14 additions and 9 deletions

View File

Before

Width:  |  Height:  |  Size: 42 MiB

After

Width:  |  Height:  |  Size: 42 MiB

View File

@ -45,12 +45,12 @@ client = openai.OpenAI(api_key = openai.api_key)
# Read API tokens from the apikeys.json file # Read API tokens from the apikeys.json file
api_keys = resources.read_text("fabric_installer.server.api", "fabric_api_keys.json") api_keys = resources.read_text("installer.server.api", "fabric_api_keys.json")
valid_tokens = json.loads(api_keys) valid_tokens = json.loads(api_keys)
# Read users from the users.json file # Read users from the users.json file
users = resources.read_text("fabric_installer.server.api", "users.json") users = resources.read_text("installer.server.api", "users.json")
users = json.loads(users) users = json.loads(users)

View File

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,5 +1,5 @@
[tool.poetry] [tool.poetry]
name = "fabric-installer" name = "fabric"
version = "0.2.0" version = "0.2.0"
description = "Fabric - AI framework for human augmentation" description = "Fabric - AI framework for human augmentation"
authors = [ authors = [
@ -7,6 +7,9 @@ authors = [
"Jonathan Dunn <https://github.com/xssdoctor>", "Jonathan Dunn <https://github.com/xssdoctor>",
"Scott Behrens <https://github.com/sbehrens>", "Scott Behrens <https://github.com/sbehrens>",
] ]
packages = [
{ include = "installer"}
]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.10" python = "^3.10"
@ -46,6 +49,6 @@ build-backend = "poetry.core.masonry.api"
# Creates python "binaries" # Creates python "binaries"
[tool.poetry.scripts] [tool.poetry.scripts]
fabric = 'fabric_installer:cli' fabric = 'installer:cli'
fabric-api = 'fabric_installer:run_api_server' fabric-api = 'installer:run_api_server'
fabric-webui = 'fabric_installer:run_webui_server' fabric-webui = 'installer:run_webui_server'

View File

@ -5,7 +5,7 @@
# It will create aliases (command nicknames) for the python binaries to be known # It will create aliases (command nicknames) for the python binaries to be known
# by your OS # by your OS
# List of commands to check and add alias for # List of commands to check and add or update alias for
commands=("fabric" "fabric-api" "fabric-webui") commands=("fabric" "fabric-api" "fabric-webui")
# List of shell configuration files to update # List of shell configuration files to update
@ -21,11 +21,13 @@ for config_file in "${config_files[@]}"; do
# Check if the config file contains an alias for the command # Check if the config file contains an alias for the command
if grep -q "alias $cmd=" "$config_file"; then if grep -q "alias $cmd=" "$config_file"; then
echo "Alias for $cmd already exists in $config_file." # Replace the existing alias with the new one
sed -i "/alias $cmd=/c\alias $cmd='$CMD_PATH'" "$config_file"
echo "Updated alias for $cmd in $config_file."
else else
# If not, add the alias to the config file # If not, add the alias to the config file
echo "Adding alias for $cmd to $config_file."
echo "alias $cmd='$CMD_PATH'" >> "$config_file" echo "alias $cmd='$CMD_PATH'" >> "$config_file"
echo "Added alias for $cmd to $config_file."
fi fi
done done
else else