Add dev setup instructions and update pre-commit config

This commit is contained in:
Amith Koujalgi 2025-03-11 12:15:19 +05:30
parent b638b981c9
commit 983a3617f0
No known key found for this signature in database
GPG Key ID: 3F065E7150B71F9D
3 changed files with 36 additions and 8 deletions

View File

@ -21,7 +21,7 @@ repos:
# for commit message formatting # for commit message formatting
- repo: https://github.com/commitizen-tools/commitizen - repo: https://github.com/commitizen-tools/commitizen
rev: v4.1.1 rev: v4.4.1
hooks: hooks:
- id: commitizen - id: commitizen
stages: [commit-msg] stages: [commit-msg]

View File

@ -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: build:
mvn -B clean install mvn -B clean install

View File

@ -191,33 +191,54 @@ dependencies {
> [!TIP] > [!TIP]
> Find the full API specifications on the [website](https://ollama4j.github.io/ollama4j/). > 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 ```shell
make build make build
``` ```
Run unit tests: #### Run unit tests
```shell ```shell
make unit-tests make unit-tests
``` ```
Run integration tests: #### Run integration tests
```shell ```shell
make integration-tests make integration-tests
``` ```
#### Releases ### Releases
Newer artifacts are published via GitHub Actions CI workflow when a new release is created from `main` branch. Newer artifacts are published via GitHub Actions CI workflow when a new release is created from `main` branch.
## Examples ## 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! ## ⭐ 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) | | 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) | | 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) | | 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/) | | 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 ## Traction