Skip to content

Commit

Permalink
feat: add poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
snorreks committed Mar 5, 2024
1 parent fd8bab9 commit ccb8092
Show file tree
Hide file tree
Showing 8 changed files with 333 additions and 36 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions game/core/engine/api/image/base.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ImageOutputModel:
var file_path: String
var error: Variant


func generate_image(_input: ImageInputModel) -> ImageOutputModel:
assert(false, "Not implemented")
var response: ImageOutputModel = await SignalManager.processed
Expand Down
2 changes: 2 additions & 0 deletions game/core/utils/common.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class_name Utils


static func get_random_int(max_value):
randomize()
return randi() % max_value
Expand Down Expand Up @@ -31,6 +32,7 @@ static func v4():

return "%s-%s-%s-%s-%s" % [low, mid, hi, clock, node]


## Use this for dynamic generated images, for images in the project use load(...)
static func get_image_texture_from_path(image_path: String) -> ImageTexture:
var image := Image.new()
Expand Down
1 change: 1 addition & 0 deletions game/interface/menus/main/settings/api_tab.gd
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ func _on_check_button_toggled(toggled_on: bool) -> void:
else:
eleven_labs_field.hide()


func _set_value(key: ConfigManager.ConfigKey, value: String) -> void:
ConfigManager.set_value(key, value.strip_edges())
4 changes: 2 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ pre-commit:
root: game
tags: formatter gdscript
glob: '**/*.gd' # Adjust the glob pattern to match Lefthook's format
run: gdformat {staged_files} && git add {staged_files} # Format and stage the changes
run: poetry run gdformat {staged_files} && git add {staged_files} # Format and stage the changes
gdscript-lint:
root: game
tags: linter gdscript
glob: '**/*.gd'
run: gdlint {staged_files} # Just run the linter on staged files
run: poetry run gdlint {staged_files} # Just run the linter on staged files

70 changes: 36 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
{
"name": "aikami",
"version": "0.0.1",
"scripts": {
"generate:image": "bun run ai/image/generate.ts",
"lint:ai": "eslint . --ext .ts",
"format:ai": "prettier --write .",
"validate:ai": "tsc --noEmit",
"validate:godot": "cd game && gdlint .",
"format:godot": "cd game && gdformat .",
"validate": "bun validate:ai && bun validate:godot",
"format": "bun format:ai && bun format:godot",
"lint": "bun lint:ai",
"host": "bun run ai/host-locally.ts",
"build:web": "cd game && godot --headless --export-release webgl",
"build:linux": "cd game && godot --headless --export-release linux",
"build:windows": "cd game && godot --headless --export-release windows",
"build:macos": "cd game && godot --headless --export-release macos",
"serve:web": "python serve.py",
"serve:linux": "build/linux/aikami.x86_64",
"reset": "rm -rf build && bun postinstall",
"postinstall": "mkdir -v -p build/linux build/windows build/macos build/webgl"
},
"devDependencies": {
"@types/bun": "^1.0.5",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"lefthook": "^1.6.1",
"prettier": "^3.2.5"
},
"dependencies": {
"@huggingface/inference": "^2.6.4",
"typescript": "^5.3.3"
}
"name": "aikami",
"version": "0.0.1",
"scripts": {
"generate:image": "bun run ai/image/generate.ts",
"lint:ai": "eslint . --ext .ts",
"format:ai": "prettier --write .",
"validate:ai": "tsc --noEmit",
"validate:godot": "cd game && poetry run gdlint .",
"format:godot": "cd game && poetry run gdformat .",
"validate": "bun validate:ai && bun validate:godot",
"format": "bun format:ai && bun format:godot",
"lint": "bun lint:ai",
"host": "bun run ai/host-locally.ts",
"build:web": "cd game && godot --headless --export-release webgl",
"build:linux": "cd game && godot --headless --export-release linux",
"build:windows": "cd game && godot --headless --export-release windows",
"build:macos": "cd game && godot --headless --export-release macos",
"serve:web": "python serve.py",
"serve:linux": "build/linux/aikami.x86_64",
"reset": "rm -rf build && bun postinstall",
"setup-build-folders": "mkdir -v -p build/linux build/windows build/macos build/webgl",
"postinstall": "bun setup-build-folders"
},
"devDependencies": {
"@types/bun": "^1.0.5",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"firebase-tools": "^13.4.0",
"lefthook": "^1.6.1",
"prettier": "^3.2.5"
},
"dependencies": {
"@huggingface/inference": "^2.6.4",
"typescript": "^5.3.3"
}
}
275 changes: 275 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[tool.poetry]
name = "aikami"
version = "0.1.0"
description = ""
authors = ["BearlySleeping <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"

[tool.poetry.group.dev.dependencies]
gdtoolkit = "4.*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit ccb8092

Please sign in to comment.