Coverage for .tox/p311/lib/python3.11/site-packages/scicom/interface.py: 0%

1"""Solara interface for all simulations."""

2 from pathlib import Path

3

4 import solara

5

6 from scicom.historicalletters.interface import page as historical_letters_page

7 from scicom.knowledgespread.interface import page as knowledgespread_page

8

9

10@solara.component

11 def Home():

12 # load about markdown file in the same directory

13 with Path.open(Path(Path(__file__).parent.parent.parent.resolve(), "README.md")) as readmefile:

14 return solara.Markdown("\n".join(readmefile.readlines()))

15

16

17@solara.component

18 def historicalletters():

19 return historical_letters_page

20

21

22@solara.component

23 def knowledgespread():

24 return knowledgespread_page

25

26

27 routes = [

28 solara.Route(path="/", component=Home, label="Simulation methods"),

29 solara.Route(

30 path="historicalletters", component=historicalletters, label="Historical Letters",

31 ),

32 solara.Route(

33 path="knowledgespread",

34 component=knowledgespread,

35 label="Knowledge Spread",

36 ),

37]