Welcome to darca-embeddings’s documentation!
Project Overview
darca-vector-db
A pluggable vector database client system with backend support. Currently, the only supported backend is Qdrant. This project provides a unified client interface to interact with vector databases. It is designed to be easily extensible to support additional backends in the future.
GitHub Repository:
Visit the official repository at: darca-vector-db on GitHub
Installation
The project uses Poetry for dependency management and virtual environment handling.
To set up the project locally, follow these steps:
Clone the repository: .. code-block:: bash
git clone https://github.com/roelkist/darca-vector-db.git cd darca-vector-db
Install dependencies and set up the environment with a single command: .. code-block:: bash
make install
This command will handle creating the virtual environment, installing Poetry, and installing dependencies.
Make Targets for Faster Iterations
You can use specific make targets for faster development cycles:
make format : Formats the codebase using black and isort.
make test : Runs the test suite with coverage reporting.
make docs : Builds the documentation using Sphinx.
make check : Runs all checks (formatting, testing, docs) before committing.
Always run make check before committing changes to ensure consistency and quality.
Running tests: .. code-block:: bash
make test
Formatting the code: .. code-block:: bash
make format
Building the documentation: .. code-block:: bash
make docs
Features
Unified client interface for vector databases
Qdrant support
Easy to extend for additional backends
Structured logging and error handling
Flexible CI and local environment support
Automated testing and code formatting
Usage
To use the client, instantiate it with the desired backend (currently only Qdrant is supported):
from darca_vector_db import DBClient
client = DBClient(backend="qdrant", host="localhost", port=6333)
client.connect()
client.create_collection(name="my_vectors", vector_size=128, distance_metric="cosine")
client.insert_vector("my_vectors", vector_id=1, vector=[0.1] * 128, metadata={"label": "example"})
results = client.search_vectors("my_vectors", query_vector=[0.1] * 128, top_k=5)
print(results)
Contributing
Contributions are welcome! Please refer to the CONTRIBUTING.rst for detailed guidelines.
License
MIT License
Getting Started
Community & Contribution
Contributing to darca-vector-db
Thank you for considering contributing to darca-vector-db! Your contributions help make this project better.
Getting Started
To set up your local environment for development, follow these steps:
Clone the repository: .. code-block:: bash
git clone https://github.com/roelkist/darca-vector-db.git cd darca-vector-db
Create a virtual environment and install dependencies: .. code-block:: bash
make venv make poetry make install
Run the tests to ensure your setup is correct: .. code-block:: bash
make test
Creating Pull Requests (PRs)
All contributions should be made by directly creating a new branch in the main repository (no forking is needed).
Create a new branch: .. code-block:: bash
git checkout -b feature/my-awesome-feature
Make your changes, following the project’s coding standards and guidelines.
Run the complete check to ensure that your changes comply: .. code-block:: bash
make check
Commit your changes with a descriptive message: .. code-block:: bash
git commit -m “Add feature: My awesome feature”
Push your branch: .. code-block:: bash
git push origin feature/my-awesome-feature
Open a Pull Request (PR) against the main branch.
Issues and Feature Requests
To report a bug or request a new feature, please open an issue on the GitHub repository: Issues on GitHub
Before submitting, ensure that the issue or request does not already exist.
Guidelines
Make sure to run make check before committing changes.
Use separate make targets (like make test, make format) instead of running everything at once.
Include tests for new features or bug fixes.
Write clear and concise commit messages.
Keep your code consistent with existing code style.
Code of Conduct
We are committed to providing a welcoming and inclusive environment. Please be respectful and considerate in your interactions.
License
By contributing, you agree that your contributions will be licensed under the MIT License.