-
Notifications
You must be signed in to change notification settings - Fork 78
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
If jupysql config is not present in pyproject.toml, jupysql attemps to read other tools' sections #969
Comments
this is definitely a bug, thanks for reporting! if you have some time, we'd appreciate a PR! |
Thanks @edublancas! I'm happy to put something together. As I look through this code, however, I am tempted to make some fairly large changes, so I want to be cautious given this is a project that's new to me... Specifically, the code causing this issue has a fair bit of complexity to accommodate the "did you mean ...?" fuzzy matching. It seems unnecessary when there is one and only one section ( My first suggestion would be to remove the fuzzy matching altogether, completely ignore sections that don't begin with Does that sound like a good approach, or is there something I am missing / a desire to retain difflib in config parsing for another reason? |
@maciejb the idea of fuzzy matching is to validate keys inside For this PR, i'd suggest sticking with fixing the issue at hand, but if you think that you absolutely need to change the fuzzy matching logic first, feel ree to open a PR to fix that first, and then a second one to fix the issue we're discussing here |
Thanks @edublancas , that makes sense. I believe there are two code paths that cause this current issue and one of them would require significant changes to the fuzzy join code, so it would definitely be better to address that first. I'll raise a new issue for that and tackle it first, then come back to this one. |
What happens?
When there is no jupysql configuration present, jupysql seems to attempt parsing sections belonging to other tools:
Adding a
[tool.jupysql.SqlMagic]
resolves thisTo Reproduce
Create a pyproject.toml containing sections for another tool, but not jupysql. For example:
Load jupysql. Observe a message is emitted such as:
OS:
macOS
JupySQL Version:
0.10.6
Full Name:
Maciej Bukczynski
Affiliation:
Darkhorse Analytics
The text was updated successfully, but these errors were encountered: