Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update encoder ref #28

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,40 @@ name: lint

on:
push:
branches: [main]
branches: [ main ]
pull_request:


env:
POETRY_VERSION: "1.5.1"
POETRY_VERSION: "1.8.2"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
- "3.11"
steps:
- uses: actions/checkout@v3
- name: Cache Poetry
uses: actions/cache@v2
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install
- name: Analyzing the code with our lint
run: |
make lint
- uses: actions/checkout@v3
- name: Cache Poetry
uses: actions/cache@v2
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install
- name: Analyzing the code with our lint
run: |
make lint
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*'
- '*'

jobs:
build:
Expand All @@ -16,7 +16,7 @@ jobs:
python-version: '3.11'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
curl -sSL https://install.python-poetry.org | python - -y --version 1.8.2
- name: Install dependencies
run: poetry install
- name: Build
Expand All @@ -33,7 +33,7 @@ jobs:
python-version: '3.11'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
curl -sSL https://install.python-poetry.org | python - -y --version 1.8.2
- name: Publish to PyPI
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
Expand Down
90 changes: 45 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,59 @@ name: Test
on:
push:
branches:
- main
- main
pull_request:


env:
POETRY_VERSION: "1.5.1"
POETRY_VERSION: "1.8.2"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
# - "3.12"
- "3.10"
- "3.11"
# - "3.12"
steps:
- uses: actions/checkout@v4
- name: Cache Poetry
uses: actions/cache@v3
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install --all-extras
pip install cohere
- name: Install nltk
run: |
pip install nltk
- name: Download nltk data
run: |
python -m nltk.downloader punkt stopwords wordnet
- name: Pytest All
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
fail_ci_if_error: false
- uses: actions/checkout@v4
- name: Cache Poetry
uses: actions/cache@v3
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install --all-extras
pip install cohere
- name: Install nltk
run: |
pip install nltk
- name: Download nltk data
run: |
python -m nltk.downloader punkt stopwords wordnet
- name: Pytest All
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
fail_ci_if_error: false
132 changes: 66 additions & 66 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
default_language_version:
python: python3.9
python: python3.11
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.10.0]
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [ black==22.10.0 ]

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.11.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.11.0
hooks:
- id: commitlint
stages: [ commit-msg ]
additional_dependencies: [ '@commitlint/config-conventional' ]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
name: Run codespell to check for common misspellings in files
language: python
types: [ text ]
args: [ "--write-changes", "--ignore-words-list", "asend" ]
exclude: "poetry.lock"
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
name: Run codespell to check for common misspellings in files
language: python
types: [ text ]
args: [ "--write-changes", "--ignore-words-list", "asend" ]
exclude: "poetry.lock"

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-vcs-permalinks
- id: end-of-file-fixer
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
- id: debug-statements
- id: no-commit-to-branch
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
args: [ '--unsafe' ] # for mkdocs.yml
- id: detect-private-key
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-vcs-permalinks
- id: end-of-file-fixer
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
- id: debug-statements
- id: no-commit-to-branch
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
args: [ '--unsafe' ] # for mkdocs.yml
- id: detect-private-key

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
- id: commitizen-branch
stages:
- post-commit
- push
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
- id: commitizen-branch
stages:
- post-commit
- push

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.290
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.290
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.8.0
# hooks:
# - id: mypy
# args: [--ignore-missing-imports]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.8.0
# hooks:
# - id: mypy
# args: [--ignore-missing-imports]

- repo: https://github.com/PyCQA/bandit
rev: 1.7.6
hooks:
- id: bandit
args: ['-lll']
- repo: https://github.com/PyCQA/bandit
rev: 1.7.6
hooks:
- id: bandit
args: [ '-lll' ]
Loading
Loading