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

build_index with defaults #430

Merged
merged 2 commits into from
Sep 17, 2024
Merged

build_index with defaults #430

merged 2 commits into from
Sep 17, 2024

Conversation

jamesbraza
Copy link
Collaborator

Making it easier to use

@jamesbraza jamesbraza added the enhancement New feature or request label Sep 17, 2024
@jamesbraza jamesbraza self-assigned this Sep 17, 2024
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 17, 2024
) -> SearchIndex:
"""Build a PaperQA search index, this will also happen automatically upon using `ask`."""
settings = get_settings(settings)
if index_name == "default":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this check for None too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was letting None be handled by the wrapped function get_directory_index. I can do this better to make it clear

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pushed a change to DRY it up with get_directory_index

Copy link
Collaborator

@whitead whitead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 17, 2024
@jamesbraza jamesbraza merged commit 4882259 into main Sep 17, 2024
5 checks passed
@jamesbraza jamesbraza deleted the defaulted-build branch September 17, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants