-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIC-PY] + publish script for any pypi pkg, small mods to llama ext
- Loading branch information
1 parent
ee54195
commit 70d8fe2
Showing
3 changed files
with
85 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AIConfig Model Parser for LLama cpp (Python bindings). | ||
|
||
Usage: See cookbook: | ||
|
||
https://github.com/lastmile-ai/aiconfig/blob/c64224ed48ccb7f8cbd2d3a1b2e8bd250aeb9ff2/cookbooks/llama/python/ask_llama.py#L4 |
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,43 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
|
||
[project] | ||
name = "python-aiconfig-llama" | ||
version = "0.0.1" | ||
authors = [ | ||
{ name="Jonathan Lessinger", email="[email protected]" }, | ||
] | ||
description = "LLama extension for AIConfig Library" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3", | ||
] | ||
dynamic = ["dependencies"] | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = {file = ["requirements.txt"]} | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/lastmile-ai/aiconfig" | ||
"Bug Tracker" = "https://github.com/lastmile-ai/aiconfig/issues" | ||
|
||
# Black formatting | ||
[tool.black] | ||
line-length = 99 | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
.eggs # exclude a few common directories in the | ||
| .git # root of the project | ||
| .hg | ||
| .mypy_cache | ||
| .tox | ||
| venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' |
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,37 @@ | ||
#! /bin/zsh | ||
# pypipublish.sh | ||
# Usage: Run ./scripts/pypipublish.sh path/to/project/root conda-env-name | ||
# path/to/project/root is anywhere with a pyproject.toml. | ||
|
||
# NOTE: This assumes you have the aiconfig conda environment created. | ||
# You will be prompted for a username and password. For the username, use __token__. | ||
# For the password, use the token value, including the pypi- prefix. | ||
# To get a PyPi token, go here: | ||
# Need to get a token from here (scroll down to API Tokens): https://pypi.org/manage/account/ | ||
# If you have issues, read the docs: https://packaging.python.org/en/latest/tutorials/packaging-projects/ | ||
|
||
# If you want to upload to testpypi, run pypipublish-test.sh. | ||
|
||
if [ -z "$2" ] | ||
then | ||
echo "Usage: pypipublish.sh path/to/project/root conda-env-name" | ||
exit 1 | ||
fi | ||
|
||
|
||
cd "$1" | ||
if [ ! -f "pyproject.toml" ] | ||
then | ||
echo "File pyproject.toml does not exist in the current directory" | ||
exit 1 | ||
fi | ||
|
||
rm -rf ./dist | ||
|
||
source /opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh && conda activate "$2"\ | ||
&& python3 -m pip install --upgrade build \ | ||
&& python3 -m build \ | ||
&& python3 -m pip install --upgrade twine \ | ||
&& python3 -m twine upload dist/* | ||
|
||
cd - |