Skip to content

Commit c885f4a

Browse files
Initial commit
0 parents  commit c885f4a

17 files changed

+549
-0
lines changed

.github/workflows/publish.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
cache: pip
23+
cache-dependency-path: setup.py
24+
- name: Install dependencies
25+
run: |
26+
pip install '.[test]'
27+
- name: Run tests
28+
run: |
29+
pytest
30+
deploy:
31+
runs-on: ubuntu-latest
32+
needs: [test]
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: Set up Python
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: "3.11"
39+
cache: pip
40+
cache-dependency-path: setup.py
41+
- name: Install dependencies
42+
run: |
43+
pip install setuptools wheel twine build
44+
- name: Publish
45+
env:
46+
TWINE_USERNAME: __token__
47+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
48+
run: |
49+
python -m build
50+
twine upload dist/*
51+

.github/workflows/test-coverage.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Calculate Test Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out repo
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.9
21+
22+
- uses: actions/cache@v2
23+
name: Configure pip caching
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
27+
restore-keys: |
28+
${{ runner.os }}-pip-
29+
30+
- name: Install Python dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
python -m pip install -e .[test]
34+
python -m pip install pytest-cov
35+
36+
- name: Run tests
37+
run: |-
38+
ls -lah
39+
pytest --cov=tsellm --cov-report xml:coverage.xml --cov-report term
40+
ls -lah
41+
42+
- name: Upload coverage report
43+
uses: codecov/codecov-action@v1
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
file: coverage.xml
47+

.github/workflows/test.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
cache: pip
21+
cache-dependency-path: setup.py
22+
- name: Install dependencies
23+
run: |
24+
pip install '.[test]'
25+
- name: Run tests
26+
run: |
27+
pytest
28+

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.venv
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
venv
6+
.eggs
7+
.pytest_cache
8+
*.egg-info
9+
.DS_Store
10+
dist
11+
build
12+
.idea/

.readthedocs.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.11"
7+
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
formats:
12+
- pdf
13+
- epub
14+
15+
python:
16+
install:
17+
- requirements: docs/requirements.txt
18+

LICENSE

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
3+
BSD License
4+
5+
Copyright (c) 2024, Florents Tselai
6+
All rights reserved.
7+
8+
Redistribution and use in source and binary forms, with or without modification,
9+
are permitted provided that the following conditions are met:
10+
11+
* Redistributions of source code must retain the above copyright notice, this
12+
list of conditions and the following disclaimer.
13+
14+
* Redistributions in binary form must reproduce the above copyright notice, this
15+
list of conditions and the following disclaimer in the documentation and/or
16+
other materials provided with the distribution.
17+
18+
* Neither the name of the copyright holder nor the names of its
19+
contributors may be used to endorse or promote products derived from this
20+
software without specific prior written permission.
21+
22+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
29+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31+
OF THE POSSIBILITY OF SUCH DAMAGE.
32+

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<p align="center">
2+
3+
<p align="center">
4+
<img width="50%" height="40%" src="" alt="Logo">
5+
</p>
6+
7+
<h1 align="center">tsellm</h1>
8+
<p align="center">
9+
<strong>LLM support in SQLite</strong>
10+
<br> <br />
11+
<a href="#status"><strong> Status</strong></a> |
12+
<a href="#why"><strong> Why</strong></a> |
13+
<a href="#how"><strong> How </strong></a> |
14+
<a href="#installation"><strong> Installation </strong></a> |
15+
<a href="#usage"><strong> Usage </strong></a> |
16+
<a href="#roadmap"><strong> Roadmap </strong></a>
17+
18+
</p>
19+
<p align="center">
20+
21+
<p align="center">
22+
<a href="https://pypi.org/project/tsellm/"><img src="https://img.shields.io/pypi/v/tsellm?label=PyPI"></a>
23+
<a href="https://github.com/Florents-Tselai/tsellm/actions/workflows/test.yml?branch=mainline"><img src="https://github.com/Florents-Tselai/tsellm/actions/workflows/test.yml/badge.svg"></a>
24+
<a href="https://codecov.io/gh/Florents-Tselai/tsellm"><img src="https://codecov.io/gh/Florents-Tselai/tsellm/branch/main/graph/badge.svg"></a>
25+
<a href="https://opensource.org/licenses/BSD license"><img src="https://img.shields.io/badge/BSD license.0-blue.svg"></a>
26+
<a href="https://github.com/Florents-Tselai/tsellm/releases"><img src="https://img.shields.io/github/v/release/Florents-Tselai/tsellm?include_prereleases&label=changelog"></a>
27+
28+
## Status
29+
30+
## Why
31+
32+
## How
33+
34+
35+
## Installation
36+
37+
## Usage
38+
39+
```bash
40+
pip install tsellm
41+
```
42+
43+
### Development
44+
45+
```bash
46+
pip install -e '.[test]'
47+
pytest
48+
```
49+

codecov.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
informational: true
6+
patch:
7+
default:
8+
informational: true

docs/Makefile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = tsellm
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
livehtml:
23+
sphinx-autobuild -b html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(0)

0 commit comments

Comments
 (0)