syd 0.1.5__tar.gz → 0.1.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syd
3
- Version: 0.1.5
3
+ Version: 0.1.6
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>
@@ -29,8 +29,10 @@ Description-Content-Type: text/markdown
29
29
 
30
30
  [![PyPI version](https://badge.fury.io/py/syd.svg)](https://badge.fury.io/py/syd)
31
31
  [![Tests](https://github.com/landoskape/syd/actions/workflows/tests.yml/badge.svg)](https://github.com/landoskape/syd/actions/workflows/tests.yml)
32
- [![Documentation Status](https://readthedocs.org/projects/shareyourdata/badge/?version=latest)](https://shareyourdata.readthedocs.io/en/latest/?badge=latest)
32
+ [![Documentation Status](https://readthedocs.org/projects/shareyourdata/badge/?version=stable)](https://shareyourdata.readthedocs.io/en/stable/?badge=stable)
33
33
  [![codecov](https://codecov.io/gh/landoskape/syd/branch/main/graph/badge.svg)](https://codecov.io/gh/landoskape/syd)
34
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
35
+
34
36
 
35
37
  A package to help you share your data!
36
38
 
@@ -38,4 +40,67 @@ Have you ever wanted to look through all your data really quickly interactively?
38
40
 
39
41
  Syd is a system for creating a data viewing GUI that you can view on a web-browser. 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. 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!
40
42
 
41
- 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 what you want to be interactive, syd does the work to make an interface. There's some small overhead for learning how to prepare your data to work with syd, but we provide some templates to make it easy. You know what that means? That 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! Datum!
43
+ 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 what you want to be interactive, syd does the work to make an interface. There's some small overhead for learning how to prepare your data to work with syd, but we provide some templates to make it easy. You know what that means? That 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! Datum!
44
+
45
+ ## Installation
46
+
47
+ ```bash
48
+ pip install syd
49
+ ```
50
+
51
+ ## Quick Start
52
+ Right now the only way to use it is in a jupyter notebook. More deployments coming soon!
53
+ This is an example of a sine wave viewer which is about as simple as it gets.
54
+ ```python
55
+ # In a notebook!
56
+ import matplotlib.pyplot as plt
57
+ import numpy as np
58
+ from syd import make_viewer
59
+ def plot(viewer, state):
60
+ fig, ax = plt.subplots()
61
+ x = np.linspace(0, 10, 1000)
62
+ y = state['amplitude'] * np.sin(state['frequency'] * x)
63
+ ax.plot(x, y)
64
+ return fig
65
+
66
+ viewer = make_viewer()
67
+ viewer.set_plot(plot)
68
+ viewer.add_float('amplitude', value=1.0, min_value=0, max_value=2)
69
+ viewer.add_float('frequency', value=1.0, min_value=0.1, max_value=5)
70
+ viewer.deploy(continuous=True)
71
+ ```
72
+
73
+ We have several examples of more complex viewers in the [examples](examples) folder. A good one
74
+ to start with is the [first example](examples/first_example.ipynb) because this has detailed
75
+ explanations of how to use the core elements of SYD. To see what the exact same viewer looks like
76
+ when written as a class, see the [subclass example](examples/subclass_example.ipynb). This format
77
+ is pretty useful when you want complex functionality - for example if you want to add extra
78
+ supporting methods for processing data and updating parameters that require more complex logic.
79
+
80
+ ## Documentation
81
+
82
+ Full documentation is available at [shareyourdata.readthedocs.io](https://shareyourdata.readthedocs.io/).
83
+
84
+ Key features:
85
+ - Create interactive matplotlib visualizations with minimal code
86
+ - Support for various parameter types (sliders, dropdowns, checkboxes, etc.)
87
+ - Real-time updates as parameters change
88
+ - Works in Jupyter notebooks and can be shared over local network
89
+
90
+ ## License
91
+
92
+ This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
93
+
94
+ ## Contributing
95
+
96
+ Contributions are welcome! Here's how you can help:
97
+
98
+ 1. Fork the repository
99
+ 2. Create a new branch (`git checkout -b feature/amazing-feature`)
100
+ 3. Make your changes
101
+ 4. Run the tests (`pytest`)
102
+ 5. Commit your changes (`git commit -m 'Add amazing feature'`)
103
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
104
+ 7. Open a Pull Request online
105
+
106
+ Please make sure to update tests as appropriate and adhere to the existing coding style.
syd-0.1.6/README.md ADDED
@@ -0,0 +1,79 @@
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. 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. 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 what you want to be interactive, syd does the work to make an interface. There's some small overhead for learning how to prepare your data to work with syd, but we provide some templates to make it easy. You know what that means? That 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! Datum!
17
+
18
+ ## Installation
19
+
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 deployments 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
+ Key features:
58
+ - Create interactive matplotlib visualizations with minimal code
59
+ - Support for various parameter types (sliders, dropdowns, checkboxes, etc.)
60
+ - Real-time updates as parameters change
61
+ - Works in Jupyter notebooks and can be shared over local network
62
+
63
+ ## License
64
+
65
+ This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
66
+
67
+ ## Contributing
68
+
69
+ Contributions are welcome! Here's how you can help:
70
+
71
+ 1. Fork the repository
72
+ 2. Create a new branch (`git checkout -b feature/amazing-feature`)
73
+ 3. Make your changes
74
+ 4. Run the tests (`pytest`)
75
+ 5. Commit your changes (`git commit -m 'Add amazing feature'`)
76
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
77
+ 7. Open a Pull Request online
78
+
79
+ Please make sure to update tests as appropriate and adhere to the existing coding style.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "syd"
7
- version = "0.1.5"
7
+ version = "0.1.6"
8
8
  authors = [
9
9
  {name = "Andrew Landau", email = "andrew+tyler+landau+getridofthisanddtheplusses@gmail.com"},
10
10
  ]
@@ -0,0 +1,11 @@
1
+ from typing import Callable, Optional
2
+ from .interactive_viewer import InteractiveViewer
3
+
4
+ __version__ = "0.1.6"
5
+
6
+
7
+ def make_viewer(plot_func: Optional[Callable] = None):
8
+ viewer = InteractiveViewer()
9
+ if plot_func is not None:
10
+ viewer.set_plot(plot_func)
11
+ return viewer
File without changes