-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Kiln-AI/packaging
Monorepo
- Loading branch information
Showing
29 changed files
with
359 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,5 @@ | |
## Installation | ||
|
||
```console | ||
pip install kiln-ai | ||
pip install kiln_ai | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# TODO_P0: remove example function | ||
def add(a, b): | ||
def add(a, b) -> int: | ||
return a + b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .project import KilnProject | ||
|
||
__all__ = ["KilnProject"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from pydantic import BaseModel | ||
from typing import Optional | ||
|
||
|
||
class KilnProject(BaseModel): | ||
version: int = 1 | ||
name: str | ||
path: Optional[str] = None | ||
|
||
def __init__(self, name: str, path: Optional[str] = None): | ||
# TODO: learn about pydantic init | ||
super().__init__(name=name, path=path) | ||
if path is not None and name is not None: | ||
# path and name are mutually exclusive for constructor, name comes from path if passed | ||
raise ValueError("path and name are mutually exclusive") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "kiln-ai" | ||
version = "0.0.4" | ||
readme = "README.md" | ||
description = 'Kiln AI' | ||
authors = [ | ||
"Steve Cosman, Chesterfield Laboratories Inc <[email protected]>", | ||
] | ||
license = "Proprietary" | ||
homepage = "https://kiln-ai.com" | ||
repository = "https://github.com/Kiln-AI/kiln" | ||
documentation = "https://github.com/Kiln-AI/kiln#readme" | ||
|
||
[tool.poetry.urls] | ||
"Bug Tracker" = "https://github.com/Kiln-AI/kiln/issues" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^7.2" | ||
|
||
[tool.pyright] | ||
strictListInference = true | ||
reportMissingTypeArgument = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# empty, but needed by setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import kiln_ai.coreadd as coreadd | ||
import kiln_ai.datamodel as datamodel | ||
|
||
|
||
def test_coreadd(): | ||
assert coreadd.add(1, 1) == 2 | ||
|
||
|
||
def test_project_init(): | ||
project = datamodel.KilnProject(name="test") | ||
assert project.name == "test" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.