Skip to content

Commit

Permalink
v0.10.1.dev0: improvements to display of search results
Browse files Browse the repository at this point in the history
* bugfix: when running `sff notes search '<term>' --as-text`, any multi-line `label`s are concatenated without spaces (FIXED)
  • Loading branch information
paulkorir committed Oct 26, 2023
1 parent bcddd64 commit 2830f1e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sfftk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

BASE_DIR = os.path.dirname(__file__)

SFFTK_VERSION = 'v0.10.0.dev0'
SFFTK_VERSION = 'v0.10.1.dev0'
2 changes: 1 addition & 1 deletion sfftk/notes/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def _render(self):
rendered_field = field.render(self._row_data, self._index)
stripped_rendered_field = list(map(lambda f: f.strip(), rendered_field))
# we will strip all leading and trailing whitespace and join all wrapped lines
if str(field).strip() in ['description']: # the description needs spaces
if str(field).strip() in ['description', 'label']: # the description needs spaces
rendered.append(' '.join(stripped_rendered_field).strip())
else:
rendered.append(''.join(stripped_rendered_field))
Expand Down
12 changes: 6 additions & 6 deletions sfftk/test_data/sff/v0.8/output_emd_1181.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
"id": 15559,
"parent_id": 0,
"biological_annotation": {
"name": "employees village transformer",
"description": "Purusvestibulum nunc lorem quod. Vero iusto cum vitae, nullasuspendisse nibh ut.",
"number_of_instances": 7,
"name": "chairs liter transiting",
"description": "Vestibulumnulla iriure duimauris aliquip eos. At iaculis dignissim.",
"number_of_instances": 695,
"external_references": [
{
"id": 0,
"resource": "hashmark",
"url": "algebra",
"accession": "carelessness",
"resource": "caves",
"url": "turns",
"accession": "cautions",
"label": null,
"description": null
}
Expand Down
8 changes: 4 additions & 4 deletions sfftk/test_data/sff/v0.8/output_emd_1181.sff
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<segment_list>
<segment id="15559" parent_id="0">
<biological_annotation>
<name>stumps purchases experts</name>
<description>Consectetuer nequeetiam nunc accusam auctormauris mus, elitvivamus interdum nihil at nostra gravida stet. Suspendisse magnis ipsum dignissim justo illum, labore sodalessed liber tempus consectetur curabitur vestibulumnulla urnamorbi augue.</description>
<name>funding touch logic</name>
<description>Pretium facilisi qui feliscras iriure, sed senectus tempus. Eu varius fringilla augue justo amet.</description>
<external_references>
<ref id="0" resource="limitations" url="kill" accession="milligrams"/>
<ref id="0" resource="transmittals" url="map" accession="diagnoses"/>
</external_references>
<number_of_instances>660</number_of_instances>
<number_of_instances>355</number_of_instances>
</biological_annotation>
<colour>
<red>0.921817600727081</red>
Expand Down

0 comments on commit 2830f1e

Please sign in to comment.