syd 1.1.0__py3-none-any.whl → 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- syd/__init__.py +2 -1
- syd/flask_deployment/deployer.py +107 -23
- syd/flask_deployment/static/css/styles.css +77 -62
- syd/flask_deployment/static/css/viewer.css +0 -42
- syd/flask_deployment/static/js/modules/api.js +89 -0
- syd/flask_deployment/static/js/modules/config.js +22 -0
- syd/flask_deployment/static/js/modules/plot.js +75 -0
- syd/flask_deployment/static/js/modules/state.js +89 -0
- syd/flask_deployment/static/js/modules/system_controls.js +191 -0
- syd/flask_deployment/static/js/modules/ui_controls.js +812 -0
- syd/flask_deployment/static/js/modules/utils.js +49 -0
- syd/flask_deployment/static/js/old_viewer.js +1195 -0
- syd/flask_deployment/static/js/viewer.js +40 -1177
- syd/flask_deployment/templates/index.html +1 -1
- syd/support.py +25 -0
- syd/viewer.py +4 -0
- {syd-1.1.0.dist-info → syd-1.2.0.dist-info}/METADATA +18 -5
- syd-1.2.0.dist-info/RECORD +28 -0
- syd-1.1.0.dist-info/RECORD +0 -20
- {syd-1.1.0.dist-info → syd-1.2.0.dist-info}/WHEEL +0 -0
- {syd-1.1.0.dist-info → syd-1.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
data-controls-width-percent="{{ config.controls_width_percent }}"
|
|
30
30
|
style="display:none;"></div>
|
|
31
31
|
|
|
32
|
-
<script src="{{ url_for('static', filename='js/viewer.js') }}"></script>
|
|
32
|
+
<script type="module" src="{{ url_for('static', filename='js/viewer.js') }}"></script>
|
|
33
33
|
</body>
|
|
34
34
|
</html>
|
syd/support.py
CHANGED
|
@@ -5,6 +5,31 @@ from contextlib import contextmanager
|
|
|
5
5
|
import matplotlib.pyplot as plt
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
def show_open_servers():
|
|
9
|
+
"""Show all open Flask servers."""
|
|
10
|
+
from .flask_deployment.deployer import server_manager
|
|
11
|
+
|
|
12
|
+
print(server_manager.servers)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def close_servers(port: int | None = None):
|
|
16
|
+
"""Close any Flask servers running on a given port (or all of them).
|
|
17
|
+
|
|
18
|
+
Parameters
|
|
19
|
+
----------
|
|
20
|
+
port : int | None, optional
|
|
21
|
+
The port of the Flask server to close. If None, all servers will be closed.
|
|
22
|
+
|
|
23
|
+
Examples
|
|
24
|
+
--------
|
|
25
|
+
>>> close() # Close all Flask servers
|
|
26
|
+
>>> close(8000) # Close the Flask server running on port 8000
|
|
27
|
+
"""
|
|
28
|
+
from .flask_deployment.deployer import server_manager
|
|
29
|
+
|
|
30
|
+
server_manager.close_app(port)
|
|
31
|
+
|
|
32
|
+
|
|
8
33
|
@contextmanager
|
|
9
34
|
def plot_context():
|
|
10
35
|
plt.ioff()
|
syd/viewer.py
CHANGED
|
@@ -271,6 +271,8 @@ class Viewer:
|
|
|
271
271
|
host: str = "127.0.0.1",
|
|
272
272
|
port: Optional[int] = None,
|
|
273
273
|
open_browser: bool = True,
|
|
274
|
+
update_threshold: float = 1.0,
|
|
275
|
+
timeout_threshold: float = 10.0,
|
|
274
276
|
):
|
|
275
277
|
"""Share the viewer on a web browser using Flask
|
|
276
278
|
|
|
@@ -286,6 +288,8 @@ class Viewer:
|
|
|
286
288
|
host=host,
|
|
287
289
|
port=port,
|
|
288
290
|
open_browser=open_browser,
|
|
291
|
+
update_threshold=update_threshold,
|
|
292
|
+
timeout_threshold=timeout_threshold,
|
|
289
293
|
)
|
|
290
294
|
|
|
291
295
|
def deploy(self, env: str = "notebook", **kwargs):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: syd
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A Python package for making GUIs for data science easy.
|
|
5
5
|
Project-URL: Homepage, https://github.com/landoskape/syd
|
|
6
6
|
Author-email: Andrew Landau <andrew+tyler+landau+getridofthisanddtheplusses@gmail.com>
|
|
@@ -201,7 +201,21 @@ This project is licensed under the GNU General Public License v3.0 - see the [LI
|
|
|
201
201
|
|
|
202
202
|
## Contributing
|
|
203
203
|
|
|
204
|
-
Contributions are welcome!
|
|
204
|
+
Contributions are welcome! If you have an idea for an improvement or a bug report, please let us know by opening an
|
|
205
|
+
issue on the [github issues page](https://github.com/landoskape/syd/issues). You can also contribute code by submitting
|
|
206
|
+
a pull request. Here are some guidelines for contributing:
|
|
207
|
+
|
|
208
|
+
### 1. Reporting Bugs
|
|
209
|
+
If you find a bug, (e.g. any error or strange behavior that is not expected), please let us know by opening an issue on the [github issues page](https://github.com/landoskape/syd/issues).
|
|
210
|
+
|
|
211
|
+
### 2. Suggesting Features
|
|
212
|
+
If you have an idea for a feature or improvement, please let tell us. Opening an issue on the [github issues page](https://github.com/landoskape/syd/issues).
|
|
213
|
+
|
|
214
|
+
### 3. Improvements to the Documentation
|
|
215
|
+
A package is only as good as its documentation. If you think the documentation is missing something, confusing, or could be improved in any way, please let us know by opening an issue on the [github issues page](https://github.com/landoskape/syd/issues).
|
|
216
|
+
|
|
217
|
+
### 4. Contributing Code
|
|
218
|
+
If you want to contribute code (good for you!), here's how you can do it:
|
|
205
219
|
|
|
206
220
|
1. Fork the repository
|
|
207
221
|
2. Create a new branch (`git checkout -b feature/amazing-feature`)
|
|
@@ -211,7 +225,7 @@ Contributions are welcome! Here's how you can help:
|
|
|
211
225
|
6. Push to the branch (`git push origin feature/amazing-feature`)
|
|
212
226
|
7. Open a Pull Request online
|
|
213
227
|
|
|
214
|
-
Please make sure to update tests as appropriate and adhere to the existing coding style (black, line-length=88, other style guidelines not capture by black, generally following pep8 guidelines). Try to make the code coverage report improve or stay the same rather than decrease (right now the deployment system isn't covered by tests).
|
|
228
|
+
Please make sure to update tests as appropriate and adhere to the existing coding style (black, line-length=88, other style guidelines not capture by black, generally following pep8 guidelines). Try to make the code coverage report improve or stay the same rather than decrease (right now the deployment system isn't covered by tests). There aren't any precommit hooks or anything so you're responsible for checking this yourself. You can process the code with black as follows:
|
|
215
229
|
```bash
|
|
216
230
|
pip install black
|
|
217
231
|
black . # from the root directory of the repo
|
|
@@ -228,5 +242,4 @@ black . # from the root directory of the repo
|
|
|
228
242
|
- [ ] Export lite: export the viewer as a HTML/Java package that contains an incomplete set of renderings of figures -- using a certain set of parameters.
|
|
229
243
|
- [ ] Export full: export the viewer in a way that contains the data to give full functionality.
|
|
230
244
|
- [ ] Idea for sharing: https://github.com/analyticalmonk/awesome-neuroscience, https://github.com/fasouto/awesome-dataviz
|
|
231
|
-
- [ ] The handling of value in Selection parameters is kind of weird.... I think we need to think more about what to do for fails!!!!
|
|
232
|
-
- [ ] Range parameters render poorly in browser mode.
|
|
245
|
+
- [ ] The handling of value in Selection parameters is kind of weird.... I think we need to think more about what to do for fails!!!!
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
syd/__init__.py,sha256=ln2sVWmAbfLzF0oqYPE0g2TYdIqms9_Va984I0eBfiU,117
|
|
2
|
+
syd/parameters.py,sha256=dlnYOVsi1CDtC2toVECf0kNBRipVrtUjr6XVX86b5MA,42886
|
|
3
|
+
syd/support.py,sha256=WVvcKKHWChZWJewc9-vwSChGwmzXobxU5pNmrjrsC3k,6770
|
|
4
|
+
syd/viewer.py,sha256=c53tJlnbnTCGDJEYhiuKZ76tU7Dcd7S8VWY_1O8aAN0,51692
|
|
5
|
+
syd/flask_deployment/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
6
|
+
syd/flask_deployment/deployer.py,sha256=8W51sUZx7iUtFTseNacRa2XOgQVOGGR96nBf8NZS2Qg,29287
|
|
7
|
+
syd/flask_deployment/testing_principles.md,sha256=GyULM97sDeie8h3tSPoduOckdMNGyWuwm1RdHo5jzK0,10130
|
|
8
|
+
syd/flask_deployment/static/__init__.py,sha256=ieWE8NKR-APw7h4Ge0ooZGk6wZrneSSs_1cMyTPbQSA,65
|
|
9
|
+
syd/flask_deployment/static/css/styles.css,sha256=GQgIPbWMdfTgU-HN80FCObA8bd1FPiwa1Dq0yRANsPc,5944
|
|
10
|
+
syd/flask_deployment/static/css/viewer.css,sha256=rViWJ4w6vahuOr0RIpowgJfg7HN4TzMAuYrQmqhi1V0,805
|
|
11
|
+
syd/flask_deployment/static/js/old_viewer.js,sha256=aIh0gxrwMWUYVge4taj0pucg2RiCcWVuV9ekBvUVsPU,40594
|
|
12
|
+
syd/flask_deployment/static/js/viewer.js,sha256=D-I0hUZQPMSIgB9b8taWNVIsBBUeK1VpLjWI1KtOgSo,2672
|
|
13
|
+
syd/flask_deployment/static/js/modules/api.js,sha256=WTx4SRIzsCLyB0yD94j836KR4npJPEJdW9pNKw5gsHc,3160
|
|
14
|
+
syd/flask_deployment/static/js/modules/config.js,sha256=XxvyNhOUoyXXcacmhNzawKZiy9Q473sY98y7WipofLs,850
|
|
15
|
+
syd/flask_deployment/static/js/modules/plot.js,sha256=dHZAaw_hjrrMa1IGet8HhYJvB0Ze3KoFjmB6duuhFhg,2622
|
|
16
|
+
syd/flask_deployment/static/js/modules/state.js,sha256=-sfQ9ppDgr0p3XO5_oN3g-waf1-j0iwSfSSGS_lIK70,3133
|
|
17
|
+
syd/flask_deployment/static/js/modules/system_controls.js,sha256=7HYd8meNWEgp_xfQCFHKQzKMOrnrz8DeMu2nJXA9baM,7645
|
|
18
|
+
syd/flask_deployment/static/js/modules/ui_controls.js,sha256=Z7n1TPvx25Xtw-cVKhIsEV72TBIrdUmdG6yVhjFQ5Rw,30038
|
|
19
|
+
syd/flask_deployment/static/js/modules/utils.js,sha256=xqIBRvTrZCnm65xZ9R6mqeHFni4h0Q2x3G6gtQ9AWw8,1420
|
|
20
|
+
syd/flask_deployment/templates/__init__.py,sha256=ieWE8NKR-APw7h4Ge0ooZGk6wZrneSSs_1cMyTPbQSA,65
|
|
21
|
+
syd/flask_deployment/templates/index.html,sha256=OmGaEdEPZ_ALPq7ZHk47jw-ZX9pOUUk57M3gXT0V1Lk,1608
|
|
22
|
+
syd/notebook_deployment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
syd/notebook_deployment/deployer.py,sha256=ELtYiR6ac8Rg0I1Hh8_K-w5j_oZIAXf-nDazWvbD3Uc,12225
|
|
24
|
+
syd/notebook_deployment/widgets.py,sha256=ptys7exVA6NCF4eCRZMTPJblT0ZbtPdN4o2A0Yh5Cfc,20781
|
|
25
|
+
syd-1.2.0.dist-info/METADATA,sha256=_5dekAuzzkgmS8UjpD42Bu6dVRKfM2Jyimuv8LudNHM,14934
|
|
26
|
+
syd-1.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
27
|
+
syd-1.2.0.dist-info/licenses/LICENSE,sha256=YF6QR6Vjxcg5b_sYIyqkME7FZYau5TfEUGTG-0JeRK0,35129
|
|
28
|
+
syd-1.2.0.dist-info/RECORD,,
|
syd-1.1.0.dist-info/RECORD
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
syd/__init__.py,sha256=scju2nVDJzGslTNmtc0Mp_ftux6TzB4BAOCrgU9R19A,63
|
|
2
|
-
syd/parameters.py,sha256=dlnYOVsi1CDtC2toVECf0kNBRipVrtUjr6XVX86b5MA,42886
|
|
3
|
-
syd/support.py,sha256=7wztPMaL750opyBDnaYYRVyBR5QUJtVspDzQWpu50rk,6106
|
|
4
|
-
syd/viewer.py,sha256=t4NWOMrzsVHwKsnEJ8Um_wDGSEE9FcyZyb_fp_pVpko,51516
|
|
5
|
-
syd/flask_deployment/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
6
|
-
syd/flask_deployment/deployer.py,sha256=LnIWvFBxphFONABJCD6WoMu-a89YWIV0ZCuN_sgvB1A,25657
|
|
7
|
-
syd/flask_deployment/testing_principles.md,sha256=GyULM97sDeie8h3tSPoduOckdMNGyWuwm1RdHo5jzK0,10130
|
|
8
|
-
syd/flask_deployment/static/__init__.py,sha256=ieWE8NKR-APw7h4Ge0ooZGk6wZrneSSs_1cMyTPbQSA,65
|
|
9
|
-
syd/flask_deployment/static/css/styles.css,sha256=Gec78sj73IJDHz5OzE68e6LqyQf4E_JX0tc5zmavT4A,5533
|
|
10
|
-
syd/flask_deployment/static/css/viewer.css,sha256=9HToyeDhTA1Vhawmvev7ceyxKAVZASSX_azj8Hh-OVI,1644
|
|
11
|
-
syd/flask_deployment/static/js/viewer.js,sha256=aIh0gxrwMWUYVge4taj0pucg2RiCcWVuV9ekBvUVsPU,40594
|
|
12
|
-
syd/flask_deployment/templates/__init__.py,sha256=ieWE8NKR-APw7h4Ge0ooZGk6wZrneSSs_1cMyTPbQSA,65
|
|
13
|
-
syd/flask_deployment/templates/index.html,sha256=fr1g9IOwNttULhQCIcw_fo0sNpmdgznSGfPStQllR_E,1594
|
|
14
|
-
syd/notebook_deployment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
syd/notebook_deployment/deployer.py,sha256=ELtYiR6ac8Rg0I1Hh8_K-w5j_oZIAXf-nDazWvbD3Uc,12225
|
|
16
|
-
syd/notebook_deployment/widgets.py,sha256=ptys7exVA6NCF4eCRZMTPJblT0ZbtPdN4o2A0Yh5Cfc,20781
|
|
17
|
-
syd-1.1.0.dist-info/METADATA,sha256=tSSGUSgt_nNjzDYUGouMjas2UKFpZZa9oOfwgvMsHL0,13952
|
|
18
|
-
syd-1.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
19
|
-
syd-1.1.0.dist-info/licenses/LICENSE,sha256=YF6QR6Vjxcg5b_sYIyqkME7FZYau5TfEUGTG-0JeRK0,35129
|
|
20
|
-
syd-1.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|