Skip to content

Commit

Permalink
Merge pull request #44 from andrewm4894/test-pre-commit-pr
Browse files Browse the repository at this point in the history
make streamlit use wide mode
  • Loading branch information
andrewm4894 authored Nov 14, 2023
2 parents 1628048 + 68a4bdc commit c898c72
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
body: |
:x: **pre-commit** failed.
Please run `pre-commit run --all-files` locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md
Find more information in the repository's CONTRIBUTING.md
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,3 @@ repos:
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
args: ["--ignore", "E501, E711, E712"] # ignore line length and comparison to None, refer full list of codes here: https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
- id: ruff-format
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SHELL=/bin/bash
.PHONY: dashboard
.PHONY: local
.PHONY: docker
.PHONY: pre-commit

## start streamlit dashboard
dashboard:
Expand All @@ -16,11 +17,14 @@ local:
docker:
docker compose up -d --build

## pre-commit
pre-commit:
pre-commit run --all-files

## setup local development environment and install dependencies
dev:
pre-commit install


# Self-documenting Makefiles:
# https://gist.github.com/klmr/575726c7e05d8780505a
.DEFAULT_GOAL := show-help
Expand Down
3 changes: 3 additions & 0 deletions dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

load_dotenv()

st.set_page_config(layout="wide")


def plot_time_series(df, metric_name) -> go.Figure:
"""
Expand Down Expand Up @@ -61,6 +63,7 @@ def plot_time_series(df, metric_name) -> go.Figure:
title_text=f"{metric_name} (n={len(df)})",
hovermode="x",
legend=dict(orientation="h", yanchor="bottom", y=1.02, xanchor="right", x=1),
autosize=True,
)

return fig
Expand Down
1 change: 0 additions & 1 deletion metrics/examples/hackernews/hn_top_stories_scores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ alert_always: False
alert_methods: "email"
ingest_fn: >
{% include "./examples/hackernews/hn_top_stories_scores.py" %}
1 change: 0 additions & 1 deletion metrics/examples/netdata/netdata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ alert_always: False
alert_methods: "email"
ingest_fn: >
{% include "./examples/netdata/netdata.py" %}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ train_cron_schedule: "*/4 * * * *"
score_cron_schedule: "*/3 * * * *"
ingest_fn: >
{% include "./examples/python/python_ingest_simple/ingest.py" %}
1 change: 0 additions & 1 deletion metrics/examples/weather/weather.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ alert_always: False
alert_methods: "email"
ingest_fn: >
{% include "./examples/weather/ingest_weather.py" %}
1 change: 0 additions & 1 deletion metrics/examples/weather_forecast/weather_forecast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ alert_always: False
alert_methods: "email"
ingest_sql: >
{% include "./examples/weather_forecast/weather_forecast.sql" %}
1 change: 0 additions & 1 deletion metrics/examples/yfinance/yfinance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ alert_always: False
alert_methods: "email"
ingest_fn: >
{% include "./examples/yfinance/yfinance.py" %}

0 comments on commit c898c72

Please sign in to comment.