From 7fb3e268d5f13533fe024d3f2b3e4f99bc00dbd7 Mon Sep 17 00:00:00 2001 From: Johnny Bouder Date: Mon, 23 Sep 2024 08:58:42 -0400 Subject: [PATCH 1/2] Update pyproject.toml with project details. Update license and readme. Add github action for publishing package. --- .github/workflows/publish-package.yaml | 26 +++++++++++++++++++++++++ LICENSE | 2 +- README.md | 21 +++++++++++++++----- pyproject.toml | 27 ++++++++++++++++++++++++++ setup.py | 7 ------- 5 files changed, 70 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/publish-package.yaml delete mode 100644 setup.py diff --git a/.github/workflows/publish-package.yaml b/.github/workflows/publish-package.yaml new file mode 100644 index 0000000..e3336f3 --- /dev/null +++ b/.github/workflows/publish-package.yaml @@ -0,0 +1,26 @@ +name: "Publish Package" + +on: + release: + types: [published] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - name: "Checkout Infrastructure" + uses: actions/checkout@main + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.10 + + - name: Install Dependencies + run: | + pip install build twine + - name: Build and Distribute + env: + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/* diff --git a/LICENSE b/LICENSE index 5fe7a89..e51f4a1 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2023-2024 MetroStar, Inc. +Copyright 2024 MetroStar, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 865e3f3..53c7c33 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,21 @@ -# Welcome to the Onyx GenAI SDK +# Onyx GenAI SDK The goal of this project is to simplify the developer experience when interacting with Onyx GenAI Services. This project provides wrappers around the the underlying APIs provided by the service. ## Table of Contents -1. [Using the SDK in Onyx](#using-the-sdk-in-onyx) -2. [Running Unit Tests](#running-unit-tests) -3. [Running Code Quality Checks](#running-code-quality-checks) +1. [Installation](#installation) +2. [Using the SDK in Onyx](#using-the-sdk-in-onyx) +3. [Running Unit Tests](#running-unit-tests) +4. [Running Code Quality Checks](#running-code-quality-checks) + +## Installation + +To install with `pip`, run: + +```bash +pip install onyxgenai +``` ## Using the SDK in Onyx @@ -16,7 +25,9 @@ The goal of this project is to simplify the developer experience when interactin 3. Create a new Jupyter Notebook -4. Add the onyxgenai client imports to your project +4. Install the client as indicated above + +5. Add the onyxgenai client imports to your project For more in depth examples, see [notebooks](https://github.com/MetroStar/onyx-genai-sdk/tree/main/notebooks) section of this repo. diff --git a/pyproject.toml b/pyproject.toml index a3f26d8..8162034 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,30 @@ +[build-system] +requires = ["setuptools>=75.1.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "onyxgenai" +version = "1.0.1" +description = "Python SDK for interacting with Onyx Generative AI Services" +readme = "README.md" +license = { file = "LICENSE" } +dependencies = [ + "requests", + "spacy", + "PyPDF2", + "python-pptx", +] +requires-python = ">=3.10" + +[project.optional-dependencies] +dev = ["pytest", "ruff"] + +[project.urls] +Homepage = "https://github.com/MetroStar/onyx-genai-sdk" + +[tool.setuptools] +py-modules = ['onyxgenai'] + [tool.ruff] select = ["B", "C4", "EXE", "F", "E", "ISC", "ICN", "INP", "PIE", "SIM", "W", "T20", "UP", "T10", "G", "C90", "ERA"] ignore = ["B008", "SIM102", "T201"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 10a1da6..0000000 --- a/setup.py +++ /dev/null @@ -1,7 +0,0 @@ -from setuptools import find_packages, setup - -setup( - name="onyxgenai", # Name - version="0.1", # Version - packages=find_packages(), # Automatically find the packages. -) From 7f4b306beab37cc3ec57cced2c333270e0fdeace Mon Sep 17 00:00:00 2001 From: Johnny Bouder Date: Mon, 23 Sep 2024 09:03:26 -0400 Subject: [PATCH 2/2] Update release. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8162034..6d546b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "onyxgenai" -version = "1.0.1" +version = "1.0.2" description = "Python SDK for interacting with Onyx Generative AI Services" readme = "README.md" license = { file = "LICENSE" }