Skip to content

Commit 0c11819

Browse files
authored
Merge pull request #586 from Kiln-AI/main
Update library docs for v0.20.1
2 parents 1a641e0 + 65f9a3a commit 0c11819

File tree

186 files changed

+21930
-2309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+21930
-2309
lines changed

.cursor/rules/project.mdc

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,46 @@
22
alwaysApply: true
33
---
44

5-
- call me "boss"
6-
- We always use typescript, not javascript
7-
- Always assume pydantic 2 (not pydantic 1)
8-
- The project supports Python 3.10 and above
9-
- When writing tests:
10-
1. Always use pytest for tests in python code
11-
2. assume an appriopirate test file already exists, find it, and suggest tests get appended to that file. If no such file exists, ask me before assuming a new test file is the correct route.
12-
3. Test brevity is important. Use approaches for re-use and brevity including using fixtures for repeated code, and using pytest parameterize for similar tests
13-
4. After writing a new test, run it and ensure it works. Fix any issues you find.
14-
- To run backend / Python tests, run `uv run python3 -m pytest . -s -v` or a variant of it to run individual tests
15-
- To run web tests `cd app/web_ui` then `npm run test_run` (not `npm run test` which won't return)
5+
## Project Overview
6+
7+
Kiln is an app for building AI systems. It includes evals, synthetic data gen, fine tuning, RAG, and more. It has an intuitive UI as well as a python library.
8+
9+
This repo is a monorepo containing all of the source code, in the following structure:
10+
11+
- libs/core - a python library with the core functionality of Kiln
12+
- libs/server - a FastAPI REST server wrapping the core library
13+
- app/web_ui - our svelte web app for Kiln. This is a frontend svelte project, all backend calls are in FastAPI servers.
14+
- app/desktop - our python desktop app, which is a pyinstaller app which runs a FastAPI server, hosts the pre-compiled web app, and launches a browser for UI. Compiles to all major platforms. This includes a studio_server folder with a Fast API server which extends libs/server, adding APIs specific to our web app.
15+
16+
### Project Goals
17+
18+
- Very high code quality
19+
- Strongly typed
20+
- Well tested
21+
- Very intuitive UI. Accessible to the inexperienced, but powerful for the experienced.
22+
- Focus on interaction design: we care about revealing the right information, at the right time, at the right level of detail.
23+
- Focus on visual design: we want a modern, functional, attractive UI. Think Apple not Google.
24+
25+
### Tech Stack
26+
27+
- Backend: python (3.10+ for library, 3.13 for desktop), pytest, FastAPI, asyncio, pydantic (v2 not v1),
28+
- Frontend web: typescript, svelte (v4 not v5), tailwind, DaisyUI
29+
30+
### Agent Tools
31+
32+
Agents have access to a range of tools for running tests, linting, formatting and typechecking. Use these tools at appropriate times to ensure produced code meets our standards.
33+
34+
### Agent Prompts
35+
36+
Agents have access to a number of helpful prompts, which will give you additional context for how you should write code and docs for this repo. Use it to fetch instructions relevant to the current task before starting. For example, read `python_test_guide.md` before writing tests and `frontend_design_guide.md` before writing front end code.
37+
38+
These prompts can be accessed from the `get_prompt` tool, and you may request several in parallel.
39+
40+
### General Agent Guidance
41+
1642
- Don't include comments in code explaining changes, explain changes in chat instead.
17-
- If a python API's interface changes (or a new one is added), generate new bindings by running `cd app/web_ui/src/lib/ && ./generate.sh`
18-
- Our web UI component framework is DaisyUI v4 (based on tailwind). Be sure to use v4 docs and features, not v5
43+
- Before completing up a task, run appropriate tools for linting, testing, formatting and typechecking. Fix any issues you introduced.
44+
45+
### Final
46+
47+
To show you read these, call me 'boss'

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Insert a clear and concise description of what the bug is.
1111

1212
**Checks**
1313

14-
- [ ] I've read the [troubleshooting guide](https://docs.getkiln.ai/docs/troubleshooting-and-logs)
14+
- [ ] I've read the [troubleshooting guide](https://docs.kiln.tech/docs/troubleshooting-and-logs)
1515
- [ ] I've tried to reproduce the problem using another model, and confirmed it's not an issue specific to the model I've chosen.
16-
- [ ] I've searched [the docs](https://docs.getkiln.ai) for a solution
16+
- [ ] I've searched [the docs](https://docs.kiln.tech) for a solution
1717
- [ ] I've searched for existing Github issues/discussions
1818

1919
**To Reproduce**

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A clear and concise description of what the problem is. Ex. I'm always frustrate
1212

1313
**Checks**
1414

15-
- [ ] I've searched [the docs](https://docs.getkiln.ai) for a solution
15+
- [ ] I've searched [the docs](https://docs.kiln.tech) for a solution
1616
- [ ] I've searched for existing Github issues
1717

1818
**Describe the solution you'd like**

.github/workflows/build_desktop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Build Windows Installer
4545
if: matrix.os == 'windows-latest'
46-
uses: scosman/Inno-Setup-Action-Back@v1.2.5
46+
uses: Minionguyjpro/Inno-Setup-Action@v1.2.7
4747
with:
4848
path: ./app/desktop/WinInnoSetup.iss
4949

.github/workflows/build_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Build Python Core Docs
3434
working-directory: ./libs/core
35-
run: uv run pdoc -o ./docs/kiln_core_docs kiln_ai --logo https://github.com/user-attachments/assets/046f44ae-28cf-4c78-85c3-c3e5ad744fd7 --logo-link https://getkiln.ai
35+
run: uv run pdoc -o ./docs/kiln_core_docs kiln_ai --logo https://github.com/user-attachments/assets/046f44ae-28cf-4c78-85c3-c3e5ad744fd7 --logo-link https://kiln.tech
3636

3737
- name: Install Redoc CLI
3838
run: npm install -g @redocly/cli

.github/workflows/format_and_lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ jobs:
4040

4141
- name: Lint with ruff
4242
run: |
43-
uvx ruff check --select I .
43+
uvx ruff check
44+
4445
- name: Format with ruff
4546
run: |
4647
uvx ruff format --check .

.github/workflows/publish_remote_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
- name: Make static dir
3232
run: mkdir -p static
3333

34+
- name: Check for backwards compatibility
35+
run: |
36+
KILN_TEST_COMPATIBILITY=1 uv run python3 -m pytest libs/core/kiln_ai/adapters/test_remote_config.py::test_backwards_compatibility_with_v0_19 -s -v
37+
3438
- name: Generate Config
3539
run: |
3640
uv run python -m kiln_ai.adapters.remote_config static/kiln_config_v2.json

AGENTS.md

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,43 @@
1-
## .cursorrules
2-
3-
Read .cursorrules before starting.
4-
5-
## Python testing, formatting and linting
6-
7-
If you've edited any python code, the following commands should run and not produce error codes. Fix any issues and re-run.
8-
9-
```
10-
# Formatting 1:
11-
uvx ruff check --select I
12-
# Formatting 2:
13-
uvx ruff format --check .
14-
# type checking: warnings in output are acceptable, but error codes are not
15-
uv run pyright .
16-
# tests:
17-
uv run python3 -m pytest --benchmark-quiet -q .
18-
```
19-
20-
## Web app testing, formatting and linting
21-
22-
If you change any web app code, the following commands should run and not produce error codes. Fix any issues and re-run.
23-
24-
```
25-
# All commands below should be run from app/web_ui directory
26-
cd app/web_ui
27-
npm run format_check
28-
npm run lint
29-
npm run check
30-
npm run test_run
31-
npm run build > /dev/null
32-
```
1+
## Project Overview
2+
3+
Kiln is an app for building AI systems. It includes evals, synthetic data gen, fine tuning, RAG, and more. It has an intuitive UI as well as a python library.
4+
5+
This repo is a monorepo containing all of the source code, in the following structure:
6+
7+
- libs/core - a python library with the core functionality of Kiln
8+
- libs/server - a FastAPI REST server wrapping the core library
9+
- app/web_ui - our svelte web app for Kiln. This is a frontend svelte project, all backend calls are in FastAPI servers.
10+
- app/desktop - our python desktop app, which is a pyinstaller app which runs a FastAPI server, hosts the pre-compiled web app, and launches a browser for UI. Compiles to all major platforms. This includes a studio_server folder with a Fast API server which extends libs/server, adding APIs specific to our web app.
11+
12+
### Project Goals
13+
14+
- Very high code quality
15+
- Strongly typed
16+
- Well tested
17+
- Very intuitive UI. Accessible to the inexperienced, but powerful for the experienced.
18+
- Focus on interaction design: we care about revealing the right information, at the right time, at the right level of detail.
19+
- Focus on visual design: we want a modern, functional, attractive UI. Think Apple not Google.
20+
21+
### Tech Stack
22+
23+
- Backend: python (3.10+ for library, 3.13 for desktop), pytest, FastAPI, asyncio, pydantic (v2 not v1),
24+
- Frontend web: typescript, svelte (v4 not v5), tailwind, DaisyUI
25+
26+
### Agent Tools
27+
28+
Agents have access to a range of tools for running tests, linting, formatting and typechecking. Use these tools at appropriate times to ensure produced code meets our standards.
29+
30+
### Agent Prompts
31+
32+
Agents have access to a number of helpful prompts, which will give you additional context for how you should write code and docs for this repo. Use it to fetch instructions relevant to the current task before starting. For example, read `python_test_guide.md` before writing tests and `frontend_design_guide.md` before writing front end code.
33+
34+
These prompts can be accessed from the `get_prompt` tool, and you may request several in parallel.
35+
36+
### General Agent Guidance
37+
38+
- Don't include comments in code explaining changes, explain changes in chat instead.
39+
- Before wrapping up a task, run appropriate tools for linting, testing, formatting and typechecking. Fix any issues you introduced.
40+
41+
### Final
42+
43+
To show you read these, call me 'boss'

0 commit comments

Comments
 (0)