Skip to content

Commit

Permalink
Rename/report2app (streamlit#126)
Browse files Browse the repository at this point in the history
* Using app instead of report

* Using app instead of report

* Using app instead of report

* lowercase
  • Loading branch information
arraydude authored Sep 18, 2019
1 parent 86df5a4 commit c377908
Show file tree
Hide file tree
Showing 30 changed files with 316 additions and 284 deletions.
24 changes: 11 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ on this below).

## File and folder structure

* `conf.py` This is Sphinx's configuration file.
* `_build/` This is where the generated documentation goes.
* `_ext/` This is where custom extensions to ReStructuredText are placed.
* `_templates/` Not used right now, but if we ever decide to use custom
- `conf.py` This is Sphinx's configuration file.
- `_build/` This is where the generated documentation goes.
- `_ext/` This is where custom extensions to ReStructuredText are placed.
- `_templates/` Not used right now, but if we ever decide to use custom
templates, this is where they should go.
* `_static/` Not used right now, but if we ever decide to use custom
- `_static/` Not used right now, but if we ever decide to use custom
templates, this is where their static files (CSS, etc) should go.

## Building
Expand All @@ -41,7 +41,6 @@ $ make devel-docs
The docs will be viewable at http://localhost:8000. **Note that any time you
modify the source files you'll need to manually rebuild the docs.**


## Publishing

To publish the docs into our public site, **go to the folder above this one**
Expand Down Expand Up @@ -69,17 +68,16 @@ This is used often in our documentation in order to do things like generating
our table of contents and automatically generating documentation for our Python
modules.


## Embedding Streamlit reports
## Embedding Streamlit apps

It's a good idea to make sure our docs have plenty of example code and their
results. Rather than showing the results using a boring static image, you can
embed a Streamlit report right in the documentation. To do this, just use our
results. Rather than showing the results using a boring static image, you can
embed a Streamlit app right in the documentation. To do this, just use our
custom directive, called `output`:

```rst
.. output::
[URL to Streamlit report]
[URL to Streamlit app]
[inline styles to pass to the <iframe> tag]
```

Expand Down Expand Up @@ -110,9 +108,9 @@ files. To use it in Markdown files, though, you need to do the following:

An this is Markdown again.

### Location of embedded report source files
### Location of embedded app source files

