Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
392 commits
Select commit Hold shift + click to select a range
7e2e4e8
fix: the colors of the page are now more uniform
ThereseBjorkman Nov 27, 2024
6e99b52
feat: more figure text added
ThereseBjorkman Nov 27, 2024
047c91a
fix: some small fixes to the text
ThereseBjorkman Nov 27, 2024
551e556
fix: an issue with multiple headers
ThereseBjorkman Nov 27, 2024
cd647f3
fix: an issue with multiple headers
ThereseBjorkman Nov 27, 2024
adb84f2
fix: html in sidebarcards to get text better positioned
ThereseBjorkman Nov 27, 2024
6a94ede
fix: reformat
ThereseBjorkman Nov 27, 2024
c898f3a
fix: reformat
ThereseBjorkman Nov 27, 2024
3bdf42a
fix: reformat
ThereseBjorkman Nov 27, 2024
51d21df
fix: reformat
ThereseBjorkman Nov 28, 2024
7831740
fix: test unable to go through because of multiple mentions of the sa…
ThereseBjorkman Nov 28, 2024
c409c1c
rename more options
hannamlmv Nov 28, 2024
2b00538
Merge pull request #74 from hannamlmv/trees_page
hannamlmv Nov 28, 2024
e78fb54
Merge pull request #77 from hannamlmv/sample_set_description
almanilsson Nov 28, 2024
83f43e9
fix: test unable to go through because of multiple mentions of the sa…
ThereseBjorkman Nov 28, 2024
4866670
fix: test unable to go through because of multiple mentions of the sa…
ThereseBjorkman Nov 28, 2024
4664809
add warning for data modifications
hannamlmv Nov 27, 2024
adb53ce
comment out failing test
hannamlmv Nov 28, 2024
5a8ac0d
comment out failing test
hannamlmv Nov 28, 2024
387d9c0
comment out failing test
hannamlmv Nov 28, 2024
fb89ed7
uncomment test
hannamlmv Nov 28, 2024
1ebbded
comment out test
hannamlmv Nov 28, 2024
8af1463
uncomment tests
hannamlmv Nov 28, 2024
5d6fb32
comment warning pane
hannamlmv Nov 28, 2024
3cc58cd
reformat
hannamlmv Nov 28, 2024
353bf5c
reformat
hannamlmv Nov 28, 2024
1347319
reformat
hannamlmv Nov 28, 2024
d3f1913
uncomment lines
hannamlmv Nov 28, 2024
aab141d
comment lines
hannamlmv Nov 28, 2024
6241ee7
uncomment line
hannamlmv Nov 28, 2024
5c72e1c
reformat
hannamlmv Nov 28, 2024
8787214
place warning box outside of card
hannamlmv Nov 28, 2024
cbc9130
comment out lines
hannamlmv Nov 28, 2024
6803372
comment line
hannamlmv Nov 28, 2024
5ecc5ca
uncomment line
hannamlmv Nov 28, 2024
847f420
uncomment line
hannamlmv Nov 28, 2024
76a45e2
remove warning pane comment
hannamlmv Nov 28, 2024
d329b86
modify tests
hannamlmv Nov 28, 2024
b0b8813
Merge pull request #54 from hannamlmv/sidebar
ThereseBjorkman Nov 28, 2024
c49e596
place back warning text
hannamlmv Nov 28, 2024
99339c0
Merge branch 'main' into individuals_warning
hannamlmv Nov 28, 2024
88108af
Merge pull request #80 from hannamlmv/individuals_warning
hannamlmv Nov 29, 2024
2a0009d
Add sample sets mini table to all pages
almanilsson Dec 2, 2024
a1c20e5
add slider
hannamlmv Dec 2, 2024
ae21dd2
reformat
hannamlmv Dec 2, 2024
584cf0d
fix: only valid input can be put into the haplotype plot
ThereseBjorkman Dec 2, 2024
5ca4209
Merge pull request #85 from hannamlmv/sample_set_sidebar
almanilsson Dec 2, 2024
f97f05b
feat: figure texts on all plots
ThereseBjorkman Dec 2, 2024
1cbcc75
fix: reformat
ThereseBjorkman Dec 2, 2024
431ffe3
fix: f string
ThereseBjorkman Dec 2, 2024
2cc6a73
fix: string too long
ThereseBjorkman Dec 2, 2024
f104b2d
fix: string too long
ThereseBjorkman Dec 2, 2024
96f5675
Merge pull request #87 from hannamlmv/trees_page
hannamlmv Dec 3, 2024
e545845
refactor sample_set methods
hannamlmv Dec 2, 2024
3b9663c
remove uneccessary variable name
hannamlmv Dec 3, 2024
b403eca
remove one returned value
hannamlmv Dec 3, 2024
1933507
reformat
hannamlmv Dec 3, 2024
4d2830c
reformat
hannamlmv Dec 3, 2024
07f7831
remove print statement
hannamlmv Dec 3, 2024
7510d49
sort selected individuals first
hannamlmv Dec 3, 2024
11bfc03
format
hannamlmv Dec 3, 2024
d9b0164
Add debug script
almanilsson Nov 28, 2024
4eeadfd
fix: Comments as well as clearer title before entering individual_id
ThereseBjorkman Dec 3, 2024
b1495a4
Fix modification update button
almanilsson Dec 3, 2024
a845efb
Remove bounds to catch errors with check_data_modification() instead
almanilsson Dec 3, 2024
0b3268d
fix scrolling on ignn page
hannamlmv Dec 3, 2024
3004b9a
Merge branch 'main' into figure_texts
ThereseBjorkman Dec 4, 2024
6913950
fix: changes according to comments
ThereseBjorkman Dec 4, 2024
0861e71
Merge pull request #90 from hannamlmv/individuals_sorting
hannamlmv Dec 4, 2024
3519942
Merge pull request #88 from hannamlmv/figure_texts
ThereseBjorkman Dec 4, 2024
f5b14a7
Merge branch 'main' into ignn_scrolling
hannamlmv Dec 4, 2024
6c1a65e
fix merge conflicts
hannamlmv Dec 4, 2024
8f86495
reformat
hannamlmv Dec 4, 2024
715b1bf
Merge pull request #94 from hannamlmv/ignn_scrolling
hannamlmv Dec 4, 2024
74b2350
fix variable naming
hannamlmv Dec 4, 2024
1e13b84
Merge pull request #89 from hannamlmv/sample_sets_refactoring
hannamlmv Dec 4, 2024
870a8d9
Merge pull request #92 from hannamlmv/individuals-button
almanilsson Dec 4, 2024
244fae7
Add restore button
almanilsson Dec 4, 2024
2fd6759
Reformat datastore
almanilsson Dec 4, 2024
df09546
Updated if True
almanilsson Dec 4, 2024
396bd38
Add type check for conditional operand
almanilsson Dec 4, 2024
507559b
Reformat datastore
almanilsson Dec 4, 2024
d463f82
customize sort order of bars
hannamlmv Dec 4, 2024
841703e
reformat
hannamlmv Dec 4, 2024
7e36aee
fix: there is now colors in the dropdown just need to fix the input box
ThereseBjorkman Dec 5, 2024
587824d
Change batch reassignment to selection from predefined alternatives
almanilsson Dec 5, 2024
0b62373
Add selection options
almanilsson Dec 5, 2024
c075dd6
Remove individuals table
almanilsson Dec 5, 2024
bb75bc3
Add individuals table
almanilsson Dec 5, 2024
826faa1
Make individuals table dependent on sample sets table
almanilsson Dec 5, 2024
eb4fffc
Rename variable from "id" to "sample_set_id"
almanilsson Dec 5, 2024
e7ac48f
Add function to get IDs from both individuals and sample sets
almanilsson Dec 5, 2024
7d89e23
Correct get_ids function in SampleSetsTable
almanilsson Dec 5, 2024
af37faf
Make individuals page batrch reassignment update based on sample sets
almanilsson Dec 5, 2024
e9333d0
Add update mechanism for sample selection
almanilsson Dec 5, 2024
6432da2
Reformat
almanilsson Dec 5, 2024
15536ed
Add type check for SampleSetsTable
almanilsson Dec 5, 2024
b8401b7
Merge pull request #102 from hannamlmv/gnn_bar_sorting
hannamlmv Dec 5, 2024
c35a6a0
Update test with new SampleSet variable name sample_set_id
almanilsson Dec 5, 2024
17a232e
fix: format
ThereseBjorkman Dec 5, 2024
0ed39cd
fix: format
ThereseBjorkman Dec 5, 2024
f565bd3
fix: format
ThereseBjorkman Dec 5, 2024
8c4c664
Merge branch 'individuals-input-restrictions' and individuals-restore…
almanilsson Dec 5, 2024
106159d
Fix #101: Combine the two pages
almanilsson Dec 5, 2024
fb61ff3
Remove old page
almanilsson Dec 5, 2024
5148565
Add and format titles
almanilsson Dec 5, 2024
b436cf9
Fix stretching of components
almanilsson Dec 5, 2024
ad6832c
Fix too long lines
almanilsson Dec 5, 2024
2e56765
Update tests
almanilsson Dec 5, 2024
887a3a4
Reformat
almanilsson Dec 5, 2024
e3d88e0
Merge pull request #100 from hannamlmv/individuals-restore-changes
almanilsson Dec 5, 2024
e5caa7e
Improve description and visibility of widgets
almanilsson Dec 6, 2024
f40cb60
Merge branch 'main' of https://github.com/tforest/tseda
almanilsson Dec 6, 2024
a4fdc5f
fix issue #98
hannamlmv Dec 4, 2024
e6384cc
default is none for multiway
hannamlmv Dec 4, 2024
6060163
fix issue #96
hannamlmv Dec 4, 2024
af17f91
fix bug
hannamlmv Dec 5, 2024
f7e34d0
fix bug
hannamlmv Dec 6, 2024
85a0c5e
Merge branch 'main' of https://github.com/hannamlmv/tseda into indivi…
almanilsson Dec 6, 2024
069133e
Merge pull request #103 from hannamlmv/sample_set_color
ThereseBjorkman Dec 6, 2024
07cd82d
Merge pull request #99 from hannamlmv/small_bug_fixes
hannamlmv Dec 6, 2024
23d0eac
Merge branch 'main' of https://github.com/hannamlmv/tseda into indivi…
almanilsson Dec 6, 2024
a7c9a19
Reformat
almanilsson Dec 6, 2024
e76d9b7
Merge pull request #105 from hannamlmv/individuals-input-restrictions
almanilsson Dec 6, 2024
5e53416
Merge branch 'main' of https://github.com/hannamlmv/tseda into combin…
almanilsson Dec 6, 2024
7b402ef
fix bug
hannamlmv Dec 6, 2024
dd0d78f
remove uneccessary import
hannamlmv Dec 6, 2024
a2e2b87
Merge pull request #110 from hannamlmv/statistics_bug_fix
hannamlmv Dec 6, 2024
dd8041a
added option to pack unselected samples in the trees
hannamlmv Dec 5, 2024
c07a874
add multiple trees
hannamlmv Dec 5, 2024
831589b
add dropdown to select number of trees
hannamlmv Dec 6, 2024
8254879
add default settings for multiple plots
hannamlmv Dec 6, 2024
8769cdd
make code more efficient
hannamlmv Dec 6, 2024
4ae51a3
fix long line
hannamlmv Dec 6, 2024
2809924
disable pack unselected when no sample sets selected
hannamlmv Dec 6, 2024
1637283
reactivate pack unselected option
hannamlmv Dec 6, 2024
63eef9f
make sure inputs are valid for multiple trees
hannamlmv Dec 6, 2024
a24616b
handle errors
hannamlmv Dec 6, 2024
e762ced
set default settings for single tree
hannamlmv Dec 6, 2024
70c35a2
format
hannamlmv Dec 6, 2024
e75ed51
fix long line
hannamlmv Dec 6, 2024
bb4c8de
add a black outline to selected samples
hannamlmv Dec 6, 2024
a5d2d6b
reformat
hannamlmv Dec 6, 2024
487645a
fix typo
hannamlmv Dec 6, 2024
6153008
test
hannamlmv Dec 6, 2024
ec1babe
fix test
hannamlmv Dec 6, 2024
866f023
fix test
hannamlmv Dec 6, 2024
d36a3d5
test
hannamlmv Dec 6, 2024
293be11
Merge pull request #104 from hannamlmv/tree-page-features
hannamlmv Dec 6, 2024
e9c940f
Set table size
almanilsson Dec 9, 2024
dcd0d24
Remove page size for sample sets table
almanilsson Dec 9, 2024
69ef308
Move sidebar options
almanilsson Dec 9, 2024
6bd28fe
Correct get_id method
almanilsson Dec 9, 2024
3e7f82f
Remove attempt at automatic refresh, add tooltip
almanilsson Dec 9, 2024
adf02d0
Fix line too long
almanilsson Dec 9, 2024
a73ab9c
update tests
almanilsson Dec 9, 2024
ae59594
Merge branch 'combine-pages' of https://github.com/hannamlmv/tseda in…
almanilsson Dec 9, 2024
e404e26
Improve spacing of buttons
almanilsson Dec 9, 2024
77aadf4
Add warning about issue #114
almanilsson Dec 9, 2024
6fee038
reformat
almanilsson Dec 9, 2024
29706f4
Merge branch 'combine-pages' of https://github.com/hannamlmv/tseda in…
almanilsson Dec 9, 2024
0ccc8d5
Add combine tables function
almanilsson Dec 9, 2024
1aa84c8
Fix combine _tables error
almanilsson Dec 9, 2024
1195cef
Update combine_tables
almanilsson Dec 9, 2024
7388e7a
Display combined table
almanilsson Dec 9, 2024
d6638ab
Add automatic update
almanilsson Dec 9, 2024
7c1f34d
Merge pull request #107 from hannamlmv/combine-pages
almanilsson Dec 10, 2024
8500db0
Change dependency
almanilsson Dec 10, 2024
b7b22cf
Fix automatic update of combined tables
almanilsson Dec 10, 2024
8799956
Add update button and other improvements of combined table
almanilsson Dec 10, 2024
04eda96
Merge branch 'main' of https://github.com/hannamlmv/tseda into combin…
almanilsson Dec 10, 2024
4fab56a
Reformat
almanilsson Dec 10, 2024
93aeeeb
Add update button for table
almanilsson Dec 10, 2024
477924b
Add full page update button
almanilsson Dec 10, 2024
abc3200
Reformat
almanilsson Dec 10, 2024
d4cc1e8
Reformat
almanilsson Dec 10, 2024
bb67f92
add accordions on ignn page
hannamlmv Dec 11, 2024
61211ff
add accordions for statistics page
hannamlmv Dec 11, 2024
0d356e7
Increase test time
almanilsson Dec 11, 2024
159edfc
add accordion for structure page
hannamlmv Dec 11, 2024
22287ba
Update tests
almanilsson Dec 11, 2024
33c6075
Update test to wait on individuals page
almanilsson Dec 11, 2024
2ced5ca
Update test sleep time to allow pages to render before checking for e…
almanilsson Dec 11, 2024
0b2676c
add accordions to individuals page
hannamlmv Dec 11, 2024
3c0026a
add accordions for tree page
hannamlmv Dec 11, 2024
64ecc69
add accordions to tree page
hannamlmv Dec 11, 2024
e8caf9a
fix long lines
hannamlmv Dec 11, 2024
425f429
reduce width of sample sets table when accordion closed
hannamlmv Dec 11, 2024
0019fe8
Change variable name
almanilsson Dec 11, 2024
cd261e3
Reformat
almanilsson Dec 11, 2024
1d44622
Update create sample set warning
almanilsson Dec 11, 2024
0936f50
Merge pull request #116 from hannamlmv/combine-tables
almanilsson Dec 11, 2024
3daf2b0
Merge branch 'main' into accordions
hannamlmv Dec 11, 2024
c4ebe7e
reformat
hannamlmv Dec 11, 2024
be49559
Merge pull request #117 from hannamlmv/accordions
hannamlmv Dec 11, 2024
af85af8
add docstring for config file
hannamlmv Dec 12, 2024
dcddf5c
add documentation for overview.py
hannamlmv Dec 12, 2024
d30066d
mofify doc of overview.py
hannamlmv Dec 12, 2024
588bc57
Add datastore methods documentation
almanilsson Dec 12, 2024
454980e
Merge branch 'documentation' of https://github.com/hannamlmv/tseda in…
almanilsson Dec 12, 2024
3b1cddf
Move datastore methods
almanilsson Dec 12, 2024
1ca6a75
add documentation to structure.py
hannamlmv Dec 12, 2024
7e8b6c0
update overview.py docs
hannamlmv Dec 12, 2024
fd89c6f
reformat
hannamlmv Dec 12, 2024
8259339
update documentation
hannamlmv Dec 12, 2024
211f783
Change method order and add docstrings
almanilsson Dec 12, 2024
a8dd90a
Remove deprecated function color() in SampleSetsTable
almanilsson Dec 12, 2024
bd3e22c
Remove deprecated function names2id from SampleSetsTable
almanilsson Dec 12, 2024
a481909
Document SamplesetsTable
almanilsson Dec 12, 2024
f434258
doc: documentation for te ignn page
ThereseBjorkman Dec 12, 2024
5b37bba
doc: documentation for te ignn page reformated
ThereseBjorkman Dec 12, 2024
d0d28fa
doc: documentation for te ignn page reformated
ThereseBjorkman Dec 12, 2024
5a4af52
Update documentation for datastore
almanilsson Dec 12, 2024
e12f556
add documentation for tree page
hannamlmv Dec 12, 2024
0007cf9
doc: documentation for map.py
ThereseBjorkman Dec 12, 2024
712c926
Merge branch 'documentation' of https://github.com/hannamlmv/tseda in…
almanilsson Dec 12, 2024
5c3a52b
doc: documentation for map.py
ThereseBjorkman Dec 12, 2024
ca99d27
Add datastore module header
almanilsson Dec 12, 2024
d46d706
Merge branch 'documentation' of https://github.com/hannamlmv/tseda in…
almanilsson Dec 12, 2024
5aff4b3
Add documentation to individuals page
almanilsson Dec 12, 2024
a85b5ea
Add documentation statistics page
almanilsson Dec 12, 2024
15038a1
Update documentation datastore
almanilsson Dec 12, 2024
08b778d
Add documentation cache
almanilsson Dec 12, 2024
08ba2e4
Reformat cache
almanilsson Dec 12, 2024
1fc45d6
reformat
hannamlmv Dec 12, 2024
a600c36
doc: documentation for app.py
ThereseBjorkman Dec 12, 2024
4ea8834
fix order of imports
hannamlmv Dec 12, 2024
3d72ff0
reformat
hannamlmv Dec 12, 2024
a83673e
Reformat
almanilsson Dec 12, 2024
87f9536
Shorten docstrings
almanilsson Dec 12, 2024
32bdaf9
Fix linelength
almanilsson Dec 12, 2024
ea4675b
Reformat
almanilsson Dec 12, 2024
474b057
Fix linelength ignn
almanilsson Dec 12, 2024
078048b
Reformat
almanilsson Dec 12, 2024
700f6fc
Fix linelength app
almanilsson Dec 12, 2024
f4f5c91
Update pywrite ignore
almanilsson Dec 12, 2024
b02913e
Fix import error
almanilsson Dec 12, 2024
795c4ab
Merge pull request #118 from hannamlmv/documentation
hannamlmv Dec 18, 2024
45f4f73
change multiselect comparison dropdown
hannamlmv Dec 18, 2024
b6727bc
added descriptions
almanilsson Dec 19, 2024
3c39544
Merge branch 'main' of https://github.com/hannamlmv/tseda into refres…
almanilsson Dec 19, 2024
acadaf3
Reformat datastore
almanilsson Dec 19, 2024
f35f185
Fix documentation
almanilsson Dec 20, 2024
2939c61
Add create sample set button
almanilsson Dec 20, 2024
aa7c394
Merge pull request #125 from hannamlmv/comparisons_menu
hannamlmv Jan 10, 2025
42eea12
reformat
almanilsson Jan 14, 2025
f47c593
reformat
almanilsson Jan 14, 2025
c2891d4
Merge branch 'refresh-description' into create-set-button
almanilsson Jan 14, 2025
9b7d3f6
Merge pull request #127 from hannamlmv/refresh-description
almanilsson Jan 15, 2025
566c4d5
Merge pull request #126 from hannamlmv/create-set-button
almanilsson Jan 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: tseda serve",
"type": "debugpy",
"request": "launch",
"module": "tseda", // Use the module 'tseda' directly
"args": [
"serve", "tests/data/test.trees.tseda" // Arguments to the module
],
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}"
},
"justMyCode": true,
"python": "${workspaceFolder}/.venv/bin/python"
}
]
}

