add-chart
/add-chart
Dodaje do panelu Streamlit filtr, metrykę, wykres lub tabelę wraz z funkcją pakietu, testem jednostkowym i przypadkiem AppTest.
- Autor
- steamfield ↗
- Repozytorium
- stacks ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 08.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 08.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Dodaje do panelu Streamlit filtr, metrykę, wykres lub tabelę wraz z funkcją pakietu, testem jednostkowym i przypadkiem AppTest.
Oryginalny opis (EN)
Add a filter, metric, chart or table to this Streamlit page, with the package function behind it, its unit test and an AppTest case. Use when the user asks for a new widget, KPI, breakdown, chart or view of the data on the dashboard.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 12 linii, 194 słów
Podgląd SKILL.md
--- name: add-chart description: Add a filter, metric, chart or table to this Streamlit page, with the package function behind it, its unit test and an AppTest case. Use when the user asks for a new widget, KPI, breakdown, chart or view of the data on the dashboard. --- # Add a filter, metric or chart `metrics.revenue_by_month`, `charts.revenue_chart` and the region filter in `app.py` are the models. Read them and `docs/ARCHITECTURE.md` first. 1. Write the calculation as a pure function in `src/<package>/metrics.py`: a `pl.DataFrame` in, a frame or a value out, no Streamlit import. A new filter adds a field to `Filters` (empty means no filter) and a condition in `apply_filters`. 2. A chart is a function in `charts.py` that takes the metric's frame and returns an Altair chart; titles and tooltips live there. 3. Unit test both: `tests/test_metrics.py` with a small inline frame and `assert_frame_equal` or exact values worked out by hand, and `tests/test_charts.py` on `chart.to_dict()` (mark, fields, aggregate). 4. In `app.py`, add the widget with an explicit `key` (in `st.sidebar` for filters), call the package function and draw the result with `st.metric`, `st.altair_chart(..., width="stretch")` or `st.dataframe`. If it is slow, cache it with `st.cache_data`. 5. In `tests/test_app.py`, set the widget by key (`page.multiselect(key=...).select(...).run()`) and assert what the page shows changes to the hand-worked value, with `assert not page.exception`. Use `data/sample.csv`; add rows there only with their expected values updated in every test that counts them. 6. Run `make lint typecheck coverage`.
Wersje
W bazie nie ma innych skilli o nazwie add-chart.
Migawka bazy z 13.11.2026 · wersja paczki 843520001689 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 96admin-dashboard-widget
Dodaje do pulpitu panelu kartę, wskaźnik KPI, wykres lub tabelę dla wybranego modułu. - 100using-streamlit-session-state
Zarządza stanem między przeładowaniami Streamlit przez st.session_state: inicjalizacja, stan widżetów, callbacki i błędy stanu. - 100using-streamlit-cli
Opisuje polecenia Streamlit CLI do uruchamiania aplikacji, zarządzania konfiguracją i diagnostyki, gdy pojawiają się problemy z CLI. - 100developing-with-streamlit
Pomaga tworzyć, poprawiać i wdrażać aplikacje Streamlit z motywami, stylami i komponentami, zgodnie z dokumentacją zainstalowanej wersji. - 100generating-changelog
Przygotowuje notatki wydania dla strony docs.streamlit.io na podstawie zmian między dwoma tagami git. - 100sap-fiori-analytical-chart
Dodaje do List Report aplikacji Fiori Elements sekcję analityczną, łączącą wykres z tabelą na zagregowanych danych w OData V4.