Skip to content

Support cli parameters (#186)#2

Merged
sthagen merged 1 commit intosthagen:developfrom
streamlit:develop
Oct 8, 2019
Merged

Support cli parameters (#186)#2
sthagen merged 1 commit intosthagen:developfrom
streamlit:develop

Conversation

@sthagen
Copy link
Copy Markdown
Owner

@sthagen sthagen commented Oct 8, 2019

  • add all existing config options as click cmd param options

  • add description and deprecation notice to config param options

  • adds type to ConfigOptions to properly type cast the cmd option params

  • lint

  • lint

  • display config option keys --help in the same order they were created

  • adds test to compose_option_parameter for cli cmd config options

  • lint

  • lint

  • moved logic to parse config options out of main_run

  • lint

  • fix tests for cli config option params on py2.7

Issue: Please include a link to the issue you're addressing. If no issue exists, create one first and then link it here.

Description: Describe the changes you made to the code, so it's easier for the reader to navigate your pull request. Usually this is a bullet list.


Contribution License Agreement

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

* add all existing config options as click cmd param options

* add description and deprecation notice to config param options

* adds type to ConfigOptions to properly type cast the cmd option params

* lint

* lint

* display config option keys --help in the same order they were created

* adds test to compose_option_parameter for cli cmd config options

* lint

* lint

* moved logic to parse config options out of main_run

* lint

* fix tests for cli config option params on py2.7
@sthagen sthagen merged commit 28c749d into sthagen:develop Oct 8, 2019
sthagen pushed a commit that referenced this pull request Dec 12, 2024
Make st.write use st.html when _repr_html_ is present.

## Describe your changes

1. When `_repr_html_()` is present in an object, `st.write` now displays
the HTML using `st.html()` rather than `st.markdown()` (assuming
`unsafe_allow_html=True`).

1. When `unsafe_allow_html=False` AND `_repr_html_()` did not contain
HTML tags we used to send its output to `st.markdown()`. This behavior
is now removed. Instead, the output is handled with `st.help()` like any
other object.

1. Removes `_repr_html_()` from `*Connection` objects. This wasn't
really buying us anything, and was just weird. Also, this was the reason
for adding behavior #2 in the first place.

1. This is totally unrelated to the above, but is so small I didn't want
to create a separate PR for it (though, LMK if you want me to!): Remove
an old check for an environment variable that Streamlit's Atom plugin
from 2018-19 used to depend on. That plugin no longer exists, so we can
safely remove this.


## GitHub Issue Link (if applicable)
n/a

## Testing Plan

- ~~Explanation of why no additional tests are needed~~
- Unit Tests (JS and/or Python): ✅ Included!
- E2E Tests: 🟢  No new tests added, but this is already well-tested.
- Any manual testing needed? 👎 No need.

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants