diff --git a/Makefile b/Makefile index a9f4c893..073b5888 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +PATH_TO_PLANTUML := ~/bin + + run: ## Run the service locally python src/lightspeed-stack.py @@ -14,4 +17,13 @@ format: ## Format the code into unified format requirements.txt: pyproject.toml pdm.lock ## Generate requirements.txt file containing hashes for all non-devel packages pdm export --prod --format requirements --output requirements.txt --no-extras --without evaluation +docs/config.puml: ## Generate PlantUML class diagram for configuration + pyreverse src/models/config.py --output puml --output-directory=docs/ + mv docs/classes.puml docs/config.puml + +docs/config.png: docs/config.puml ## Generate an image with configuration graph + pushd docs && \ + java -jar ${PATH_TO_PLANTUML}/plantuml.jar --theme rose config.puml && \ + mv classes.png config.png && \ + popd diff --git a/docs/config.png b/docs/config.png new file mode 100644 index 00000000..f75ced7b Binary files /dev/null and b/docs/config.png differ diff --git a/docs/config.puml b/docs/config.puml new file mode 100644 index 00000000..d500685f --- /dev/null +++ b/docs/config.puml @@ -0,0 +1,14 @@ +@startuml classes +set namespaceSeparator none +class "Configuration" as src.models.config.Configuration { + llama_stack + name : str +} +class "LLamaStackConfiguration" as src.models.config.LLamaStackConfiguration { + api_key : Optional[str] + url : Optional[str] + use_as_library_client : Optional[bool] + check_llama_stack_model() -> Self +} +src.models.config.LLamaStackConfiguration --* src.models.config.Configuration : llama_stack +@enduml