Skip to content

Commit ebb7da6

Browse files
authored
Improved docs (#4)
1 parent cb7ee68 commit ebb7da6

9 files changed

Lines changed: 842 additions & 32 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish to PyPI and TestPyPI
1+
name: 📢 Publish to PyPI and TestPyPI
22

33
on:
44
push:
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build:
10-
name: Build distribution
10+
name: 📦 Build distribution
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -31,7 +31,7 @@ jobs:
3131

3232

3333
publish-to-pypi:
34-
name: Publish to PyPI
34+
name: 🚀 Publish to PyPI
3535
needs:
3636
- build
3737
runs-on: ubuntu-latest
@@ -52,7 +52,7 @@ jobs:
5252

5353

5454
github-release:
55-
name: Sign the distribution with Sigstore and upload to GitHub Release
55+
name: 📝 Sign the distribution with Sigstore and upload to GitHub Release
5656
needs:
5757
- publish-to-pypi
5858
runs-on: ubuntu-latest

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run tests
1+
name: 🧐 Run tests
22

33
on:
44
push:

.pre-commit-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ repos:
2121
args: [--py38-plus]
2222

2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.3.4
24+
rev: v0.3.5
2525
hooks:
2626
- id: ruff
2727

2828
- repo: https://github.com/psf/black
2929
rev: 24.3.0
3030
hooks:
3131
- id: black
32+
33+
- repo: https://github.com/nbQA-dev/nbQA
34+
rev: 1.8.5
35+
hooks:
36+
- id: nbqa-black
File renamed without changes.

README.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
# Dataframes Haystack
22

33
[![PyPI - Version](https://img.shields.io/pypi/v/dataframes-haystack.svg)](https://pypi.org/project/dataframes-haystack)
4-
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dataframes-haystack.svg)](https://pypi.org/project/dataframes-haystack)
5-
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/EdAbati/dataframes-haystack/main.svg)](https://results.pre-commit.ci/latest/github/EdAbati/dataframes-haystack/main)
4+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dataframes-haystack?logo=python&logoColor=white)](https://pypi.org/project/dataframes-haystack)
5+
[![PyPI - License](https://img.shields.io/pypi/l/dataframes-haystack.svg)](https://pypi.org/project/dataframes-haystack)
66

7-
-----
87

9-
**Table of Contents**
8+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
9+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
10+
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/EdAbati/dataframes-haystack/main.svg)](https://results.pre-commit.ci/latest/github/EdAbati/dataframes-haystack/main)
1011

11-
- [Description](#description)
12-
- [Installation](#installation)
13-
- [Usage](#usage)
14-
- [Contributing](#contributing)
15-
- [License](#license)
12+
-----
1613

17-
## Description
14+
## 📃 Description
1815

19-
`dataframes-haystack` is a Python library that allows various dataframe libraries to integrate with [Haystack 2.x](https://docs.haystack.deepset.ai/docs/intro).
16+
`dataframes-haystack` is an extension for [Haystack 2](https://docs.haystack.deepset.ai/docs/intro) that enables integration with dataframe libraries.
2017

21-
The library offers custom [Converters](https://docs.haystack.deepset.ai/docs/converters) components that convert data in dataframes into Haystack [`Document`s](https://docs.haystack.deepset.ai/docs/data-classes#document).
18+
The library offers custom [Converters](https://docs.haystack.deepset.ai/docs/converters) components that convert data stored in dataframes into Haystack [`Document`](https://docs.haystack.deepset.ai/docs/data-classes#document) objects.
2219

2320
The dataframe libraries currently supported are:
24-
- [Pandas](https://pandas.pydata.org/)
21+
- [pandas](https://pandas.pydata.org/)
2522
- [Polars](https://pola.rs)
2623

27-
## Installation
24+
## 🛠️ Installation
2825

2926
```sh
3027
# for pandas (pandas is already included in `haystack-ai`)
@@ -34,7 +31,10 @@ pip install dataframes-haystack
3431
pip install "dataframes-haystack[polars]"
3532
```
3633

37-
## Usage
34+
## 💻 Usage
35+
36+
> [!TIP]
37+
> See the [Example Notebooks](./notebooks) for complete examples.
3838
3939
### Pandas
4040

@@ -55,7 +55,10 @@ documents = converter.run(df)
5555
Result:
5656
```python
5757
>>> documents
58-
{'documents': [Document(id=2eaefcdeb8d31f9f3d543c614233476ff70c0ed5aae609667172786d09588223, content: 'Hello world', meta: {'filename': 'doc1.txt'}), Document(id=bdc99cbfe819356159950dbaffa0521b47ec3ac2ff040604c93fe7798cc71efc, content: 'Hello everyone', meta: {'filename': 'doc2.txt'})]}
58+
{'documents': [
59+
Document(id=0, content: 'Hello world', meta: {'filename': 'doc1.txt'}),
60+
Document(id=1, content: 'Hello everyone', meta: {'filename': 'doc2.txt'})
61+
]}
5962
```
6063

6164
### Polars
@@ -77,10 +80,13 @@ documents = converter.run(df)
7780
Result:
7881
```python
7982
>>> documents
80-
{'documents': [Document(id=2eaefcdeb8d31f9f3d543c614233476ff70c0ed5aae609667172786d09588223, content: 'Hello world', meta: {'filename': 'doc1.txt'}), Document(id=bdc99cbfe819356159950dbaffa0521b47ec3ac2ff040604c93fe7798cc71efc, content: 'Hello everyone', meta: {'filename': 'doc2.txt'})]}
83+
{'documents': [
84+
Document(id=0, content: 'Hello world', meta: {'filename': 'doc1.txt'}),
85+
Document(id=1, content: 'Hello everyone', meta: {'filename': 'doc2.txt'})
86+
]}
8187
```
8288

83-
## Contributing
89+
## 🤝 Contributing
8490

8591
Do you have an idea for a new feature? Did you find a bug that needs fixing?
8692

@@ -99,6 +105,6 @@ Requirements: [`hatch`](https://hatch.pypa.io/latest/install/), [`pre-commit`](h
99105
- Linting and formatting checks: `hatch run lint:fmt`
100106
- Unit tests: `hatch run test-cov-all`
101107

102-
## License
108+
## ✍️ License
103109

104110
`dataframes-haystack` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

0 commit comments

Comments
 (0)