Skip to content

Commit

Permalink
Pacakage version bump, and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Nov 4, 2024
1 parent 76b785c commit a20317a
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 24 deletions.
5 changes: 1 addition & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ To run the API server, Studio server, and Studio Web UI with auto-reload for dev

### Running the Desktop App

Running the desktop app without building an executable:

- First, build the web UI from the `app/web_ui` directory: `npm run build`
- Then run the desktop app: `uv run python -m app.desktop.desktop`
See the [desktop README](app/desktop/README.md) instructions for running the desktop app locally.

### Building the Desktop App

Expand Down
23 changes: 13 additions & 10 deletions app/desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

## MacOS Environment Setup

Something similar probably needed on other platforms.

Basic idea: install system python including TK/TCL, and tell UV venv to use that.

Currently has to be python 3.12.
UV python doesn't include TK/TCL [yet](https://github.com/astral-sh/uv/issues/7036). Instead, we install system python including TK/TCL, and tell UV venv to use system python.

```
# Install python 3.12 and python-tk 3.12 with homebrew. Can't UV python, it doens't have TK.
# Install python 3.12 and python-tk 3.12 with homebrew
brew install [email protected]
brew install [email protected]
Expand All @@ -26,13 +22,20 @@ uv run python --version
uv run python -m app.desktop.desktop
```

## MacOS Code Signing
## Building the Desktop App

Typically building desktop apps are done in a CI/CD pipeline, but if you need to build the desktop app locally, you can do so with:

How to sign on of the builds from GitHub Actions for official release.
```bash
cd app/desktop
uv run ./build_desktop_app.sh
```

## MacOS Code Signing

Easy way, but just signs with personal ID, not developer ID: `codesign --force --deep -s - kiln.app`
Easy way, but just signs with personal ID for local development: `codesign --force --deep -s - kiln.app`

Proper way with a developer ID:
Sign with a developer ID (should only be done for official releases by Kiln team):

1. Get developer ID name: `security find-identity -v -p codesigning`
2. Run `codesign --force --deep -s "Developer ID Application: YOUR NAME (XXXXXXXX)" kiln.app`
45 changes: 40 additions & 5 deletions libs/core/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# kiln_ai

<p align="center">
<picture>
<img width="205" alt="Kiln AI Logo" src="https://github.com/user-attachments/assets/5fbcbdf7-1feb-45c9-bd73-99a46dd0a47f">
</picture>
</p>

[![PyPI - Version](https://img.shields.io/pypi/v/kiln-ai.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/kiln-ai)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kiln-ai.svg)](https://pypi.org/project/kiln-ai)
[![Docs](https://img.shields.io/badge/docs-pdoc-blue)](https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html)
Expand All @@ -12,12 +18,41 @@
pip install kiln_ai
```

## About Kiln AI
## About

This package is the Kiln AI core library. There is also a separate desktop application and server package. Learn more about Kiln AI at [getkiln.ai](https://getkiln.ai)

- Github: [github.com/Kiln-AI/kiln](https://github.com/Kiln-AI/kiln)
- Core Library Docs: [https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html](https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html)

## Quick Start

Learn more about Kiln AI at [getkiln.ai](https://getkiln.ai)
```python
from kiln_ai.datamodel import Project

This package is the Kiln AI core library. There is also a separate desktop application and server package.
print("Reading Kiln project")
project = Project.load_from_file("path/to/project.kiln")
print("Project: ", project.name, " - ", project.description)

Github: [github.com/Kiln-AI/kiln](https://github.com/Kiln-AI/kiln)
task = project.tasks()[0]
print("Task: ", task.name, " - ", task.description)
print("Total dataset size:", len(task.runs()))

Docs: [https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html](https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html)
# ... app specific code using the typed kiln datamodel

# Alternatively, load data into pandas or a similar tool:
import glob
import json
import pandas as pd
from pathlib import Path

dataitem_glob = str(task.path.parent) + "/runs/*/task_run.kiln"

dfs = []
for file in glob.glob(dataitem_glob):
js = json.loads(Path(file).read_text())
df = pd.json_normalize(js)
dfs.append(df)
final_df = pd.concat(dfs, ignore_index=True)
print(final_df)
```
2 changes: 1 addition & 1 deletion libs/core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kiln-ai"
version = "0.5.3"
version = "0.5.4"
requires-python = ">=3.10"
readme = "README.md"
description = 'Kiln AI'
Expand Down
4 changes: 2 additions & 2 deletions libs/server/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kiln-server"
version = "0.5.2"
version = "0.5.4"
requires-python = ">=3.10"
description = 'Kiln AI Server'
readme = "README.md"
Expand All @@ -20,7 +20,7 @@ classifiers = [
dependencies = [
"fastapi>=0.115.4",
"httpx>=0.27.2",
"kiln-ai>=0.5.3",
"kiln-ai>=0.5.4",
"pydantic>=2.9.2",
"python-dotenv>=1.0.1",
"uvicorn>=0.32.0",
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a20317a

Please sign in to comment.