10 changes: 4 additions & 6 deletions src/tseda/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def cli():
),
)
def preprocess(tszip_path, output):
"""
Preprocess a tskit tree sequence or tszip file, producing a .tseda file.
"""Preprocess a tskit tree sequence or tszip file, producing a .tseda file.

Calls tsbrowse.preprocess.preprocess.
"""
tszip_path = pathlib.Path(tszip_path)
Expand Down Expand Up @@ -79,9 +79,7 @@ def preprocess(tszip_path, output):
help="Do not filter the output log (advanced debugging only)",
)
def serve(path, port, show, log_level, no_log_filter, admin):
"""
Run the tseda datastore server, version based on View base class.
"""
"""Run the tseda datastore server, version based on View base class."""
setup_logging(log_level, no_log_filter)

tsm = TSModel(path)
Expand All @@ -91,8 +89,8 @@ def serve(path, port, show, log_level, no_log_filter, admin):
app_ = app.DataStoreApp(
datastore=datastore.DataStore(
tsm=tsm,
individuals_table=individuals_table,
sample_sets_table=sample_sets_table,
individuals_table=individuals_table,
),
title="TSEda Datastore App",
views=[IndividualsTable],
Expand Down
56 changes: 39 additions & 17 deletions src/tseda/app.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Main application for tseda.

Provides the DataStoreApp class that is the main application for
tseda. The DataStoreApp subclasses the Viewer class from panel and
renders a panel.FastListTemplate object.
Provides the DataStoreApp class that is the main application for tseda. The
DataStoreApp subclasses the Viewer class from panel and renders a
panel.FastListTemplate object.
"""

