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

Add opensearch #31

Open
wants to merge 96 commits into
base: main
Choose a base branch
from
Open

Add opensearch #31

wants to merge 96 commits into from

Conversation

ElliottKasoar
Copy link
Owner

No description provided.

@ElliottKasoar ElliottKasoar requested a review from oerc0122 May 2, 2024 13:18
.flake8 Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
abcd/__init__.py Show resolved Hide resolved
abcd/__init__.py Outdated
}

db = r.path.split('/')[1] if r.path else None
db = db if db else 'abcd'
db = r.path.split("/")[1] if r.path else None
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this was there before but does this want to be a pathlib.Path instead?

Not sure if this is necessarily safe just taking the first element, but then again, I'm not 100% what "path" is a path to or contains.

It will also fail if r.path doesn't contain "/", e.g. winpath with "\"

abcd/__init__.py Outdated
db = r.path.split('/')[1] if r.path else None
db = db if db else 'abcd'
db = r.path.split("/")[1] if r.path else None
db = db if db else "abcd"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems unnecessary given it's just been assigned to None above, would

db = pth if r.path and (pth := r.path.split("/")[1]) else "abcd"

be clearer? Not sure.

N.B. Python 3.8+

abcd/__init__.py Outdated Show resolved Hide resolved
abcd/__init__.py Outdated Show resolved Hide resolved
abcd/frontends/commandline/commands.py Outdated Show resolved Hide resolved
abcd/frontends/commandline/commands.py Show resolved Hide resolved
abcd/frontends/commandline/commands.py Outdated Show resolved Hide resolved
abcd/frontends/commandline/commands.py Outdated Show resolved Hide resolved
abcd/frontends/commandline/commands.py Show resolved Hide resolved
abcd/backends/atoms_opensearch.py Outdated Show resolved Hide resolved
abcd/backends/atoms_opensearch.py Outdated Show resolved Hide resolved
@ElliottKasoar ElliottKasoar force-pushed the add_opensearch branch 18 times, most recently from 8e4036d to 0e30256 Compare June 12, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants