Skip to content

Commit

Permalink
Merge pull request #9 from theeldermillenial/feature/cardano-token-re…
Browse files Browse the repository at this point in the history
…gistry

feat(token-registry): initial page design
  • Loading branch information
adagora authored Dec 1, 2023
2 parents 1009c15 + be3b5d6 commit 1c84e90
Show file tree
Hide file tree
Showing 2,262 changed files with 127,069 additions and 124 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# What are benefits of using solara and why choose solara for next app?

- Define your UI based on the state/data (declarative, like ReactJS)Auto re-executes what is needed (reactive, like Excel)
- Reusability / encapsulation (components)
- you can write new ones using the underlying library (ipyvuetify)
- you can use html/css/js/vue/react to write your own widgets if needed
- Together they make it possible to take on larger projects and don't get stuck.
- it's nice to be able to just call the python functions you want to use instead of going through REST api's etc.

# Install locally

```
pip install -e .
```
Expand All @@ -14,12 +24,10 @@ $ solara run solarathon.pages

[Get your Ploomber API key](https://docs.cloud.ploomber.io/en/latest/quickstart/apikey.html) and set it as `PLOOMBER_CLOUD_KEY` in GitHub (under Settings->Secrets and Variables->Actions, and click "New repository secret")


## Do only once

* [Sign up for Ploomber](https://www.platform.ploomber.io/register/)
* [Get the API key](https://docs.cloud.ploomber.io/en/latest/quickstart/apikey.html) from [The Ploomber dashboard](https://platform.ploomber.io/)

- [Sign up for Ploomber](https://www.platform.ploomber.io/register/)
- [Get the API key](https://docs.cloud.ploomber.io/en/latest/quickstart/apikey.html) from [The Ploomber dashboard](https://platform.ploomber.io/)

```
$ ploomber-cloud key YOURKEY
Expand All @@ -30,18 +38,18 @@ $ git commit -m "ci: set ploomber id"
$ git push origin master:ploomber
```


## Run to deploy a new version

```
$ git push origin master:ploomber
# add --force if needed
```

# Other resources

* [Wanderlust app](https://github.com/widgetti/wanderlust)
* [Solara website](https://github.com/widgetti/solara/tree/master/solara/website)
* [Solara examples](https://solara.dev/examples)
- [Wanderlust app](https://github.com/widgetti/wanderlust)
- [Solara website](https://github.com/widgetti/solara/tree/master/solara/website)
- [Solara examples](https://solara.dev/examples)

# Deploy manually

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dev = [
"pydantic",
"yfinance",
"mplfinance",
"pandas_ta"
"pandas_ta",
]

[tool.hatch.build]
Expand Down
28 changes: 6 additions & 22 deletions solarathon/pages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,20 @@

# in case you want to override the default order of the tabs
# route_order = ["/", "settings", "chat", "clickbutton", "technicalanaly", "dashboard"]
route_order = ["/", "overview", "analyze"]
route_order = ["/", "overview", "analyze", "tokenregistry"]


@solara.component
def Page():
with solara.Column(style={"padding-top": "30px"}):
solara.Title("Solarathon example project")
# Calculate word_count within the component to ensure re-execution when reactive variables change.
word_count = len(sentence.value.split())
solara.Title("Solarathon Hackathon Team 4")
solara.Markdown(r'''
# Welcome to the Solarathon Hackathon!
solara.SliderInt("Word limit", value=word_limit, min=2, max=20)
solara.InputText(label="Your sentence", value=sentence, continuous_update=True)

# Display messages based on the current word count and word limit.
if word_count >= int(word_limit.value):
solara.Error(
f"With {word_count} words, you passed the word limit of {word_limit.value}."
)
elif word_count >= int(0.8 * word_limit.value):
solara.Warning(
f"With {word_count} words, you are close to the word limit of {word_limit.value}."
)
else:
solara.Success("Great short writing!")

solara.Markdown(
"*First exercise*: remove this text and write your own sentence."
## Application can be used for research and making financial decisions
'''
)


@solara.component
def Layout(children):
# this is the default layout, but you can override it here, for instance some extra padding
Expand Down
68 changes: 0 additions & 68 deletions solarathon/pages/chat.py

This file was deleted.

15 changes: 0 additions & 15 deletions solarathon/pages/clickbutton.py

This file was deleted.

2 changes: 1 addition & 1 deletion solarathon/pages/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,4 +363,4 @@ def get_data_for_symbol(symbol, coingecko_list):
for coin in coingecko_list:
if coin.get("symbol") == symbol:
return coin
return None
return None
9 changes: 0 additions & 9 deletions solarathon/pages/settings.py

This file was deleted.

Loading

0 comments on commit 1c84e90

Please sign in to comment.