import time
Expand All @@ -20,7 +20,7 @@

RAW_CSS = """
.sidenav#sidebar {
background-color: #15E3AC;
background-color: WhiteSmoke;
}
.title {
font-size: var(--type-ramp-plus-2-font-size);
Expand Down Expand Up @@ -50,7 +50,20 @@


class DataStoreApp(Viewer):
"""Main application class for tseda visualization app."""
"""Main application class for tseda visualization app.

Attributes:
datastore (DataStore): The data store instance for accessing and
managing data.
title (str): The title of the application.
views (List[str]): A list of views to show on startup.

Methods:
__init__(**params): Initializes the application, loads pages, and sets
up data update listeners.
view(): Creates the main application view, including a header selector
for switching between different pages.
"""

datastore = param.ClassSelector(class_=datastore.DataStore)

Expand All @@ -71,21 +84,28 @@ def __init__(self, **params):
logger.info(f"Initialised pages in {time.time() - t:.2f}s")

updating = (
self.datastore.individuals_table.data.rx.updating()
| self.datastore.sample_sets_table.data.rx.updating()
self.datastore.sample_sets_table.data.rx.updating()
| self.datastore.individuals_table.data.rx.updating()
)
updating.rx.watch(
lambda updating: pn.state.curdoc.hold()
if updating
else pn.state.curdoc.unhold()
lambda updating: (
pn.state.curdoc.hold()
if updating
else pn.state.curdoc.unhold()
)
)

@param.depends("views")
def view(self):
"""Main application view that renders a radio button group on
top with links to pages. Each page consists of a main content
page with plots and sidebars that provide user options for
configuring plots and outputs."""
"""Creates the main application view. Main application view that
renders a radio button group on top with links to pages. Each page
consists of a main content page with plots and sidebars that provide
user options for configuring plots and outputs.

