Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.59.0 #1405

Merged
merged 10 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ With widgets, Streamlit allows you to bake interactivity directly into your apps
.. autofunction:: streamlit.date_input
.. autofunction:: streamlit.time_input
.. autofunction:: streamlit.file_uploader
.. autofunction:: streamlit.beta_color_picker
```

## Add widgets to sidebar
Expand Down
26 changes: 17 additions & 9 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ This page lists highlights, bug fixes, and known issues for official Streamlit r
$ pip install --upgrade streamlit
```

```eval_rst
.. contents::
:local:
:depth: 1
```
## Version 0.59.0

_Release date: May 05, 2020_

**Highlights:**

- 🎨 New color-picker widget! Use it with
[`st.beta_color_picker()`](https://docs.streamlit.io/api.html#streamlit.beta_color_picker)
- 🧪 Introducing `st.beta_*` and `st.experimental_*` function prefixes, for faster
Streamlit feature releases. See
[docs](https://docs.streamlit.io/pre_release_features.html) for more info.
- 📦 Improved `@st.cache` support for SQL Alchemy objects, CompiledFFI, PyTorch
Tensors, and `builtins.mappingproxy`.

## Version 0.58.0

Expand All @@ -42,7 +50,7 @@ _Release date: March 26, 2020_

- ⏲️ Ability to set expiration options for `@st.cache`'ed functions by setting
the `max_entries` and `ttl` arguments. See
[docs](https://docs.streamlit.io/api.html?highlight=cache#streamlit.cache).
[docs](https://docs.streamlit.io/api.html#streamlit.cache).
- 🆙 Improved the machinery behind `st.file_uploader`, so it's much more
performant now! Also increased the default upload limit to 200MB
(configurable via `server.max_upload_size`).
Expand Down Expand Up @@ -311,9 +319,9 @@ _Release date: July 28, 2019_

**Highlights:**

* ⚡ Lightning-fast reconnect when you do a ctrl-c/rerun on your Streamlit code
* 📣 Useful error messages when the connection fails
* 💎 Fixed multiple bugs and improved polish of our newly-released interactive widgets
- ⚡ Lightning-fast reconnect when you do a ctrl-c/rerun on your Streamlit code
- 📣 Useful error messages when the connection fails
- 💎 Fixed multiple bugs and improved polish of our newly-released interactive widgets

## Version 0.43.0

Expand Down
46 changes: 18 additions & 28 deletions docs/pre_release_features.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Try pre-release features

At Streamlit, we like to move quick while keeping things stable. In our latest effort to move even faster without sacrificing stability, we're offering our bold and fearless users two ways to try out our most bleeding edge features:
At Streamlit, we like to move quick while keeping things stable. In our latest effort to move even faster without sacrificing stability, we're offering our bold and fearless users two ways to try out Streamlit's most bleeding edge features:

1. [Nightly releases](#nightly-releases)
2. [Beta and experimental namespaces](#beta-and-experimental-namespaces)

## Nightly releases

At the end of each day (at night 🌛), our bots run automated tests against the latest Streamlit code and if everything looks good, it publishes them as the `streamlit-nightly` package. This means the nightly build includes our latest features, bug fixes, and other enhancements.
At the end of each day (at night 🌛), our bots run automated tests against the latest Streamlit code and, if everything looks good, it publishes them as the `streamlit-nightly` package. This means the nightly build includes all our latest features, bug fixes, and other enhancements on the same day they land on our codebase.

**How does this this differs from official releases?**
**How does this differ from official releases?**

Official Streamlit releases go through both automated and rigorous manual testing, while nightly releases only have automated tests. It's important to keep in mind that new features introduced in nightly releases often lack polish. In our official releases, we make sure all new features are ready for prime time.
Official Streamlit releases go not only through both automated tests but also rigorous manual testing, while nightly releases only have automated tests. It's important to keep in mind that new features introduced in nightly releases often lack polish. In our official releases, we always make double-sure all new features are ready for prime time.

**How do I use the nightly release?**
**How do I use the nightly release?**

All you need to do is install the `streamlit-nightly` package:

Expand All @@ -30,29 +30,31 @@ pip install streamlit-nightly --upgrade

**Why should I use the nightly release?**

Because you can't wait for official releases, and you want to help us find bugs early.
Because you can't wait for official releases, and you want to help us find bugs early!

**Why shouldn't I use the nightly release?**
**Why shouldn't I use the nightly release?**

While our automated tests have high coverage, there's still a significant likelihood that there will be some bugs in the code. If you encounter bugs, please create an [issue](https://github.com/streamlit/streamlit/issues/new/choose).
While our automated tests have high coverage, there's still a significant likelihood that there will be some bugs in the nightly code.

**Can I choose which nightly release I want to install?**

If you'd like to use a specific version, you can find the version number in our [Release history](https://pypi.org/project/streamlit-nightly/#history).
If you'd like to use a specific version, you can find the version number in our [Release history](https://pypi.org/project/streamlit-nightly/#history). Just specify the desired version using `pip` as usual: `pip install streamlit-nightly==x.yy.zz-123456`.

**Can I compare changes between releases?**

If you'd like to review the changes for a nightly release, you can use the [comparison tool on GitHub](https://github.com/streamlit/streamlit/compare/0.57.3...0.57.4.dev20200412).

## Beta and Experimental Namespaces

In addition to nightly releases, we're also introducing two new namespaces for Streamlit features: `st.beta` and `st.experimental`. Here's a quick rundown of what you get from each namespace:
In addition to nightly releases, we're also introducing two new namespaces for Streamlit features: `st.beta` and `st.experimental`. These are basically prefixes we attach to our function names to make sure their status is clear to everyone.

Here's a quick rundown of what you get from each namespace:

- **st**: this is where our core features like `st.write` and `st.dataframe` live. If we ever make backward-incompatible changes to these, they will take place gradually and with months of announcements and warnings.
- **st.beta**: this is where all new features land before they find their way to `st`. This gives you a chance to try the next big thing we're cooking up weeks or months before we're ready to stabilize its API.
- **st.experimental**: this is where we'll put features that may or may not ever make it into `st`. We don't know whether these features have a future, but we want you to have access to everything we're trying, and work with us to figure them out.

The main difference between `st.beta` and `st.experimental` is that beta features are expected to make it into the `st` namespace at some point soon, while experimental features may never make it.
The main difference between `st.beta` and `st.experimental` is that beta features are expected to make it into the `st` namespace at some point soon, while experimental features may never make it.

### Beta

Expand All @@ -61,19 +63,13 @@ Features in the beta namespace are all scheduled to become part of `st`, or core
**The lifecycle of a beta feature**

1. A feature is added to the beta namespace.
2. The feature's API stabilizes and the feature is *cloned* into the `st` namespace, so it exists in both st and `st.beta`. At this point, users will see a warning when using the version of the feature that lives in the beta namespace -- but the `st.beta` feature will still work.
3. The feature is *removed* from the `st.beta` namespace, but there will still be a stub in `st.beta` that shows an error with appropriate instructions.
4. The stub in `st.beta` is removed.

**Keeping up-to-date with beta features**

- Beta features are announced in the changelogs.
- Beta features show up in our documentation alongside normal features. For example, `st.beta.color_picker()` will be documented on the same page as `st.slider()`.
- We'll announce big feature releases in the Discuss forum.
2. The feature's API stabilizes and the feature is _cloned_ into the `st` namespace, so it exists in both st and `st.beta`. At this point, users will see a warning when using the version of the feature that lives in the beta namespace -- but the `st.beta` feature will still work.
3. At some point, the feature is _removed_ from the `st.beta` namespace, but there will still be a stub in `st.beta` that shows an error with appropriate instructions.
4. Finally, at a later date the stub in `st.beta` is removed.

### Experimental

Features in the experimental namespace are things that we're still working on or trying to understand. If these features are successful, at some point they'll become part of `st`, or core Streamlit, by moving to the `st.beta` namespace and then core `st`. If unsuccessful, these features are removed.
Features in the experimental namespace are things that we're still working on or trying to understand. If these features are successful, at some point they'll become part of core Streamlit, by moving to the `st.beta` namespace and then to `st`. If unsuccessful, these features are removed without much notice.

```eval_rst
.. warning::
Expand All @@ -87,10 +83,4 @@ Features in the experimental namespace are things that we're still working on or
2. The feature is potentially tweaked over time, with possible API/behavior breakages.
3. At some point, we either move the feature into `st.beta` or remove it from `st.experimental`. Either way, we leave a stub in `st.experimental` that shows an error with instructions.

**Keeping up-to-date with experimental features**

- Experimental features will be announced in the changelog.
- Experimental features will show up in a separate section of the API page in the docs, called experimental features.
- We'll announce big feature releases in the Discuss forum.

Let us know if you have any [questions or feedback](https://discuss.streamlit.io/) about the new namespaces!
Let us know if you have any [questions or feedback](https://discuss.streamlit.io/) about the new namespaces!
2 changes: 1 addition & 1 deletion docs/troubleshooting/sanity-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $ pip install --upgrade streamlit
$ streamlit version
```

...and then verify that the version number printed is `0.58.0`.
...and then verify that the version number printed is `0.59.0`.

**Try reproducing the issue now.** If not fixed, keep reading on.

Expand Down
4 changes: 2 additions & 2 deletions e2e/scripts/st_color_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import streamlit as st

c1 = st.beta.color_picker("Default Color")
c1 = st.beta_color_picker("Default Color")
st.write("Color 1", c1)

c2 = st.beta.color_picker("New Color", "#EB144C")
c2 = st.beta_color_picker("New Color", "#EB144C")
st.write("Color 2", c2)
2 changes: 1 addition & 1 deletion e2e/specs/st_color_picker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/// <reference types="cypress" />

describe("st.beta.color_picker", () => {
describe("st.beta_color_picker", () => {
before(() => {
cy.visit("http://localhost:3000/");
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "streamlit-browser",
"version": "0.58.0",
"version": "0.59.0",
"private": true,
"homepage": ".",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion lib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pipenv.utils import convert_deps_to_pip
from setuptools.command.install import install

VERSION = "0.58.0" # PEP-440
VERSION = "0.59.0" # PEP-440

NAME = "streamlit"

Expand Down
25 changes: 18 additions & 7 deletions lib/streamlit/DeltaGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _cursor(self):
def _get_coordinates(self):
"""Returns the element's 4-component location as string like "M.(1,2).3".

This function uniquely identifies the element's position in the front-end,
This function uniquely identifies the element's position in the front-end,
which allows (among other potential uses) the MediaFileManager to maintain
session-specific maps of MediaFile objects placed with their "coordinates".

Expand Down Expand Up @@ -2137,15 +2137,20 @@ def file_uploader(
return file_datas if accept_multiple_files else file_datas[0]

@_with_element
def color_picker(self, element, label, value=None, key=None):
def beta_color_picker(self, element, label, value=None, key=None):
"""Display a color picker widget.

Note: This is a beta feature. See
https://docs.streamlit.io/pre_release_features.html for more
information.

Parameters
----------
label : str
A short label explaining to the user what this input is for.
value : str or None
The hex value of this widget when it first renders. If None, the default color is black.
The hex value of this widget when it first renders. If None,
defaults to black.
key : str
An optional string to use as the unique key for the widget.
If this is omitted, a key will be generated for the widget
Expand All @@ -2155,11 +2160,11 @@ def color_picker(self, element, label, value=None, key=None):
Returns
-------
str
The current value of the color picker widget.
The selected color as a hex string.

Example
-------
>>> color = st.beta.color_picker('Pick A Color', '#00f900')
>>> color = st.beta_color_picker('Pick A Color', '#00f900')
>>> st.write('The current color is', color)

"""
Expand All @@ -2170,7 +2175,10 @@ def color_picker(self, element, label, value=None, key=None):
# make sure the value is a string
if not isinstance(value, str):
raise StreamlitAPIException(
"Color Picker Value has invalid type: %s. Expects a hex string like '#00FFAA' or '#000'."
"""
Color Picker Value has invalid type: %s. Expects a hex string
like '#00FFAA' or '#000'.
"""
% type(value).__name__
)

Expand All @@ -2179,7 +2187,10 @@ def color_picker(self, element, label, value=None, key=None):

if not match:
raise StreamlitAPIException(
"'%s' is not a valid hex code for colors. Valid ones are like '#00FFAA' or '#000'."
"""
'%s' is not a valid hex code for colors. Valid ones are like
'#00FFAA' or '#000'.
"""
% value
)

Expand Down
Loading