Before we can use `.. output::` to embed a Streamlit report in some doc, we
Before we can use `.. output::` to embed a Streamlit app in some doc, we
first need to create a Streamlit-powered Python script, run it, share it, and
take note of its shared URL. To make these scripts easier to find, we place
them in the same folder as the file that references them, and name them using
Expand Down
4 changes: 2 additions & 2 deletions docs/_ext/stoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class StOutput(Directive):
"""Insert Streamlit report into HTML doc.
"""Insert Streamlit app into HTML doc.
The first argument is a URL to be iframed, and the second argument
(optional) is a string of inline styles to assign to the iframe.
Expand Down Expand Up @@ -52,7 +52,7 @@ def run(self):
"
></iframe>
<sup><a href="%(src)s" target="_blank">
(view standalone Streamlit report)
(view standalone Streamlit app)
</a></sup>
"""
% {"src": src, "additional_styles": additional_styles},
Expand Down
20 changes: 10 additions & 10 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ this API reference.

## Display text

Streamlit reports usually start with a call to `st.title` to set the
report's title. After that, there are 2 heading levels you can use:
Streamlit apps usually start with a call to `st.title` to set the
app's title. After that, there are 2 heading levels you can use:
`st.header` and `st.subheader`.

Pure text is entered with `st.text`, and Markdown with
Expand Down Expand Up @@ -81,7 +81,7 @@ like `st.line_chart` and `st.area_chart`.

## Display interactive widgets

With widgets, Streamlit allows you to bake interactivity directly into your reports with buttons, sliders, text inputs, and more.
With widgets, Streamlit allows you to bake interactivity directly into your apps with buttons, sliders, text inputs, and more.

```eval_rst
.. autofunction:: streamlit.button
Expand All @@ -97,7 +97,7 @@ With widgets, Streamlit allows you to bake interactivity directly into your repo

## Display code

Sometimes you want your Streamlit report to contain _both_ your usual
Sometimes you want your Streamlit app to contain _both_ your usual
Streamlit graphic elements _and_ the code that generated those elements.
That's where `st.echo()` comes in.

Expand All @@ -106,8 +106,8 @@ That's where `st.echo()` comes in.
```

Ok so let's say you have the following file, and you want to make its
report a little bit more self-explanatory by making that middle section
visible in the Streamlit report:
app a little bit more self-explanatory by making that middle section
visible in the Streamlit app:

```python
import streamlit as st
Expand All @@ -134,11 +134,11 @@ foo = 'bar'
st.write('Done!')
```

The file above creates a Streamlit report containing the words "Hi there,
The file above creates a Streamlit app containing the words "Hi there,
`John`", and then "Done!".

Now let's use `st.echo()` to make that middle section of the code visible
in the report:
in the app:

```python
import streamlit as st
Expand Down Expand Up @@ -174,7 +174,7 @@ It's _that_ simple!
## Display progress and status

Streamlit provides a few methods that allow you to add animation to your
reports. These animations include progress bars, status messages (like
apps. These animations include progress bars, status messages (like
warnings), and celebratory balloons.

```eval_rst
Expand All @@ -191,7 +191,7 @@ warnings), and celebratory balloons.
## Placeholders, help, and options

There are a handful of methods that allow you to create placeholders in your
report, provide help using doc strings, and get and modify configuration options.
app, provide help using doc strings, and get and modify configuration options.

```eval_rst
.. autofunction:: streamlit.empty
Expand Down
75 changes: 41 additions & 34 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
```eval_rst
:tocdepth: 1
```

# Changelog

See highlights, bug fixes, and known issues for Streamlit releases:
Expand Down Expand Up @@ -28,22 +29,24 @@ See highlights, bug fixes, and known issues for Streamlit releases:
```

## Version 0.45.0
*Release date: August 28, 2019*

_Release date: August 28, 2019_

**Highlights:**

* 😱 Experimental support for *sidebar*! Let us know if you want to be a beta
- 😱 Experimental support for _sidebar_! Let us know if you want to be a beta
tester.
* 🎁 Completely redesigned `st.cache`! Much more performant, has a cleaner API,
- 🎁 Completely redesigned `st.cache`! Much more performant, has a cleaner API,
support for caching functions called by `@st.cached` functions,
user-friendly error messages, and much more!
* 🖼️ Lightning fast `st.image`, ability to choose between JPEG and PNG
- 🖼️ Lightning fast `st.image`, ability to choose between JPEG and PNG
compression, and between RGB and BGR (for OpenCV).
* 💡 Smarter API for `st.slider`, `st.selectbox`, and `st.radio`.
* 🤖 Automatically fixes the Matplotlib backend -- no need to edit .matplotlibrc
- 💡 Smarter API for `st.slider`, `st.selectbox`, and `st.radio`.
- 🤖 Automatically fixes the Matplotlib backend -- no need to edit .matplotlibrc

## Version 0.44.0
*Release date: July 28, 2019*

_Release date: July 28, 2019_

**Highlights:**

Expand All @@ -52,57 +55,61 @@ See highlights, bug fixes, and known issues for Streamlit releases:
• 💎 Fixed multiple bugs and improved polish of our newly-released interactive widgets

## Version 0.43.0
*Release date: July 9, 2019*

_Release date: July 9, 2019_

**Highlights:**

* ⚡ Support for interactive widgets! 🎈🎉
- ⚡ Support for interactive widgets! 🎈🎉

## Version 0.42.0
*Release date: July 1, 2019*

_Release date: July 1, 2019_

**Highlights:**

* 💾 Ability to save Vega-Lite and Altair charts to SVG or PNG
* 🐇 We now cache JS files in your browser for faster loading
* ⛔ Improvements to error-handling inside Streamlit reports
- 💾 Ability to save Vega-Lite and Altair charts to SVG or PNG
- 🐇 We now cache JS files in your browser for faster loading
- ⛔ Improvements to error-handling inside Streamlit apps

## Version 0.41.0
*Release date: June 24, 2019*

_Release date: June 24, 2019_

**Highlights:**

* 📈 Greatly improved our support for named datasets in Vega-Lite and Altair
* 🙄 Added ability to ignore certain folders when watching for file changes. See the `server.folderWatchBlacklist` config option.
* ☔ More robust against syntax errors on the user's script and imported modules
- 📈 Greatly improved our support for named datasets in Vega-Lite and Altair
- 🙄 Added ability to ignore certain folders when watching for file changes. See the `server.folderWatchBlacklist` config option.
- ☔ More robust against syntax errors on the user's script and imported modules

## Version 0.40.0
*Release date: June 10, 2019*

_Release date: June 10, 2019_

**Highlights:**

* Streamlit is more than 10x faster. Just save and watch your analyses update instantly.
* We changed how you run Streamlit reports:
- Streamlit is more than 10x faster. Just save and watch your analyses update instantly.
- We changed how you run Streamlit apps:
`$ streamlit run your_script.py [script args]`
* Unlike the previous versions of Streamlit, `streamlit run [script] [script args]` creates a server (now you don't need to worry if the proxy is up). To kill the server, all you need to do is hit **Ctrl+c**.
- Unlike the previous versions of Streamlit, `streamlit run [script] [script args]` creates a server (now you don't need to worry if the proxy is up). To kill the server, all you need to do is hit **Ctrl+c**.

**Why is this so much faster?**

Now, Streamlit keeps a single Python session running until you kill the server. This means that Streamlit can re-run your code without kicking off a new process; imported libraries are cached to memory. An added bonus is that `st.cache` now caches to memory instead of to disk.

**What happens if I run Streamlit the old way?**

If you run `$ python your_script.py` the script will execute from top to bottom, but won't produce a Streamlit report.
If you run `$ python your_script.py` the script will execute from top to bottom, but won't produce a Streamlit app.

**What are the limitations of the new architecture?**

* To switch Streamlit reports, first you have to kill the Streamlit server with **Ctrl-c**. Then, you can use `streamlit run` to generate the next report.
* Streamlit only works when used inside Python files, not interactively from the Python REPL.
- To switch Streamlit apps, first you have to kill the Streamlit server with **Ctrl-c**. Then, you can use `streamlit run` to generate the next app.
- Streamlit only works when used inside Python files, not interactively from the Python REPL.

**What else do I need to know?**

* The strings we print to the command line when **liveSave** is on have been cleaned up. You may need to adjust any RegEx that depends on those.
* A number of config options have been renamed:
- The strings we print to the command line when **liveSave** is on have been cleaned up. You may need to adjust any RegEx that depends on those.
- A number of config options have been renamed:

```eval_rst
.. csv-table::
Expand Down Expand Up @@ -143,20 +150,20 @@ Thank you for staying with us on this journey! This version of Streamlit lays th

## Version 0.36.0

*Release date: May 03, 2019*
_Release date: May 03, 2019_

**Highlights**

* 🚣‍♀️ `st.progress()` now also accepts floats from 0.0–1.0
* 🤯 Improved rendering of long headers in DataFrames
* 🔐 Shared reports now default to HTTPS
- 🚣‍♀️ `st.progress()` now also accepts floats from 0.0–1.0
- 🤯 Improved rendering of long headers in DataFrames
- 🔐 Shared apps now default to HTTPS

## Version 0.35.0

*Release date: April 26, 2019*
_Release date: April 26, 2019_

**Highlights**

* 📷 Bokeh support! Check out docs for `st.bokeh_chart`
* ⚡️ Improved the size and load time of saved reports
* ⚾️ Implemented better error-catching throughout the codebase
- 📷 Bokeh support! Check out docs for `st.bokeh_chart`
- ⚡️ Improved the size and load time of saved apps
- ⚾️ Implemented better error-catching throughout the codebase
9 changes: 7 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,45 @@ Below are a few of the most useful commands accepted by Streamlit CLI:
$ streamlit run your_script.py [script args]
```

Runs your report. At any time you can kill the server with **Ctrl+c**. This is useful when making config changes or changing reports/scripts.
Runs your app. At any time you can kill the server with **Ctrl+c**. This is useful when making config changes or changing apps/scripts.

## \-\-version

```bash
$ streamlit --version
```

Shows the version of Streamlit in your current Python environment.

## docs

```bash
$ streamlit docs
```

Opens Streamlit's documentation (i.e. this website) in a web browser.

## hello

```bash
$ streamlit hello
```
Opens Streamlit's Hello World report in a web browser. This is useful for

Opens Streamlit's Hello World app in a web browser. This is useful for
testing Streamlit.

## config show

```bash
$ streamlit config show
```

Shows all config options for Streamlit, as well as their current values.

## cache clear

```bash
$ streamlit cache clear
```

Clears the [Streamlit cache](/api/index.md#optimize-performance).
Loading

0 comments on commit c377908

Please sign in to comment.