From 983a3617f05311fb9586c85d8b9973d2687fd036 Mon Sep 17 00:00:00 2001 From: Amith Koujalgi Date: Tue, 11 Mar 2025 12:15:19 +0530 Subject: [PATCH] Add dev setup instructions and update pre-commit config --- .pre-commit-config.yaml | 2 +- Makefile | 7 +++++++ README.md | 35 ++++++++++++++++++++++++++++------- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35c91c3..5de9f01 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: # for commit message formatting - repo: https://github.com/commitizen-tools/commitizen - rev: v4.1.1 + rev: v4.4.1 hooks: - id: commitizen stages: [commit-msg] diff --git a/Makefile b/Makefile index 8202309..953c764 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,10 @@ +dev: + @echo "Setting up dev environment..." + @command -v pre-commit >/dev/null 2>&1 || { echo "Error: pre-commit is not installed. Please install it first."; exit 1; } + pre-commit install + pre-commit autoupdate + pre-commit install --install-hooks + build: mvn -B clean install diff --git a/README.md b/README.md index b9e472d..a832a0c 100644 --- a/README.md +++ b/README.md @@ -191,33 +191,54 @@ dependencies { > [!TIP] > Find the full API specifications on the [website](https://ollama4j.github.io/ollama4j/). -#### Development +### Development -Build: +Make sure you have `pre-commit` installed. + +With `brew`: + +```shell +brew install pre-commit +``` + +With `pip`: + +```shell +pip install pre-commit +``` + +#### Setup dev environment + +```shell +make dev +``` + +#### Build ```shell make build ``` -Run unit tests: +#### Run unit tests ```shell make unit-tests ``` -Run integration tests: +#### Run integration tests ```shell make integration-tests ``` -#### Releases +### Releases Newer artifacts are published via GitHub Actions CI workflow when a new release is created from `main` branch. ## Examples -The `ollama4j-examples` repository contains examples for using the Ollama4j library. You can explore it [here](https://github.com/ollama4j/ollama4j-examples). +The `ollama4j-examples` repository contains examples for using the Ollama4j library. You can explore +it [here](https://github.com/ollama4j/ollama4j-examples). ## ⭐ Give us a Star! @@ -236,7 +257,7 @@ If you like or are using this project to build your own, please give us a star. | 7 | Katie Backend | An open-source AI-based question-answering platform for accessing private domain knowledge | [GitHub](https://github.com/wyona/katie-backend) | | 8 | TeleLlama3 Bot | A question-answering Telegram bot | [Repo](https://git.hiast.edu.sy/mohamadbashar.disoki/telellama3-bot) | | 9 | moqui-wechat | A moqui-wechat component | [GitHub](https://github.com/heguangyong/moqui-wechat) | -| 10 | B4X | A set of simple and powerful RAD tool for Desktop and Server development | [Website](https://www.b4x.com/android/forum/threads/ollama4j-library-pnd_ollama4j-your-local-offline-llm-like-chatgpt.165003/) | +| 10 | B4X | A set of simple and powerful RAD tool for Desktop and Server development | [Website](https://www.b4x.com/android/forum/threads/ollama4j-library-pnd_ollama4j-your-local-offline-llm-like-chatgpt.165003/) | | 11 | Research Article | Article: `Large language model based mutations in genetic improvement` - published on National Library of Medicine (National Center for Biotechnology Information) | [Website](https://pmc.ncbi.nlm.nih.gov/articles/PMC11750896/) | ## Traction