plainbook 0.0.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.
Files changed (37) hide show
  1. plainbook-0.0.6/LICENSE.md +11 -0
  2. plainbook-0.0.6/PKG-INFO +75 -0
  3. plainbook-0.0.6/README.md +53 -0
  4. plainbook-0.0.6/plainbook/__init__.py +1 -0
  5. plainbook-0.0.6/plainbook/css/font-awesome.css +2337 -0
  6. plainbook-0.0.6/plainbook/css/font-awesome.min.css +4 -0
  7. plainbook-0.0.6/plainbook/css/main.css +1 -0
  8. plainbook-0.0.6/plainbook/css/prism.min.css +1 -0
  9. plainbook-0.0.6/plainbook/fonts/FontAwesome.otf +0 -0
  10. plainbook-0.0.6/plainbook/fonts/fontawesome-webfont.eot +0 -0
  11. plainbook-0.0.6/plainbook/fonts/fontawesome-webfont.svg +2671 -0
  12. plainbook-0.0.6/plainbook/fonts/fontawesome-webfont.ttf +0 -0
  13. plainbook-0.0.6/plainbook/fonts/fontawesome-webfont.woff +0 -0
  14. plainbook-0.0.6/plainbook/fonts/fontawesome-webfont.woff2 +0 -0
  15. plainbook-0.0.6/plainbook/gemini.py +87 -0
  16. plainbook-0.0.6/plainbook/js/CodeCell.js +170 -0
  17. plainbook-0.0.6/plainbook/js/ExplanationEditor.js +169 -0
  18. plainbook-0.0.6/plainbook/js/MarkdownCell.js +125 -0
  19. plainbook-0.0.6/plainbook/js/OutputRenderer.js +63 -0
  20. plainbook-0.0.6/plainbook/js/ValidationCell.js +45 -0
  21. plainbook-0.0.6/plainbook/js/markdown-it.min.js +3 -0
  22. plainbook-0.0.6/plainbook/js/nb.js +529 -0
  23. plainbook-0.0.6/plainbook/js/prism-python.min.js +1 -0
  24. plainbook-0.0.6/plainbook/js/prism.min.js +1 -0
  25. plainbook-0.0.6/plainbook/js/vue.esm-browser.js +18530 -0
  26. plainbook-0.0.6/plainbook/main.py +325 -0
  27. plainbook-0.0.6/plainbook/plainbook.py +402 -0
  28. plainbook-0.0.6/plainbook/views/index.html +273 -0
  29. plainbook-0.0.6/plainbook.egg-info/PKG-INFO +75 -0
  30. plainbook-0.0.6/plainbook.egg-info/SOURCES.txt +35 -0
  31. plainbook-0.0.6/plainbook.egg-info/dependency_links.txt +1 -0
  32. plainbook-0.0.6/plainbook.egg-info/entry_points.txt +2 -0
  33. plainbook-0.0.6/plainbook.egg-info/requires.txt +8 -0
  34. plainbook-0.0.6/plainbook.egg-info/top_level.txt +1 -0
  35. plainbook-0.0.6/pyproject.toml +38 -0
  36. plainbook-0.0.6/requirements.txt +9 -0
  37. plainbook-0.0.6/setup.cfg +4 -0
@@ -0,0 +1,11 @@
1
+ Copyright 2025 Luca de Alfaro
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+
9
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
+
11
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.4
2
+ Name: plainbook
3
+ Version: 0.0.6
4
+ Summary: Plain Language Notebooks
5
+ Author-email: Luca de Alfaro <dealfaro@acm.org>
6
+ License: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/lucadealfaro/plainbook
8
+ Project-URL: Issues, https://github.com/lucadealfaro/plainbook/issues
9
+ Keywords: notebook,jupyter,natural language,data science
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE.md
13
+ Requires-Dist: bottle
14
+ Requires-Dist: cherrypy
15
+ Requires-Dist: google-genai
16
+ Requires-Dist: ipykernel
17
+ Requires-Dist: jupyter_client
18
+ Requires-Dist: nbclient
19
+ Requires-Dist: nbformat
20
+ Requires-Dist: pyyaml
21
+ Dynamic: license-file
22
+
23
+ # Plainbook: Natural Language Notebooks.
24
+
25
+ Authors:
26
+
27
+ Luca de Alfaro, dealfaro@acm.org
28
+
29
+ ## Overview
30
+
31
+ Plain Language Notebooks (Plainbook) allow you to create notebooks where the cells are written in natural language.
32
+ The natural language is automatically converted to code via AI, and executed. The results of the execution are then displayed below the natural language cell.
33
+
34
+ **In Plainbooks, natural language is the programming language.**
35
+ The goal of Plainbooks is to allow users to create and share notebooks in natural language, without having to write code, or understand the code that is shared with them.
36
+ Actions to be performed are described in natural language, and the natural languate is retained, so users can edit it, improve it, and share it.
37
+ We are building methods for verifying that the code implementation is faithful to the natural language description, so that users can trust the notebooks they receive from others.
38
+
39
+ Plain Language Notebooks have two type of cells:
40
+
41
+ * **Action cells**, where the user describes in natural language the action to be performed (e.g., "Load the dataset from file data.csv and display the first 10 rows"). The system converts the description to code, executes it, and displays the results below the cell.
42
+
43
+ * **Comment cells**, where the user can add comments, section headers, and so forth, using markdown syntax.
44
+
45
+ Differently from other notebook systems, Plainbooks are executed from start to end: random cell execution order, as in Jupyter notebooks, is not allowed. This ensures that the results are obtained in the same order in which a human reader would read the notebook.
46
+
47
+ This project is in an early stage of development.
48
+
49
+ ## Running Plainbook
50
+
51
+ ```bash
52
+
53
+ plainbook path/to/notebook.nlb
54
+ ```
55
+
56
+ (where `.nlb` is a Natural Language Notebook file; you can use other extensions if you wish).
57
+ For a list of command-lien options, do:
58
+
59
+ ```bash
60
+ plainbook --help
61
+ ```
62
+
63
+ If you want to be able to generate or check code from explanations, you need to add a Gemini API key in the settings (click on the gear icon in the top-right corner of the web interface).
64
+
65
+ ## Development
66
+
67
+ Run with:
68
+
69
+ ```bash
70
+ python -m plainbook.main --debug
71
+ ```
72
+
73
+ Running with the VSCode launch.json does not work, due to a VScode bug/quirk.
74
+ See DEVELOP.md for development instructions, and see TODO.md for planned features.
75
+
@@ -0,0 +1,53 @@
1
+ # Plainbook: Natural Language Notebooks.
2
+
3
+ Authors:
4
+
5
+ Luca de Alfaro, dealfaro@acm.org
6
+
7
+ ## Overview
8
+
9
+ Plain Language Notebooks (Plainbook) allow you to create notebooks where the cells are written in natural language.
10
+ The natural language is automatically converted to code via AI, and executed. The results of the execution are then displayed below the natural language cell.
11
+
12
+ **In Plainbooks, natural language is the programming language.**
13
+ The goal of Plainbooks is to allow users to create and share notebooks in natural language, without having to write code, or understand the code that is shared with them.
14
+ Actions to be performed are described in natural language, and the natural languate is retained, so users can edit it, improve it, and share it.
15
+ We are building methods for verifying that the code implementation is faithful to the natural language description, so that users can trust the notebooks they receive from others.
16
+
17
+ Plain Language Notebooks have two type of cells:
18
+
19
+ * **Action cells**, where the user describes in natural language the action to be performed (e.g., "Load the dataset from file data.csv and display the first 10 rows"). The system converts the description to code, executes it, and displays the results below the cell.
20
+
21
+ * **Comment cells**, where the user can add comments, section headers, and so forth, using markdown syntax.
22
+
23
+ Differently from other notebook systems, Plainbooks are executed from start to end: random cell execution order, as in Jupyter notebooks, is not allowed. This ensures that the results are obtained in the same order in which a human reader would read the notebook.
24
+
25
+ This project is in an early stage of development.
26
+
27
+ ## Running Plainbook
28
+
29
+ ```bash
30
+
31
+ plainbook path/to/notebook.nlb
32
+ ```
33
+
34
+ (where `.nlb` is a Natural Language Notebook file; you can use other extensions if you wish).
35
+ For a list of command-lien options, do:
36
+
37
+ ```bash
38
+ plainbook --help
39
+ ```
40
+
41
+ If you want to be able to generate or check code from explanations, you need to add a Gemini API key in the settings (click on the gear icon in the top-right corner of the web interface).
42
+
43
+ ## Development
44
+
45
+ Run with:
46
+
47
+ ```bash
48
+ python -m plainbook.main --debug
49
+ ```
50
+
51
+ Running with the VSCode launch.json does not work, due to a VScode bug/quirk.
52
+ See DEVELOP.md for development instructions, and see TODO.md for planned features.
53
+
@@ -0,0 +1 @@
1
+