syd 0.1.5__tar.gz → 0.1.7__tar.gz

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-0.1.7/PKG-INFO ADDED
@@ -0,0 +1,120 @@
1
+ Metadata-Version: 2.4
2
+ Name: syd
3
+ Version: 0.1.7
4
+ Summary: A Python package for making GUIs for data science easy.
5
+ Project-URL: Homepage, https://github.com/landoskape/syd
6
+ Author-email: Andrew Landau <andrew+tyler+landau+getridofthisanddtheplusses@gmail.com>
7
+ License-Expression: GPL-3.0-or-later
8
+ License-File: LICENSE
9
+ Keywords: data-science,gui,interactive,jupyter,machine-learning,notebook,python
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: >=3.9
21
+ Requires-Dist: dash
22
+ Requires-Dist: ipympl
23
+ Requires-Dist: ipywidgets
24
+ Requires-Dist: matplotlib
25
+ Requires-Dist: plotly
26
+ Provides-Extra: test
27
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
28
+ Requires-Dist: pytest>=7.0.0; extra == 'test'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # syd
32
+
33
+ [![PyPI version](https://badge.fury.io/py/syd.svg)](https://badge.fury.io/py/syd)
34
+ [![Tests](https://github.com/landoskape/syd/actions/workflows/tests.yml/badge.svg)](https://github.com/landoskape/syd/actions/workflows/tests.yml)
35
+ [![Documentation Status](https://readthedocs.org/projects/shareyourdata/badge/?version=stable)](https://shareyourdata.readthedocs.io/en/stable/?badge=stable)
36
+ [![codecov](https://codecov.io/gh/landoskape/syd/branch/main/graph/badge.svg)](https://codecov.io/gh/landoskape/syd)
37
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
38
+
39
+
40
+ A package to help you share your data!
41
+
42
+ Have you ever wanted to look through all your data really quickly interactively? Of course you have. Mo data mo problems, but only if you don't know what to do with it. And that starts with looking at your data. And that's why syd stands for show your data!
43
+
44
+ Syd is a system for creating a data viewing GUI that you can view on a web-browser (feature coming soon, right now only in jupyter notebooks). And guess what? Since it opens on a web browser, you can even open it on any other computer on your local network! For example, your PI's computer. Gone are the days of single random examples that they make infinitely stubborn conclusions about. Now, you can look at all the examples, quickly and easily, on their computer. And that's why syd stands for share your data!
45
+
46
+ Okay, so what is it? Syd is an automated system to convert some basic python plotting code into an interactive GUI. This is great, because it means you only have to think about what you want to plot and which parameters you want to be interactive. Syd handles all the behind-the-scenes boilerplate code required to make an interface. You know what that means? It means you get to focus on _thinking_ about your data, rather than spending time writing code to look at it. And that's why syd stands for Science, Yes! Dayummmm!
47
+
48
+ ## Installation
49
+ It's easy, just use pip install. The dependencies are light so it should work in most environments.
50
+ ```bash
51
+ pip install syd
52
+ ```
53
+
54
+ ## Quick Start
55
+ Right now the only way to use it is in a jupyter notebook. More deployment options coming soon!
56
+ This is an example of a sine wave viewer which is about as simple as it gets.
57
+ ```python
58
+ # In a notebook!
59
+ import matplotlib.pyplot as plt
60
+ import numpy as np
61
+ from syd import make_viewer
62
+ def plot(viewer, state):
63
+ fig, ax = plt.subplots()
64
+ x = np.linspace(0, 10, 1000)
65
+ y = state['amplitude'] * np.sin(state['frequency'] * x)
66
+ ax.plot(x, y)
67
+ return fig
68
+
69
+ viewer = make_viewer()
70
+ viewer.set_plot(plot)
71
+ viewer.add_float('amplitude', value=1.0, min_value=0, max_value=2)
72
+ viewer.add_float('frequency', value=1.0, min_value=0.1, max_value=5)
73
+ viewer.deploy(continuous=True)
74
+ ```
75
+
76
+ We have several examples of more complex viewers in the [examples](examples) folder. A good one
77
+ to start with is the [first example](examples/first_example.ipynb) because this has detailed
78
+ explanations of how to use the core elements of SYD. To see what the exact same viewer looks like
79
+ when written as a class, see the [subclass example](examples/subclass_example.ipynb). This format
80
+ is pretty useful when you want complex functionality - for example if you want to add extra
81
+ supporting methods for processing data and updating parameters that require more complex logic.
82
+
83
+ ## Documentation
84
+
85
+ Full documentation is available at [shareyourdata.readthedocs.io](https://shareyourdata.readthedocs.io/).
86
+
87
+ ## License
88
+
89
+ This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
90
+
91
+ ## Contributing
92
+
93
+ Contributions are welcome! Here's how you can help:
94
+
95
+ 1. Fork the repository
96
+ 2. Create a new branch (`git checkout -b feature/amazing-feature`)
97
+ 3. Make your changes
98
+ 4. Run the tests (`pytest`)
99
+ 5. Commit your changes (`git commit -m 'Add amazing feature'`)
100
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
101
+ 7. Open a Pull Request online
102
+
103
+ 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).
104
+
105
+
106
+ ## To-Do List
107
+ - Notebook deployment debouncer:
108
+ - Probably make this dependent on whether the user is in %matplotlib widget mode or not
109
+ - Also probably make it dependent on whether the deployer is in continuous mode or not
110
+ - Potentially make the wait_time dynamic depending on how fast the plot method is and how
111
+ - frequently the no comm messages show up... (if we can catch them)
112
+ - Consider the class method "of this class" function permissions.... (and write tests...)
113
+ - Think about whether there's alternatives to creating new figures each time...
114
+ - Consider adding a step to the integer parameter...
115
+ - Idea!
116
+ - We could make fig=?, ax=? arguments optional for the plot function and add a
117
+ "recycle_figure: bool = False" flag be part of the deploy API. This way, an
118
+ advanced user that wants snappy responsivity or complex figure management can
119
+ do so, but the default is for the user to generate a new figure object each time.
120
+ - I've updated some rules for parameters -- need to make tests for empty options on selection / multiple selections
syd-0.1.7/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # syd
2
+
3
+ [![PyPI version](https://badge.fury.io/py/syd.svg)](https://badge.fury.io/py/syd)
4
+ [![Tests](https://github.com/landoskape/syd/actions/workflows/tests.yml/badge.svg)](https://github.com/landoskape/syd/actions/workflows/tests.yml)
5
+ [![Documentation Status](https://readthedocs.org/projects/shareyourdata/badge/?version=stable)](https://shareyourdata.readthedocs.io/en/stable/?badge=stable)
6
+ [![codecov](https://codecov.io/gh/landoskape/syd/branch/main/graph/badge.svg)](https://codecov.io/gh/landoskape/syd)
7
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8
+
9
+
10
+ A package to help you share your data!
11
+
12
+ Have you ever wanted to look through all your data really quickly interactively? Of course you have. Mo data mo problems, but only if you don't know what to do with it. And that starts with looking at your data. And that's why syd stands for show your data!
13
+
14
+ Syd is a system for creating a data viewing GUI that you can view on a web-browser (feature coming soon, right now only in jupyter notebooks). And guess what? Since it opens on a web browser, you can even open it on any other computer on your local network! For example, your PI's computer. Gone are the days of single random examples that they make infinitely stubborn conclusions about. Now, you can look at all the examples, quickly and easily, on their computer. And that's why syd stands for share your data!
15
+
16
+ Okay, so what is it? Syd is an automated system to convert some basic python plotting code into an interactive GUI. This is great, because it means you only have to think about what you want to plot and which parameters you want to be interactive. Syd handles all the behind-the-scenes boilerplate code required to make an interface. You know what that means? It means you get to focus on _thinking_ about your data, rather than spending time writing code to look at it. And that's why syd stands for Science, Yes! Dayummmm!
17
+
18
+ ## Installation
19
+ It's easy, just use pip install. The dependencies are light so it should work in most environments.
20
+ ```bash
21
+ pip install syd
22
+ ```
23
+
24
+ ## Quick Start
25
+ Right now the only way to use it is in a jupyter notebook. More deployment options coming soon!
26
+ This is an example of a sine wave viewer which is about as simple as it gets.
27
+ ```python
28
+ # In a notebook!
29
+ import matplotlib.pyplot as plt
30
+ import numpy as np
31
+ from syd import make_viewer
32
+ def plot(viewer, state):
33
+ fig, ax = plt.subplots()
34
+ x = np.linspace(0, 10, 1000)
35
+ y = state['amplitude'] * np.sin(state['frequency'] * x)
36
+ ax.plot(x, y)
37
+ return fig
38
+
39
+ viewer = make_viewer()
40
+ viewer.set_plot(plot)
41
+ viewer.add_float('amplitude', value=1.0, min_value=0, max_value=2)
42
+ viewer.add_float('frequency', value=1.0, min_value=0.1, max_value=5)
43
+ viewer.deploy(continuous=True)
44
+ ```
45
+
46
+ We have several examples of more complex viewers in the [examples](examples) folder. A good one
47
+ to start with is the [first example](examples/first_example.ipynb) because this has detailed
48
+ explanations of how to use the core elements of SYD. To see what the exact same viewer looks like
49
+ when written as a class, see the [subclass example](examples/subclass_example.ipynb). This format
50
+ is pretty useful when you want complex functionality - for example if you want to add extra
51
+ supporting methods for processing data and updating parameters that require more complex logic.
52
+
53
+ ## Documentation
54
+
55
+ Full documentation is available at [shareyourdata.readthedocs.io](https://shareyourdata.readthedocs.io/).
56
+
57
+ ## License
58
+
59
+ This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
60
+
61
+ ## Contributing
62
+
63
+ Contributions are welcome! Here's how you can help:
64
+
65
+ 1. Fork the repository
66
+ 2. Create a new branch (`git checkout -b feature/amazing-feature`)
67
+ 3. Make your changes
68
+ 4. Run the tests (`pytest`)
69
+ 5. Commit your changes (`git commit -m 'Add amazing feature'`)
70
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
71
+ 7. Open a Pull Request online
72
+
73
+ 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).
74
+
75
+
76
+ ## To-Do List
77
+ - Notebook deployment debouncer:
78
+ - Probably make this dependent on whether the user is in %matplotlib widget mode or not
79
+ - Also probably make it dependent on whether the deployer is in continuous mode or not
80
+ - Potentially make the wait_time dynamic depending on how fast the plot method is and how
81
+ - frequently the no comm messages show up... (if we can catch them)
82
+ - Consider the class method "of this class" function permissions.... (and write tests...)
83
+ - Think about whether there's alternatives to creating new figures each time...
84
+ - Consider adding a step to the integer parameter...
85
+ - Idea!
86
+ - We could make fig=?, ax=? arguments optional for the plot function and add a
87
+ "recycle_figure: bool = False" flag be part of the deploy API. This way, an
88
+ advanced user that wants snappy responsivity or complex figure management can
89
+ do so, but the default is for the user to generate a new figure object each time.
90
+ - I've updated some rules for parameters -- need to make tests for empty options on selection / multiple selections
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "syd"
7
- version = "0.1.5"
7
+ dynamic = ["version"]
8
8
  authors = [
9
9
  {name = "Andrew Landau", email = "andrew+tyler+landau+getridofthisanddtheplusses@gmail.com"},
10
10
  ]
@@ -13,10 +13,15 @@ readme = "README.md"
13
13
  requires-python = ">=3.9"
14
14
  dependencies = [
15
15
  "ipywidgets",
16
+ "ipympl",
16
17
  "matplotlib",
18
+ "plotly",
19
+ "dash",
17
20
  ]
18
21
  license = "GPL-3.0-or-later"
19
22
  keywords = ["data-science", "machine-learning", "gui", "interactive", "jupyter", "notebook", "python"]
23
+
24
+
20
25
  classifiers = [
21
26
  "Development Status :: 4 - Beta",
22
27
  "Intended Audience :: Developers",
@@ -44,7 +49,13 @@ include = [
44
49
  "syd",
45
50
  ]
46
51
 
52
+ [tool.hatch.version]
53
+ path = "syd/__init__.py"
54
+
47
55
  [tool.pytest.ini_options]
48
56
  testpaths = ["tests"]
49
57
  python_files = ["test_*.py"]
50
58
  addopts = "--cov=syd --cov-report=xml --cov-report=term-missing"
59
+
60
+ [tool.black]
61
+ line-length = 88
@@ -0,0 +1,11 @@
1
+ from typing import Callable, Optional
2
+ from .viewer import Viewer
3
+
4
+ __version__ = "0.1.7"
5
+
6
+
7
+ def make_viewer(plot_func: Optional[Callable] = None):
8
+ viewer = Viewer()
9
+ if plot_func is not None:
10
+ viewer.set_plot(plot_func)
11
+ return viewer
@@ -0,0 +1 @@
1
+ from .deployer import FlaskDeployer