diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b3c13fe --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + - name: Build package + run: python setup.py sdist bdist_wheel + - name: List distribution files + run: ls -l dist/ + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4fc3b89 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.1] - 2024-08-23 + +### Added +- Implemented `answer_with_context` method for direct answer generation (closes #6) +- Added support for Mistral AI LLM provider +- Enhanced `retrieve_context` function to include metadata (e.g., URLs) with each context string (closes #2) + +### Changed +- Improved reranking with jina-reranker-v2 for better context retrieval +- Updated return type of `retrieve_context` to accommodate metadata + +### Fixed +- Resolved warning during context retrieval (closes #3) + +### Improved +- Enhanced overall context retrieval process +- Expanded LLM support for more versatile use cases + +## [0.1.0] - 2024-08-15 + +### Added +- Initial release of llama-github +- Basic functionality for retrieving context from GitHub repositories +- Integration with LLM for processing and generating responses + +[0.1.1]: https://github.com/JetXu-LLM/llama-github/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/JetXu-LLM/llama-github/releases/tag/v0.1.0 \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 7e54311..7bc5b7d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ -include llama_github/config/config.json \ No newline at end of file +include llama_github/config/config.json +include CHANGELOG.md \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index e9cd510..89dfce3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,7 @@ version = 0.1.1 author = Jet Xu author_email = Voldemort.xu@foxmail.com description = Llama-github is an open-source Python library that empowers LLM Chatbots, AI Agents, and Auto-dev Agents to conduct Retrieval from actively selected GitHub public projects. It Augments through LLMs and Generates context for any coding question, in order to streamline the development of sophisticated AI-driven applications. -long_description = file: README.md +long_description = file: README.md, CHANGELOG.md long_description_content_type = text/markdown url = https://github.com/JetXu-LLM/llama-github classifiers = diff --git a/setup.py b/setup.py index 2547704..a0aa3df 100755 --- a/setup.py +++ b/setup.py @@ -1,9 +1,16 @@ from setuptools import setup, find_packages +from configparser import ConfigParser # Read the requirements from requirements.txt with open("requirements.txt", "r", encoding="utf-8") as fh: requirements = fh.readlines() +# Read version from setup.cfg +config = ConfigParser() +config.read('setup.cfg') +version = config['metadata']['version'] + setup( + version=version, install_requires=[req.strip() for req in requirements], ) \ No newline at end of file