Skip to content

Commit

Permalink
feat(streamlit): add live line chart (#14923)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao committed Feb 26, 2024
1 parent d2db801 commit b05cbc3
Show file tree
Hide file tree
Showing 10 changed files with 1,475 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/.static-type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ jobs:
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.classify-mnist
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.predict-diabetes
poetry run poe static-type-check-python -- --package=machine-learning.hm-rasa
poetry run poe static-type-check-python -- --package=machine-learning.hm-streamlit.applications.live-line-chart
poetry run poe static-type-check-python -- --package=machine-learning.hm-streamlit.applications.map
poetry run poe static-type-check-python -- --package=machine-learning.hm-supervision.detect-objects
poetry run poe static-type-check-python -- --package=machine-learning.hugging-face
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
national-instruments-hm-pyvisa: ${{ steps.filter.outputs.national-instruments-hm-pyvisa }}
national-instruments-hm-tdms: ${{ steps.filter.outputs.national-instruments-hm-tdms }}
hm-gradio-classify-image: ${{ steps.filter.outputs.hm-gradio-classify-image }}
hm-streamlit-live-line-chart: ${{ steps.filter.outputs.hm-streamlit-live-line-chart }}
hm-streamlit-map: ${{ steps.filter.outputs.hm-streamlit-map }}
hm-kubeflow-calculate: ${{ steps.filter.outputs.hm-kubeflow-calculate }}
hm-kubeflow-classify-mnist: ${{ steps.filter.outputs.hm-kubeflow-classify-mnist }}
Expand Down Expand Up @@ -236,6 +237,9 @@ jobs:
hm-spark-recommend-movies:
- '.github/workflows/test.yml'
- 'data-processing/hm-spark/applications/recommend-movies/**'
hm-streamlit-live-line-chart:
- '.github/workflows/test.yml'
- 'machine-learning/hm-streamlit/applications/live-line-chart/**'
hm-streamlit-map:
- '.github/workflows/test.yml'
- 'machine-learning/hm-streamlit/applications/map/**'
Expand Down Expand Up @@ -1136,6 +1140,38 @@ jobs:
with:
directory: machine-learning/hm-gradio/applications/classify-image

streamlit-live-line-chart:
name: Streamlit (live-line-chart) | Test
needs: detect-changes
if: ${{ needs.detect-changes.outputs.hm-streamlit-live-line-chart == 'true' }}
runs-on: ubuntu-22.04
environment: test
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version-file: machine-learning/hm-streamlit/applications/live-line-chart/pyproject.toml
cache: poetry
cache-dependency-path: machine-learning/hm-streamlit/applications/live-line-chart/poetry.lock
- name: Install dependencies
working-directory: machine-learning/hm-streamlit/applications/live-line-chart
run: |
poetry install --no-root
- name: Test
working-directory: machine-learning/hm-streamlit/applications/live-line-chart
run: |
poetry run poe test-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.2
with:
directory: machine-learning/hm-streamlit/applications/live-line-chart

streamlit-map:
name: Streamlit (map) | Test
needs: detect-changes
Expand Down
3 changes: 3 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ pull_request_rules:
- or:
- check-success=Gradio (classify-image) | Test
- check-skipped=Gradio (classify-image) | Test
- or:
- check-success=Streamlit (live-line-chart) | Test
- check-skipped=Streamlit (live-line-chart) | Test
- or:
- check-success=Streamlit (map) | Test
- check-skipped=Streamlit (map) | Test
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ static-type-check-python:
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.classify-mnist
poetry run poe static-type-check-python -- --package=machine-learning.hm-mlflow.experiments.predict-diabetes
poetry run poe static-type-check-python -- --package=machine-learning.hm-rasa
poetry run poe static-type-check-python -- --package=machine-learning.hm-streamlit.applications.live-line-chart
poetry run poe static-type-check-python -- --package=machine-learning.hm-streamlit.applications.map
poetry run poe static-type-check-python -- --package=machine-learning.hm-supervision.detect-objects
poetry run poe static-type-check-python -- --package=machine-learning.hugging-face
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
poetry-env-use:
poetry env use python3.12
poetry-update-lock-file:
poetry lock --no-update
poetry-install:
poetry install --no-root

poetry-run-dev:
poetry run poe dev
poetry-run-test:
poetry run poe test
poetry-run-test-coverage:
poetry run poe test-coverage

0 comments on commit b05cbc3

Please sign in to comment.