Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0938e65

Browse filesBrowse files
committed
rename to reactpy + use anywidget
1 parent d66c4b4 commit 0938e65
Copy full SHA for 0938e65

35 files changed

+3885
-4655
lines changed

‎.gitignore

Copy file name to clipboard
+164-13Lines changed: 164 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,168 @@
1-
*.egg-info/
2-
.ipynb_checkpoints/
3-
dist/
4-
build/
5-
*.py[cod]
6-
node_modules/
1+
Untitled*.ipynb
72

83
# Compiled javascript
9-
idom_jupyter/nbextension/
10-
idom_jupyter/labextension/
4+
reactpy_jupyter/static/
115

12-
# OS X
13-
.DS_Store
6+
# Javascript
7+
node_modules/
148

15-
# Python
16-
venv
17-
Untitled*.ipynb
9+
# Byte-compiled / optimized / DLL files
10+
__pycache__/
11+
*.py[cod]
12+
*$py.class
13+
14+
# C extensions
15+
*.so
16+
17+
# Distribution / packaging
18+
.Python
19+
build/
20+
develop-eggs/
21+
dist/
22+
downloads/
23+
eggs/
24+
.eggs/
25+
lib/
26+
lib64/
27+
parts/
28+
sdist/
29+
var/
30+
wheels/
31+
share/python-wheels/
32+
*.egg-info/
33+
.installed.cfg
34+
*.egg
35+
MANIFEST
36+
37+
# PyInstaller
38+
# Usually these files are written by a python script from a template
39+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
40+
*.manifest
41+
*.spec
42+
43+
# Installer logs
44+
pip-log.txt
45+
pip-delete-this-directory.txt
46+
47+
# Unit test / coverage reports
48+
htmlcov/
49+
.tox/
50+
.nox/
51+
.coverage
52+
.coverage.*
53+
.cache
54+
nosetests.xml
55+
coverage.xml
56+
*.cover
57+
*.py,cover
58+
.hypothesis/
59+
.pytest_cache/
60+
cover/
61+
62+
# Translations
63+
*.mo
64+
*.pot
65+
66+
# Django stuff:
67+
*.log
68+
local_settings.py
69+
db.sqlite3
70+
db.sqlite3-journal
71+
72+
# Flask stuff:
73+
instance/
74+
.webassets-cache
75+
76+
# Scrapy stuff:
77+
.scrapy
78+
79+
# Sphinx documentation
80+
docs/_build/
81+
82+
# PyBuilder
83+
.pybuilder/
84+
target/
85+
86+
# Jupyter Notebook
87+
.ipynb_checkpoints
88+
89+
# IPython
90+
profile_default/
91+
ipython_config.py
92+
93+
# pyenv
94+
# For a library or package, you might want to ignore these files since the code is
95+
# intended to run in multiple environments; otherwise, check them in:
96+
# .python-version
97+
98+
# pipenv
99+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
100+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
101+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
102+
# install all needed dependencies.
103+
#Pipfile.lock
104+
105+
# poetry
106+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107+
# This is especially recommended for binary packages to ensure reproducibility, and is more
108+
# commonly ignored for libraries.
109+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110+
#poetry.lock
111+
112+
# pdm
113+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114+
#pdm.lock
115+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
116+
# in version control.
117+
# https://pdm.fming.dev/#use-with-ide
118+
.pdm.toml
119+
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
131+
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/

‎MANIFEST.in

Copy file name to clipboard
+1-18Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
1-
graft idom_jupyter/nbextension
2-
graft idom_jupyter/labextension
3-
graft jupyter-config
4-
5-
graft js
6-
graft tests
7-
prune **/node_modules
1+
graft reactpy_jupyter/static
82

93
include LICENSE
10-
include setup.py
11-
include setup.cfg
124
include pyproject.toml
13-
include install.json
14-
15-
# Patterns to exclude from any directory
16-
global-exclude *~
17-
global-exclude *.pyc
18-
global-exclude *.pyo
19-
global-exclude .git
20-
global-exclude .ipynb_checkpoints
21-
global-exclude *.map

‎README.md

Copy file name to clipboardExpand all lines: README.md
+24-24Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# idom-jupyter
1+
# reactpy-jupyter
22

3-
A client for [IDOM](https://github.com/idom-team/idom) implemented using Jupyter widgets
3+
A client for [ReactPy](https://github.com/reactive-python/reactpy) implemented using Jupyter widgets
44

55
## Try It Now!
66

77
Check out some live examples by clicking the badge below:
88

9-
<a href="https://mybinder.org/v2/gh/idom-team/idom-jupyter/main?filepath=notebooks%2Fintroduction.ipynb">
9+
<a href="https://mybinder.org/v2/gh/reactive-python/reactpy-jupyter/main?urlpath=lab%2Ftree%2Fnotebooks%2Fintroduction.ipynb">
1010
<img alt="Binder" height="25px" src="https://mybinder.org/badge_logo.svg" />
1111
</a>
1212

@@ -15,50 +15,50 @@ Check out some live examples by clicking the badge below:
1515
To install use `pip`:
1616

1717
```
18-
pip install idom_jupyter
18+
pip install reactpy_jupyter
1919
```
2020

2121
Then, before anything else, do one of the following:
2222

2323
1. At the top of your notebook run
2424

2525
```python
26-
import idom_jupyter
26+
import reactpy_jupyter
2727
```
2828

29-
2. Register `idom_jupyter` as a permanant IPython extension in [your config file](https://ipython.readthedocs.io/en/stable/config/intro.html#introduction-to-ipython-configuration):
29+
2. Register `reactpy_jupyter` as a permanant IPython extension in [your config file](https://ipython.readthedocs.io/en/stable/config/intro.html#introduction-to-ipython-configuration):
3030

3131
```python
3232
c.InteractiveShellApp.extensions = [
33-
'idom_jupyter'
33+
'reactpy_jupyter'
3434
]
3535
```
3636

3737
## Usage
3838

39-
Once you're done [getting started](#getting-started), you can author and display IDOM
39+
Once you're done [getting started](#getting-started), you can author and display ReactPy
4040
layouts natively in your Jupyter Notebook:
4141

4242
```python
43-
import idom
43+
import reactpy
4444

45-
@idom.component
45+
@reactpy.component
4646
def ClickCount():
47-
count, set_count = idom.hooks.use_state(0)
48-
return idom.html.button(
47+
count, set_count = reactpy.hooks.use_state(0)
48+
return reactpy.html.button(
4949
{"onClick": lambda event: set_count(count + 1)},
5050
[f"Click count: {count}"],
5151
)
5252

5353
ClickCount()
5454
```
5555

56-
You can also turn an `idom` element constructor into one that returns an `ipywidget` with
57-
the `idom_juptyer.widgetize` function. This is useful if you wish to use IDOM in combination
56+
You can also turn an `reactpy` element constructor into one that returns an `ipywidget` with
57+
the `reactpy_juptyer.widgetize` function. This is useful if you wish to use ReactPy in combination
5858
with other Jupyter Widgets as in the following example:
5959

6060
```python
61-
ClickCountWidget = idom_jupyter.widgetize(ClickCount)
61+
ClickCountWidget = reactpy_jupyter.widgetize(ClickCount)
6262
ipywidgets.Box(
6363
[
6464
ClickCountWidget(),
@@ -67,36 +67,36 @@ ipywidgets.Box(
6767
)
6868
```
6969

70-
Alternatively just wrap an `idom` element instance in an `idom_jupyter.LayoutWidget`:
70+
Alternatively just wrap an `reactpy` element instance in an `reactpy_jupyter.LayoutWidget`:
7171

7272
```python
7373
ipywidgets.Box(
7474
[
75-
idom_jupyter.LayoutWidget(ClickCount()),
76-
idom_jupyter.LayoutWidget(ClickCount()),
75+
reactpy_jupyter.LayoutWidget(ClickCount()),
76+
reactpy_jupyter.LayoutWidget(ClickCount()),
7777
]
7878
)
7979
```
8080

8181
For a more detailed introduction check out this live demo here:
8282

83-
<a href="https://mybinder.org/v2/gh/idom-team/idom-jupyter/main?filepath=notebooks%2Fintroduction.ipynb">
83+
<a href="https://mybinder.org/v2/gh/reactive-python/reactpy-jupyter/main?filepath=notebooks%2Fintroduction.ipynb">
8484
<img alt="Binder" height="25px" src="https://mybinder.org/badge_logo.svg" />
8585
</a>
8686

8787
## Development Installation
8888

8989
For a development installation (requires [Node.js](https://nodejs.org) and [Yarn version 1](https://classic.yarnpkg.com/)),
9090

91-
$ git clone https://github.com/idom-team/idom-jupyter.git
92-
$ cd idom-jupyter
91+
$ git clone https://github.com/reactive-python/reactpy-jupyter.git
92+
$ cd reactpy-jupyter
9393
$ pip install -e .
94-
$ jupyter nbextension install --py --symlink --overwrite --sys-prefix idom_jupyter
95-
$ jupyter nbextension enable --py --sys-prefix idom_jupyter
94+
$ jupyter nbextension install --py --symlink --overwrite --sys-prefix reactpy_jupyter
95+
$ jupyter nbextension enable --py --sys-prefix reactpy_jupyter
9696

9797
When actively developing your extension for JupyterLab, run the command:
9898

99-
$ jupyter labextension develop --overwrite idom_jupyter
99+
$ jupyter labextension develop --overwrite reactpy_jupyter
100100

101101
Then you need to rebuild the JS when you make a code change:
102102

‎RELEASE.md

Copy file name to clipboardExpand all lines: RELEASE.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ git clean -fdx # actually delete untracked files
1515

1616
## Javascript release
1717

18-
To release a new version of idom-client-jupyter on NPM, first register for an NPM account [here](https://www.npmjs.com/), then log in with `yarn login`. Then:
18+
To release a new version of reactpy-client-jupyter on NPM, first register for an NPM account [here](https://www.npmjs.com/), then log in with `yarn login`. Then:
1919

2020
1. Update `js/package.json` with the new npm package version
2121
2. Build and publish the npm package inside the `js/` directory:
@@ -29,14 +29,14 @@ To release a new version of idom-client-jupyter on NPM, first register for an NP
2929

3030
## Python release
3131

32-
To release a new version of idom_jupyter on PyPI, first make sure that the `build` package is installed: `pip install build`.
32+
To release a new version of reactpy_jupyter on PyPI, first make sure that the `build` package is installed: `pip install build`.
3333

34-
1. Update `idom_jupyter/_version.py`:
34+
1. Update `reactpy_jupyter/_version.py`:
3535
- Update `__version__`
3636
- Update `NPM_PACKAGE_RANGE` if necessary
3737
2. Commit changes to `_version.py` and tag the release
3838
```
39-
git add idom_jupyter/_version.py
39+
git add reactpy_jupyter/_version.py
4040
git tag -a X.X.X -m 'comment'
4141
```
4242
3. Generate Python packages and upload to PyPI:

‎binder/postBuild

Copy file name to clipboard
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
npm install -g yarn
54
pip install .

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.