Skip to content

[test] Simplify st.audio_input test app#12541

Merged
sfc-gh-nbellante merged 2 commits intographite-base/12541from
simplify-test-app
Sep 22, 2025
Merged

[test] Simplify st.audio_input test app#12541
sfc-gh-nbellante merged 2 commits intographite-base/12541from
simplify-test-app

Conversation

@sfc-gh-nbellante
Copy link
Copy Markdown
Contributor

@sfc-gh-nbellante sfc-gh-nbellante commented Sep 16, 2025

Describe your changes

This PR focuses on cleaning up the test streamlit app for st.audio_input to be more straightforward and easier to maintain.


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Sep 16, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 16, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12541/streamlit-1.49.1-py3-none-any.whl
🕹️ Preview app pr-12541.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Copy Markdown
Contributor Author

sfc-gh-nbellante commented Sep 16, 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 16, 2025

📉 Frontend coverage change detected

The frontend unit test (vitest) coverage has decreased by 0.0300%

  • Current PR: 84.9200% (47604 lines, 7174 missed)
  • Latest develop: 84.9500% (47587 lines, 7160 missed)

💡 Consider adding more unit tests to maintain or improve coverage.

📊 View detailed coverage comparison

@sfc-gh-nbellante sfc-gh-nbellante changed the base branch from remove-problematic-waits to graphite-base/12541 September 16, 2025 17:18
@sfc-gh-nbellante sfc-gh-nbellante changed the base branch from graphite-base/12541 to remove-problematic-waits September 16, 2025 18:44
@sfc-gh-nbellante sfc-gh-nbellante changed the title [test] Simplify audio input test app from 183 to 107 lines [test] Simplify audio input test app Sep 16, 2025
@sfc-gh-nbellante sfc-gh-nbellante changed the title [test] Simplify audio input test app [test] Simplify st.audio_input test app Sep 16, 2025
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the remove-problematic-waits branch 2 times, most recently from 0e0fb7d to 8f07a70 Compare September 18, 2025 18:08
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the simplify-test-app branch 2 times, most recently from d4b6e04 to 018ba0b Compare September 19, 2025 17:40
Remove redundant and over-engineered features while keeping essential test coverage:
- Removed duplicate WAV analysis displays
- Removed verbose function wrappers
- Kept essential test scenarios: forms, fragments, callbacks, remount, sample rates
- Maintained all critical test assertions
@sfc-gh-nbellante sfc-gh-nbellante changed the base branch from remove-problematic-waits to graphite-base/12541 September 19, 2025 21:04
@sfc-gh-nbellante sfc-gh-nbellante marked this pull request as ready for review September 19, 2025 21:10
Comment on lines +66 to +67
def on_change():
st.session_state.audio_input_changed = True
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The on_change function lacks a docstring. Python Guide docstring requirements mandate Numpydoc style docstrings for functions. Since this callback function is used with st.audio_input and may be accessed by users, add a docstring explaining its purpose:

def on_change():
    """Callback function to set a flag when audio input changes."""
    st.session_state.audio_input_changed = True
Suggested change
def on_change():
st.session_state.audio_input_changed = True
def on_change():
"""Callback function to set a flag when audio input changes."""
st.session_state.audio_input_changed = True

Spotted by Diamond (based on custom rule: Python Guide)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@sfc-gh-nbellante sfc-gh-nbellante merged this pull request into graphite-base/12541 Sep 22, 2025
68 of 82 checks passed
@sfc-gh-nbellante sfc-gh-nbellante deleted the simplify-test-app branch September 22, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:chore PR contains maintenance or housekeeping change impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants