Skip to content

Commit c3d8d61

Browse files
authored
Rename the package to shinywidgets (#46)
1 parent d24a777 commit c3d8d61

34 files changed

+76
-88
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* ipyshiny version:
1+
* shinywidgets version:
22
* Python version:
33
* Operating System:
44

CONTRIBUTING.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Types of Contributions
1515
Report Bugs
1616
~~~~~~~~~~~
1717

18-
Report bugs at https://github.com/rstudio/ipyshiny/issues.
18+
Report bugs at https://github.com/rstudio/shinywidgets/issues.
1919

2020
If you are reporting a bug, please include:
2121

@@ -38,14 +38,14 @@ and "help wanted" is open to whoever wants to implement it.
3838
Write Documentation
3939
~~~~~~~~~~~~~~~~~~~
4040

41-
ipyshiny could always use more documentation, whether as part of the
42-
official ipyshiny docs, in docstrings, or even on the web in blog posts,
41+
shinywidgets could always use more documentation, whether as part of the
42+
official shinywidgets docs, in docstrings, or even on the web in blog posts,
4343
articles, and such.
4444

4545
Submit Feedback
4646
~~~~~~~~~~~~~~~
4747

48-
The best way to send feedback is to file an issue at https://github.com/rstudio/ipyshiny/issues.
48+
The best way to send feedback is to file an issue at https://github.com/rstudio/shinywidgets/issues.
4949

5050
If you are proposing a feature:
5151

@@ -57,17 +57,17 @@ If you are proposing a feature:
5757
Get Started!
5858
------------
5959

60-
Ready to contribute? Here's how to set up `ipyshiny` for local development.
60+
Ready to contribute? Here's how to set up `shinywidgets` for local development.
6161

62-
1. Fork the `ipyshiny` repo on GitHub.
62+
1. Fork the `shinywidgets` repo on GitHub.
6363
2. Clone your fork locally::
6464

65-
$ git clone [email protected]:your_name_here/ipyshiny.git
65+
$ git clone [email protected]:your_name_here/shinywidgets.git
6666

6767
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
6868

69-
$ mkvirtualenv ipyshiny
70-
$ cd ipyshiny/
69+
$ mkvirtualenv shinywidgets
70+
$ cd shinywidgets/
7171
$ python setup.py develop
7272

7373
4. Create a branch for local development::
@@ -79,7 +79,7 @@ Ready to contribute? Here's how to set up `ipyshiny` for local development.
7979
5. When you're done making changes, check that your changes pass flake8 and the
8080
tests, including testing other Python versions with tox::
8181

82-
$ flake8 ipyshiny tests
82+
$ flake8 shinywidgets tests
8383
$ python setup.py test or pytest
8484
$ tox
8585

@@ -103,15 +103,15 @@ Before you submit a pull request, check that it meets these guidelines:
103103
your new functionality into a function with a docstring, and add the
104104
feature to the list in README.rst.
105105
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
106-
https://travis-ci.com/rstudio/ipyshiny/pull_requests
106+
https://travis-ci.com/rstudio/shinywidgets/pull_requests
107107
and make sure that the tests pass for all supported Python versions.
108108

109109
Tips
110110
----
111111

112112
To run a subset of tests::
113113

114-
$ pytest tests.test_ipyshiny
114+
$ pytest tests.test_shinywidgets
115115

116116

117117
Deploying

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include LICENSE
55
include README.rst
66

77
recursive-include tests *
8-
recursive-include ipyshiny/static *
8+
recursive-include shinywidgets/static *
99
recursive-exclude * __pycache__
1010
recursive-exclude * *.py[co]
1111

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ clean-test: ## remove test and coverage artifacts
4848
rm -fr .pytest_cache
4949

5050
lint/flake8: ## check style with flake8
51-
flake8 ipyshiny tests
51+
flake8 shinywidgets tests
5252
lint/black: ## check style with black
53-
black --check ipyshiny tests
53+
black --check shinywidgets tests
5454

5555
lint: lint/flake8 lint/black ## check style
5656

@@ -61,15 +61,15 @@ test-all: ## run tests on every Python version with tox
6161
tox
6262

6363
coverage: ## check code coverage quickly with the default Python
64-
coverage run --source ipyshiny -m pytest
64+
coverage run --source shinywidgets -m pytest
6565
coverage report -m
6666
coverage html
6767
$(BROWSER) htmlcov/index.html
6868

6969
docs: ## generate Sphinx HTML documentation, including API docs
70-
rm -f docs/ipyshiny.rst
70+
rm -f docs/shinywidgets.rst
7171
rm -f docs/modules.rst
72-
sphinx-apidoc -o docs/ ipyshiny
72+
sphinx-apidoc -o docs/ shinywidgets
7373
$(MAKE) -C docs clean
7474
$(MAKE) -C docs html
7575
$(BROWSER) docs/_build/html/index.html

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ipyshiny
1+
shinywidgets
22
================
33

44
Render [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/) inside a
@@ -7,23 +7,23 @@ Render [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/) inside a
77
## Installation
88

99
```sh
10-
pip install ipyshiny --extra-index-url=https://pyshiny.netlify.app/pypi
10+
pip install shinywidgets --extra-index-url=https://pyshiny.netlify.app/pypi
1111
```
1212

1313
## Overview
1414

1515
Every Shiny app has two main parts: the user interface (UI) and server logic.
16-
`{ipyshiny}` provides `output_widget()` for defining where to place a widget in the UI
16+
`{shinywidgets}` provides `output_widget()` for defining where to place a widget in the UI
1717
and `register_widget()` (or `@render_widget`) for supplying a widget-like object to
1818
the `output_widget()` container. More technically, widget-like means:
1919

2020
* Any object that subclasses `{ipywidgets}`'s `Widget` class.
2121
* Some other widget-like object that can be coerced into a `Widget`. Currently, we
2222
support objects from `{altair}`, `{bokeh}`, and `{pydeck}`, but [please let us
23-
know](https://github.com/rstudio/ipyshiny/issues/new) about other packages that we
23+
know](https://github.com/rstudio/shinywidgets/issues/new) about other packages that we
2424
should support.
2525

26-
The recommended way to incorporate `{ipyshiny}` widgets into Shiny apps is to:
26+
The recommended way to incorporate `{shinywidgets}` widgets into Shiny apps is to:
2727

2828
1. Initialize and `register_widget()` _once_ for each widget.
2929
* In most cases, initialization should happen when the user session starts (i.e.,
@@ -32,15 +32,15 @@ The recommended way to incorporate `{ipyshiny}` widgets into Shiny apps is to:
3232
until it's needed.
3333
2. Use Shiny's `@reactive.Effect` to reactively modify the widget whenever relevant
3434
reactive values change.
35-
3. Use `{ipyshiny}`'s `reactive_read()` to update other outputs whenever the widget changes.
35+
3. Use `{shinywidgets}`'s `reactive_read()` to update other outputs whenever the widget changes.
3636
* This way, relevant output(s) invalidate (i.e., recalculate) whenever the relevant
3737
widget attributes change (client-side or server-side).
3838

3939
The following app below uses `{ipyleaflet}` to demonstrate all these concepts:
4040

4141
```py
4242
from shiny import *
43-
from ipyshiny import output_widget, register_widget, reactive_read
43+
from shinywidgets import output_widget, register_widget, reactive_read
4444
import ipyleaflet as L
4545

4646
app_ui = ui.page_fluid(
@@ -88,7 +88,7 @@ a fitted line on a scatterplot with lots of points:
8888

8989
```py
9090
from shiny import *
91-
from ipyshiny import output_widget, register_widget
91+
from shinywidgets import output_widget, register_widget
9292
import plotly.graph_objs as go
9393
import numpy as np
9494
from sklearn.linear_model import LinearRegression
@@ -152,7 +152,7 @@ be noticeable delay.
152152

153153
```py
154154
from shiny import *
155-
from ipyshiny import output_widget, render_widget
155+
from shinywidgets import output_widget, render_widget
156156
import ipyleaflet as L
157157

158158
app_ui = ui.page_fluid(
@@ -204,29 +204,29 @@ w.layout.display = "none"
204204
Yes! In fact this a crucial aspect to how packages like `{ipyleaflet}` work. In
205205
`{ipyleaflet}`'s case, each [individual marker is a widget](https://ipyleaflet.readthedocs.io/en/latest/layers/circle_marker.html) which gets attached to a `Map()` via `.add_layer()`.
206206

207-
### Does `{ipyshiny}` work with `shiny static`?
207+
### Does `{shinywidgets}` work with `shiny static`?
208208

209209
Shiny's `shiny static` CLI command allows some Shiny apps to be statically served (i.e.,
210210
run entirely in the browser). [py-shinylive](https://github.com/rstudio/py-shinylive)
211211
(the Python package behind `shiny static`) does have some special support for
212-
`{ipyshiny}` and it's dependencies, which should make most widgets work out-of-the-box.
212+
`{shinywidgets}` and it's dependencies, which should make most widgets work out-of-the-box.
213213

214214
In some cases, the package(s) that you want to use may not come pre-bundled with
215-
`{ipyshiny}`; and in that case, you can [include a `requirements.txt`
215+
`{shinywidgets}`; and in that case, you can [include a `requirements.txt`
216216
file](https://pyshiny.netlify.app/examples/#extra-packages) to pre-install those other
217217
packages
218218

219219
## Troubleshooting
220220

221-
If after [installing](#installation) `{ipyshiny}`, you have trouble rendering widgets,
222-
first try running the "hello world" ipywidgets [example](https://github.com/rstudio/ipyshiny/blob/main/examples/ipywidgets/app.py). If that doesn't work, it could be that you have an unsupported version
221+
If after [installing](#installation) `{shinywidgets}`, you have trouble rendering widgets,
222+
first try running the "hello world" ipywidgets [example](https://github.com/rstudio/shinywidgets/blob/main/examples/ipywidgets/app.py). If that doesn't work, it could be that you have an unsupported version
223223
of a dependency like `{ipywidgets}` or `{shiny}`.
224224

225225
If you can run the "hello world" example, but "3rd party" widget(s) don't work, first
226226
check that the extension is properly configured with `jupyter nbextension list`. Even if
227227
the extension is properly configured, it still may not work right away, especially if
228228
that widget requires initialization code in a notebook environment. In this case,
229-
`{ipyshiny}` probably won't work without providing the equivalent setup information to
229+
`{shinywidgets}` probably won't work without providing the equivalent setup information to
230230
Shiny. Some known cases of this are:
231231

232232
#### bokeh
@@ -241,11 +241,11 @@ head_content(HTML(Resources(mode="inline").render()))
241241
#### Other widgets?
242242

243243
Know of another widget that requires initialization code? [Please let us know about
244-
it](https://github.com/rstudio/ipyshiny/issues/new)!
244+
it](https://github.com/rstudio/shinywidgets/issues/new)!
245245

246246
## Development
247247

248-
If you want to do development on `{ipyshiny}`, run:
248+
If you want to do development on `{shinywidgets}`, run:
249249

250250
```sh
251251
pip install -e .

examples/ipyleaflet/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from shiny import *
2-
from ipyshiny import output_widget, register_widget, reactive_read
2+
from shinywidgets import output_widget, register_widget, reactive_read
33
import ipyleaflet as L
44
from htmltools import css
55

examples/ipywidgets/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from shiny import *
2-
from ipyshiny import *
2+
from shinywidgets import *
33
import ipywidgets as ipy
44
from ipywidgets.widgets.widget import Widget
55

@@ -28,4 +28,4 @@ def _():
2828
return f"The value of the slider is: {reactive_read(s, 'value')}"
2929

3030

31-
app = App(app_ui, server)
31+
app = App(app_ui, server, debug=True)

examples/ipywidgets/rsconnect-python/ipywidgets.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/outputs/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55

66
from shiny import *
7-
from ipyshiny import *
7+
from shinywidgets import *
88
from htmltools import head_content, HTML
99

1010
# TODO: jupyter_bokeh assumes this additional JS has been loaded into the

examples/outputs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--extra-index-url https://pyshiny.netlify.app/pypi/
22
shiny>=0.2.0.9004
3-
ipyshiny
3+
shinywidgets
44
ipywidgets
55
numpy
66
pandas

0 commit comments

Comments
 (0)