codejourney 0.1.0__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.
- codejourney-0.1.0/PKG-INFO +61 -0
- codejourney-0.1.0/README.md +51 -0
- codejourney-0.1.0/pyproject.toml +23 -0
- codejourney-0.1.0/setup.cfg +4 -0
- codejourney-0.1.0/src/codejourney/__init__.py +796 -0
- codejourney-0.1.0/src/codejourney/analysis.py +297 -0
- codejourney-0.1.0/src/codejourney/visualization.py +396 -0
- codejourney-0.1.0/src/codejourney.egg-info/PKG-INFO +61 -0
- codejourney-0.1.0/src/codejourney.egg-info/SOURCES.txt +10 -0
- codejourney-0.1.0/src/codejourney.egg-info/dependency_links.txt +1 -0
- codejourney-0.1.0/src/codejourney.egg-info/top_level.txt +1 -0
- codejourney-0.1.0/tests/test_codejourney.py +469 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codejourney
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Educational Python execution visualization for Jupyter notebooks
|
|
5
|
+
Author: CS1302 Group 09
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ercch/cs1302-group09-project
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# CodeJourney
|
|
12
|
+
|
|
13
|
+
CodeJourney is an educational Python execution visualizer for Jupyter
|
|
14
|
+
Notebooks. It helps beginner programmers understand execution through
|
|
15
|
+
source-line highlighting, variable changes, loop-aware navigation, and
|
|
16
|
+
educational warnings. It is not a full debugger or a security sandbox.
|
|
17
|
+
|
|
18
|
+
CodeJourney captures source lines, safe variable snapshots, variable diffs,
|
|
19
|
+
collection changes, aliases, loop iterations, condition previews, and
|
|
20
|
+
educational warnings. `TraceResult` exposes structured Python data and renders
|
|
21
|
+
a self-contained interactive HTML view in Jupyter.
|
|
22
|
+
|
|
23
|
+
Install the published package from PyPI with:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
pip install codejourney
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from codejourney import run_viz
|
|
31
|
+
|
|
32
|
+
trace = run_viz("x = 1\nx += 1")
|
|
33
|
+
trace.events
|
|
34
|
+
trace._repr_html_()
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Importing `codejourney` in an IPython/Jupyter session registers the `%%pyviz`
|
|
38
|
+
cell magic automatically:
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
%%pyviz
|
|
42
|
+
total = 0
|
|
43
|
+
for number in [1, 2, 3]:
|
|
44
|
+
total += number
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`run_viz` accepts a `max_steps` limit (default: `500`):
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
trace = run_viz("count = 0\nwhile count < 3:\n count += 1", max_steps=100)
|
|
51
|
+
trace.warnings
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Execution is **not sandboxed**: analyzed code runs with the Python process's
|
|
55
|
+
normal permissions and may perform I/O or access the network. The step limit
|
|
56
|
+
bounds traced Python lines only; it is not a timeout or security boundary.
|
|
57
|
+
|
|
58
|
+
CodeJourney is an educational visualizer, not a full debugger. It does not
|
|
59
|
+
provide breakpoints or control a live execution session.
|
|
60
|
+
|
|
61
|
+
The project specification and roadmap are in [SPEC.md](./SPEC.md).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# CodeJourney
|
|
2
|
+
|
|
3
|
+
CodeJourney is an educational Python execution visualizer for Jupyter
|
|
4
|
+
Notebooks. It helps beginner programmers understand execution through
|
|
5
|
+
source-line highlighting, variable changes, loop-aware navigation, and
|
|
6
|
+
educational warnings. It is not a full debugger or a security sandbox.
|
|
7
|
+
|
|
8
|
+
CodeJourney captures source lines, safe variable snapshots, variable diffs,
|
|
9
|
+
collection changes, aliases, loop iterations, condition previews, and
|
|
10
|
+
educational warnings. `TraceResult` exposes structured Python data and renders
|
|
11
|
+
a self-contained interactive HTML view in Jupyter.
|
|
12
|
+
|
|
13
|
+
Install the published package from PyPI with:
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
pip install codejourney
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from codejourney import run_viz
|
|
21
|
+
|
|
22
|
+
trace = run_viz("x = 1\nx += 1")
|
|
23
|
+
trace.events
|
|
24
|
+
trace._repr_html_()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Importing `codejourney` in an IPython/Jupyter session registers the `%%pyviz`
|
|
28
|
+
cell magic automatically:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
%%pyviz
|
|
32
|
+
total = 0
|
|
33
|
+
for number in [1, 2, 3]:
|
|
34
|
+
total += number
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`run_viz` accepts a `max_steps` limit (default: `500`):
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
trace = run_viz("count = 0\nwhile count < 3:\n count += 1", max_steps=100)
|
|
41
|
+
trace.warnings
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Execution is **not sandboxed**: analyzed code runs with the Python process's
|
|
45
|
+
normal permissions and may perform I/O or access the network. The step limit
|
|
46
|
+
bounds traced Python lines only; it is not a timeout or security boundary.
|
|
47
|
+
|
|
48
|
+
CodeJourney is an educational visualizer, not a full debugger. It does not
|
|
49
|
+
provide breakpoints or control a live execution session.
|
|
50
|
+
|
|
51
|
+
The project specification and roadmap are in [SPEC.md](./SPEC.md).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "codejourney"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Educational Python execution visualization for Jupyter notebooks"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{name = "CS1302 Group 09"}]
|
|
13
|
+
|
|
14
|
+
[project.urls]
|
|
15
|
+
Homepage = "https://github.com/ercch/cs1302-group09-project"
|
|
16
|
+
|
|
17
|
+
[tool.setuptools.packages.find]
|
|
18
|
+
where = ["src"]
|
|
19
|
+
|
|
20
|
+
[tool.pytest.ini_options]
|
|
21
|
+
addopts = "-q"
|
|
22
|
+
testpaths = ["tests"]
|
|
23
|
+
pythonpath = ["src"]
|