Skip to content

Commit 9cbd52f

Browse files
committed
Merge branch 'main' into next
2 parents 9e53ac1 + 3930bac commit 9cbd52f

File tree

7 files changed

+39
-20
lines changed

7 files changed

+39
-20
lines changed

.flake8

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
[flake8]
2-
max-line-length = 120
2+
ignore=D205,D413,D400,D401
3+
max-line-length=120
4+
max-complexity=10
5+
exclude=venv
6+
extend-exclude="*__init__.py,*__version__.py,venv"
7+
select="C101"

.pylintrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[MASTER]
22
init-hook='import sys; print(sys.executable); print(sys.path)'
3-
ignore-paths =
4-
ignore =
5-
__version__.py
3+
ignore-paths=venv
4+
ignore=__version__.py
65

76
[FORMAT]
87
max-line-length=120

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
## [1.2.1](https://github.com/FullStackWithLawrence/openai-embeddings/compare/v1.2.0...v1.2.1) (2023-12-04)
22

3-
43
### Bug Fixes
54

6-
* force a new release ([e21f9c5](https://github.com/FullStackWithLawrence/openai-embeddings/commit/e21f9c56b6dc3be3320afb88a491b43fc04d365b))
5+
- force a new release ([e21f9c5](https://github.com/FullStackWithLawrence/openai-embeddings/commit/e21f9c56b6dc3be3320afb88a491b43fc04d365b))
76

87
# [1.2.0](https://github.com/lpm0073/hybrid-search-retriever/compare/v1.1.3...v1.2.0) (2023-12-03)
98

Makefile

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
SHELL := /bin/bash
2+
ifeq ($(OS),Windows_NT)
3+
PYTHON = python.exe
4+
ACTIVATE_VENV = venv\Scripts\activate
5+
else
6+
PYTHON = python3.11
7+
ACTIVATE_VENV = source venv/bin/activate
8+
endif
9+
PIP = $(PYTHON) -m pip
210

311
ifneq ("$(wildcard .env)","")
412
include .env
@@ -25,12 +33,14 @@ all: help
2533

2634
analyze:
2735
cloc . --exclude-ext=svg,json,zip --vcs=git
36+
2837
init:
38+
make clean && \
39+
$(PYTHON) -m venv venv && \
40+
$(ACTIVATE_VENV) && \
41+
$(PIP) install --upgrade pip && \
42+
$(PIP) install -r requirements.txt && \
2943
npm install && \
30-
python3.11 -m venv venv && \
31-
source venv/bin/activate && \
32-
pip install --upgrade pip && \
33-
pip install -r requirements.txt && \
3444
pre-commit install
3545

3646
activate:
@@ -42,10 +52,14 @@ test:
4252

4353
lint:
4454
pre-commit run --all-files && \
55+
pylint models && \
56+
flake8 . && \
57+
isort . && \
4558
black .
4659

4760
clean:
48-
rm -rf venv && rm -rf node_modules
61+
rm -rf venv && rm -rf node_modules && \
62+
find ./models/ -name __pycache__ -type d -exec rm -rf {} +
4963

5064
release:
5165
git commit -m "fix: force a new release" --allow-empty && git push

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ Wharton offers a variety of analytics and accounting courses. Some of the course
110110
These are just a few examples of the analytics and accounting courses offered at Wharton. The school offers a wide range of courses in these areas to provide students with a comprehensive understanding of financial analysis and decision-making.
111111
```
112112

113+
## Requirements
114+
115+
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). _pre-installed on Linux and macOS_
116+
- [make](https://gnuwin32.sourceforge.net/packages/make.htm). _pre-installed on Linux and macOS._
117+
- [OpenAI platform API key](https://platform.openai.com/).
118+
_If you're new to OpenAI API then see [How to Get an OpenAI API Key](./doc/OPENAI_API_GETTING_STARTED_GUIDE.md)_
119+
- [Pinecone](https://www.pinecone.io/) API key.
120+
- [Python 3.11](https://www.python.org/downloads/): for creating virtual environment used for building AWS Lambda Layer, and locally by pre-commit linters and code formatters.
121+
- [NodeJS](https://nodejs.org/en/download): used with NPM for local ReactJS developer environment, and for configuring/testing Semantic Release.
122+
113123
## Configuration defaults
114124

115125
Set these as environment variables on the command line, or in a .env file that should be located in the root of the repo.

models/hybrid_search_retreiver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# hybrid search capability
3535
from langchain.retrievers import PineconeHybridSearchRetriever
3636
from langchain.schema import BaseMessage, HumanMessage, SystemMessage
37-
from pinecone_text.sparse import BM25Encoder
37+
from pinecone_text.sparse import BM25Encoder # pylint: disable=import-error
3838

3939
# this project
4040
from models.const import Config, Credentials

pyproject.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ exclude = '''
2525
)/
2626
'''
2727

28-
[tool.flake8]
29-
ignore = "D205,D413,D400,D401"
30-
max-line-length =120
31-
max-complexity = 10
32-
exclude = "venv"
33-
extend-exclude = "*__init__.py,*__version__.py,venv"
34-
select = "C101"
35-
3628
[tool.codespell]
3729
skip = '*.svg,models/prompt_templates.py'
3830
ignore-words = 'codespell.txt'

0 commit comments

Comments
 (0)