Conversation
|
This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog. Note that this might contain changes that are on main, but not yet released. Changelog: 0.9.8 (2026-02-06)Features
|
7bf69c4 to
48e2141
Compare
48e2141 to
ee1c549
Compare
fengelniederhammer
left a comment
There was a problem hiding this comment.
Looks good in general!
fengelniederhammer
left a comment
There was a problem hiding this comment.
Looks good 👍
I found a little bug when testing it from the Python REPL, but I think that's rather a bug in the existing SILO code:
- call
appendDataFromStringwith invalid JSON -> I saw an expected exception. - call
appendDataFromStringagain with valid JSON -> I saw an unexpected exception
>>> db = Database()
>>> db.create_nucleotide_sequence_table(table_name="sequences", primary_key_name="id", sequence_name="main", reference_sequence="ACTG")
>>> db.append_data_from_string("sequences", '{"id": "1", "main": {"sequence": "ACGG"}}')
Traceback (most recent call last):
File "pysilo/database.pyx", line 195, in pysilo.database.PyDatabase.append_data_from_string
RuntimeError: When getting field 'insertions' in column field 'main' got error: NO_SUCH_FIELD: The JSON field referenced does not exist in this object. - current line: {"id": "1", "main": {"sequence": "ACGG"}}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pysilo/database.pyx", line 197, in pysilo.database.PyDatabase.append_data_from_string
RuntimeError: Failed to append data: When getting field 'insertions' in column field 'main' got error: NO_SUCH_FIELD: The JSON field referenced does not exist in this object. - current line: {"id": "1", "main": {"sequence": "ACGG"}}
>>> db.print_all_data("sequences")
>>> db.append_data_from_string("sequences", '{"id": "1", "main": {"sequence": "ACGG", "insertions": []}}')
Traceback (most recent call last):
File "pysilo/database.pyx", line 195, in pysilo.database.PyDatabase.append_data_from_string
RuntimeError: string_columns id has invalid size 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pysilo/database.pyx", line 197, in pysilo.database.PyDatabase.append_data_from_string
RuntimeError: Failed to append data: string_columns id has invalid size 2
>>> db.print_all_data("sequences")
{"id":"1","main":"ACGG"}
Oh, this is definitely not nice. We should specify that, for now, all exceptions thrown invalidate the current database. I added this to the error message: and added #1139 |
168f0a0 to
3aa73e0
Compare
resolves #1126
Summary
This adds python bindings. For now, these are not published, but instead installable from source using
pip install .from the project root.The api remains rather limited for now, but remains to be extended in the future
PR Checklist