-
Notifications
You must be signed in to change notification settings - Fork 484
Improve and tests #55
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
676a2eb
add pytest dependency
john0isaac 296db5c
restrict workflow run and cache dependencies for faster reruns
john0isaac d41a6df
mypy fixes
john0isaac 44446bb
add dataclasses for response for better typing and easier usage
john0isaac 8c58aac
setup test client for database and without database with test coverag…
john0isaac a0522e6
fix tests for windows and macos
john0isaac 06c424b
use basemodel instead of dataclass to match the other models and for …
john0isaac cf3bc78
fix scopes and add app fixture
john0isaac 4d9a536
fix tests to use existing setup
john0isaac 7573249
add mocks and use monkey patch for setting env vars
john0isaac 9fb9e54
create database and seed data
john0isaac 61f9b8f
add tests for items handler and similar
john0isaac 86b7986
add search_handler tests
john0isaac 610a418
add chat tests
john0isaac eac85f0
remove content length assertion to allow for flexibility in response …
john0isaac b36a260
add azure openai env vars and use session scoped fixutres
john0isaac ea722d7
Typing improvements
pamelafox addd3da
fix mypy module error
john0isaac 5261ab2
typing improvements
john0isaac 39abb0f
ignore pgvector from mypy checks
john0isaac 121b341
follow sqlalchmey example for using columns()
john0isaac d0a9a02
reimplement abstract functions
john0isaac c5d99f5
fix typo in env var name
john0isaac 5c17e9a
use fastapi dependency instead of global storage
john0isaac 3a6076c
fix type and add mypy to tests
john0isaac da5220c
remove multiple env loading, use single azure_credentials
john0isaac 79a8a2d
use app state to store global vars
john0isaac 3f0286b
add pydatnic types for Item table
john0isaac 02d0b1b
add more tests and fix azure credentials mocking
john0isaac 17fc97f
apply feedback from pr review
john0isaac b2bb121
add postgres searcher tests
john0isaac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
[tool.ruff] | ||
line-length = 120 | ||
target-version = "py311" | ||
target-version = "py312" | ||
lint.select = ["E", "F", "I", "UP"] | ||
lint.ignore = ["D203"] | ||
lint.isort.known-first-party = ["fastapi_app"] | ||
|
||
[tool.ruff.lint] | ||
select = ["E", "F", "I", "UP"] | ||
ignore = ["D203"] | ||
[tool.mypy] | ||
john0isaac marked this conversation as resolved.
Show resolved
Hide resolved
|
||
check_untyped_defs = true | ||
python_version = 3.12 | ||
exclude = [".venv/*"] | ||
|
||
[tool.ruff.lint.isort] | ||
known-first-party = ["fastapi_app"] | ||
[tool.pytest.ini_options] | ||
addopts = "-ra --cov" | ||
testpaths = ["tests"] | ||
pythonpath = ['src'] | ||
filterwarnings = ["ignore::DeprecationWarning"] | ||
|
||
[[tool.mypy.overrides]] | ||
module = [ | ||
"pgvector.*", | ||
] | ||
ignore_missing_imports = true | ||
|
||
[tool.coverage.report] | ||
show_missing = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.