Returns:
pn.template.FastListTemplate: A Panel template containing the
header selector, sidebar, and main content.
"""
page_titles = list(self.pages.keys())
header_selector = pn.widgets.RadioButtonGroup(
options=page_titles,
Expand All @@ -105,9 +125,11 @@ def get_sidebar(selected_page):
yield self.pages[selected_page].sidebar

self._template = pn.template.FastListTemplate(
title=self.datastore.tsm.name[:75] + "..."
if len(self.datastore.tsm.name) > 75
else self.datastore.tsm.name,
title=(
self.datastore.tsm.name[:75] + "..."
if len(self.datastore.tsm.name) > 75
else self.datastore.tsm.name
),
header=[header_selector],
sidebar=get_sidebar,
main=get_content,
Expand Down
12 changes: 11 additions & 1 deletion src/tseda/cache.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""This module provides a caching mechanism for the TSeDA application,
utilizing the `diskcache` library."""

import pathlib

import appdirs
Expand All @@ -7,7 +10,14 @@
logger = daiquiri.getLogger("cache")


def get_cache_dir():
def get_cache_dir() -> pathlib.Path:
"""Retrieves the user's cache directory for the TSeDA application. Creates
the directory if it doesn't exist, ensuring its creation along with any
necessary parent directories.

Returns:
pathlib.Path: The path to the cache directory.
"""
cache_dir = pathlib.Path(appdirs.user_cache_dir("tseda", "tseda"))
cache_dir.mkdir(exist_ok=True, parents=True)
return cache_dir
Expand Down
10 changes: 8 additions & 2 deletions src/tseda/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Config file.

This file stores configurations for the entire application such as figure
dimensions and color schemes.
"""

import holoviews as hv
from holoviews.plotting.util import process_cmap

Expand All @@ -8,9 +14,9 @@
PLOT_COLOURS = ["#15E3AC", "#0FA57E", "#0D5160"]

# VCard settings
SIDEBAR_BACKGROUND = "#15E3AC"
SIDEBAR_BACKGROUND = "#5CB85D"
VCARD_STYLE = {
"background": "#15E3AC",
"background": "WhiteSmoke",
}

# Global color map
Expand Down
Loading
Loading