Skip to content

Commit

Permalink
feat: Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed Jun 1, 2024
0 parents commit 9a0c420
Show file tree
Hide file tree
Showing 25 changed files with 3,210 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy MkDocs Site

on:
release:
types: [ created ]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs-material
- name: Build the MkDocs site
run: mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish Python Package

on:
release:
types: [created]
permissions:
actions: write
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install dependencies
run: |
set -e
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
shell: bash
# - name: Version bump
# run: |
# set -e
# poetry version ${{ github.event.release.tag_name }}
# git add ./pyproject.toml
# git config --global user.name "Release Bot"
# git config --global user.email "[email protected]"
# git commit -m "Change version to ${{ github.event.release.tag_name }}" --allow-empty
# git push origin HEAD:main
# shell: bash

- name: Publish package to PyPI
run: |
set -e
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish -n --build
shell: bash
# poetry config repositories.publish ${{ inputs.PUBLISH_REGISTRY }}
# poetry publish -p ${{ secrets.PYPI_API_TOKEN }} -u ${{ inputs.PUBLISH_REGISTRY_USERNAME }} -r publish --build
44 changes: 44 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
workflow_dispatch: { }

jobs:
test:
runs-on: [ "ubuntu-latest" ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
- name: start minikube
id: minikube
uses: medyagh/setup-minikube@latest
with:
kubernetes-version: 1.27.3
- name: Add helm repo
run: |
set -e
helm repo add chromadb https://amikos-tech.github.io/chromadb-chart/
helm repo update
- name: Install chromadb
run: |
set -e
helm install chromadb chromadb/chromadb --set chromadb.allowReset=true,chromadb.apiVersion=${{ matrix.chroma-version }},chromadb.auth.enabled=false
- name: Install dependencies
run: |
set -e
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
# - name: Lint with flake8
# run: |
# set -e
# poetry update
# pre-commit run --from-ref HEAD~1 --to-ref HEAD
- name: Run tests
run: |
set -e
poetry update
89 changes: 89 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
cmake-build-*/
.idea/
*.iws
out/
.idea_modules/
atlassian-ide-plugin.xml
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
*.manifest
*.spec
pip-log.txt
pip-delete-this-directory.txt
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
*.mo
*.pot
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
instance/
.webassets-cache
.scrapy
docs/_build/
.pybuilder/
target/
.ipynb_checkpoints
profile_default/
ipython_config.py
.pdm.toml
__pypackages__/
celerybeat-schedule
celerybeat.pid
*.sage.py
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.spyderproject
.spyproject
.ropeproject
/site
.mypy_cache/
.dmypy.json
dmypy.json
.pyre/
.pytype/
cython_debug/
.idea/
.python-version
qdrant*/
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/chromadb-x.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: check-xml
- id: check-merge-conflict
- id: check-case-conflict
- id: check-docstring-first

- repo: https://github.com/psf/black
rev: "refs/tags/23.3.0:refs/tags/23.3.0"
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
- "--extend-ignore=E203,E501,E503"
- "--max-line-length=88"

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.2.0"
hooks:
- id: mypy
args: [--strict, --ignore-missing-imports, --follow-imports=silent, --disable-error-code=type-abstract, --config-file=./pyproject.toml]
additional_dependencies: ["types-requests", "pydantic", "overrides", "hypothesis", "pytest", "pypika", "numpy"]
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License

Copyright (c) 2024 Amikos Tech Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
lint:
@echo "Running pre-commit hooks"
@pre-commit run --all-files
pre-commit:
@echo "Linting last commit"
@pre-commit run --from-ref HEAD~1 --to-ref HEAD
dependencies:
@echo "Installing dependencies"
@poetry update
install:
@echo "Installing the project"
@poetry install
test:
@echo "Running tests"
@poetry run pytest
Empty file added chromadbx/__init__.py
Empty file.
Empty file added chromadbx/clients/__init__.py
Empty file.
Loading

0 comments on commit 9a0c420

Please sign in to comment.