-
-
Notifications
You must be signed in to change notification settings - Fork 121
--lines and --text and --convert and --import #361
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
Conversation
So far I've just implemented the new help:
|
Codecov Report
@@ Coverage Diff @@
## main #361 +/- ##
==========================================
- Coverage 96.49% 96.44% -0.06%
==========================================
Files 5 5
Lines 2283 2306 +23
==========================================
+ Hits 2203 2224 +21
- Misses 80 82 +2
Continue to review full report at Codecov.
|
I'm going to refactor all of the tests for |
Documentation: https://github.com/simonw/sqlite-utils/blob/33223856ff7fe746b7b77750fbe5b218531d0545/docs/cli.rst#inserting-unstructured-data-with---lines-and---all - I went with a single section titled "Inserting unstructured data with --lines and --all" |
I'm having second thoughts about this bit:
The code in question is this: sqlite-utils/sqlite_utils/utils.py Lines 296 to 303 in 500a35a
Do I really want to add the complexity of supporting different variable names there? I think always using Except... |
Test code that just worked for me:
|
And here's a demo of
|
That turned out to be a bad idea because it meant exhausting the iterator early for the check - before we got to the |
Here's the traceback if your
I can live with that for the moment. |
|
I'm going to rename
To avoid that clash with Python's |
Just need documentation for |
For |
Got that working:
|
This is all documented. I'm going to rebase-merge it to keep the individual commits. |
Refs #356
Still TODO:
--lines
working, with tests--text
working, with tests--convert
with tests--lines
working with--convert
with tests--text
working with--convert
with tests--csv
and--tsv
import working with--convert
with tests--nl
working with--convert
with tests