cr-proc 0.1.8__py3-none-any.whl → 0.1.10__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.
- code_recorder_processor/api/build.py +6 -0
- code_recorder_processor/api/document.py +337 -0
- code_recorder_processor/api/load.py +58 -0
- code_recorder_processor/api/output.py +70 -0
- code_recorder_processor/api/verify.py +171 -32
- code_recorder_processor/cli.py +514 -494
- code_recorder_processor/display.py +201 -0
- code_recorder_processor/playback.py +116 -0
- cr_proc-0.1.10.dist-info/METADATA +280 -0
- cr_proc-0.1.10.dist-info/RECORD +13 -0
- cr_proc-0.1.8.dist-info/METADATA +0 -142
- cr_proc-0.1.8.dist-info/RECORD +0 -9
- {cr_proc-0.1.8.dist-info → cr_proc-0.1.10.dist-info}/WHEEL +0 -0
- {cr_proc-0.1.8.dist-info → cr_proc-0.1.10.dist-info}/entry_points.txt +0 -0
cr_proc-0.1.8.dist-info/METADATA
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cr_proc
|
|
3
|
-
Version: 0.1.8
|
|
4
|
-
Summary: A tool for processing BYU CS code recording files.
|
|
5
|
-
Author: Ethan Dye
|
|
6
|
-
Author-email: mrtops03@gmail.com
|
|
7
|
-
Requires-Python: >=3.14
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
10
|
-
Requires-Dist: py-jsonl (>=1.3.22,<2.0.0)
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
|
|
13
|
-
# `code_recorder_processor`
|
|
14
|
-
|
|
15
|
-
[](https://github.com/BYU-CS-Course-Ops/code_recorder_processor/actions/workflows/ci.yml)
|
|
16
|
-
|
|
17
|
-
This contains code to process and verify the `*.recorder.jsonl.gz` files that
|
|
18
|
-
are produced by the
|
|
19
|
-
[jetbrains-recorder](https://github.com/BYU-CS-Course-Ops/jetbrains-recorder).
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
Install the package and its dependencies using Poetry:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
poetry install
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Usage
|
|
30
|
-
|
|
31
|
-
The processor can be run using the `cr_proc` command with two arguments:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
poetry run cr_proc <path-to-jsonl-file> <path-to-template-file>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Arguments
|
|
38
|
-
|
|
39
|
-
- `<path-to-jsonl-file>`: Path to the compressed JSONL file
|
|
40
|
-
(`*.recorder.jsonl.gz`) produced by the jetbrains-recorder
|
|
41
|
-
- `<path-to-template-file>`: Path to the initial template file that was recorded
|
|
42
|
-
|
|
43
|
-
### Options
|
|
44
|
-
|
|
45
|
-
- `--time-limit MINUTES`: (Optional) Maximum allowed time in minutes between the
|
|
46
|
-
first and last edit in the recording. If the elapsed time exceeds this limit,
|
|
47
|
-
the recording is flagged as suspicious. Useful for detecting unusually long
|
|
48
|
-
work sessions or potential external assistance.
|
|
49
|
-
|
|
50
|
-
### Example
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
poetry run cr_proc homework0.recording.jsonl.gz homework0.py
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
With time limit flag:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
poetry run cr_proc homework0.recording.jsonl.gz homework0.py --time-limit 30
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
This will flag the recording if more than 30 minutes elapsed between the first and last edit.
|
|
63
|
-
|
|
64
|
-
The processor will:
|
|
65
|
-
|
|
66
|
-
1. Load the recorded events from the JSONL file
|
|
67
|
-
2. Verify that the initial event matches the template (allowances for newline
|
|
68
|
-
differences are made)
|
|
69
|
-
3. Reconstruct the final file state by applying all recorded events
|
|
70
|
-
4. Output the reconstructed file contents to stdout
|
|
71
|
-
|
|
72
|
-
### Output
|
|
73
|
-
|
|
74
|
-
The reconstructed file is printed to stdout. Any warnings or errors are printed
|
|
75
|
-
to stderr, including:
|
|
76
|
-
|
|
77
|
-
- The document path being processed
|
|
78
|
-
- Suspicious copy-paste and AI activity indicators
|
|
79
|
-
|
|
80
|
-
### Suspicious Activity Detection
|
|
81
|
-
|
|
82
|
-
The processor automatically detects and reports three types of suspicious activity
|
|
83
|
-
patterns:
|
|
84
|
-
|
|
85
|
-
#### 1. Time Limit Exceeded
|
|
86
|
-
|
|
87
|
-
When the `--time-limit` flag is specified, the processor flags recordings where
|
|
88
|
-
the elapsed time between the first and last edit exceeds the specified limit.
|
|
89
|
-
This can indicate unusually long work sessions or potential external assistance.
|
|
90
|
-
|
|
91
|
-
**Example warning:**
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Time limit exceeded!
|
|
95
|
-
Limit: 30 minutes
|
|
96
|
-
Elapsed: 45.5 minutes
|
|
97
|
-
First edit: 2025-01-15T10:00:00+00:00
|
|
98
|
-
Last edit: 2025-01-15T10:45:30+00:00
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
#### 2. External Copy-Paste (Multi-line Pastes)
|
|
102
|
-
|
|
103
|
-
The processor flags multi-line additions (more than one line) that do not appear
|
|
104
|
-
to be copied from within the document itself. These indicate content pasted from
|
|
105
|
-
external sources.
|
|
106
|
-
|
|
107
|
-
**Example warning:**
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
Event #15 (multi-line external paste): 5 lines, 156 chars - newFragment: def helper_function():...
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
#### 3. Rapid One-line Pastes (AI Indicator)
|
|
114
|
-
|
|
115
|
-
When 3 or more single-line pastes occur within a 1-second window, this is
|
|
116
|
-
flagged as a potential AI activity indicator. Human typing does not typically
|
|
117
|
-
produce this pattern; rapid sequential pastes suggest automated code generation.
|
|
118
|
-
|
|
119
|
-
**Example warning:**
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
Events #42-#44 (rapid one-line pastes (AI indicator)): 3 lines, 89 chars
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Error Handling
|
|
126
|
-
|
|
127
|
-
If verification fails (the recorded initial state doesn't match the template),
|
|
128
|
-
the processor will:
|
|
129
|
-
|
|
130
|
-
- Print an error message to stderr
|
|
131
|
-
- Display a diff showing the differences
|
|
132
|
-
- Exit with status code 1
|
|
133
|
-
|
|
134
|
-
If file loading or processing errors occur, the processor will:
|
|
135
|
-
|
|
136
|
-
- Print a descriptive error message to stderr
|
|
137
|
-
- Exit with status code 1
|
|
138
|
-
|
|
139
|
-
## Future Ideas
|
|
140
|
-
|
|
141
|
-
- Check for odd typing behavior
|
|
142
|
-
|
cr_proc-0.1.8.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
code_recorder_processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
code_recorder_processor/api/build.py,sha256=-EMg0w-llblJ_N_vs_B1kOsAOwiV-TYetAXiOY6PcWs,7643
|
|
3
|
-
code_recorder_processor/api/load.py,sha256=ZKoheLsEoGJ3fpAtPauoeEyNUhGLhUYSwjRsqt1m-TI,3947
|
|
4
|
-
code_recorder_processor/api/verify.py,sha256=bElag22J16vUjfg58-6gtqksuhyef4_2VIPxht8jp8o,29038
|
|
5
|
-
code_recorder_processor/cli.py,sha256=_3HA2wVSciQNIOVni8LmUT0inK_QXkYPBC1WGsWmYLw,19221
|
|
6
|
-
cr_proc-0.1.8.dist-info/METADATA,sha256=QNZNA2wJPWEhdhfSB0ZhOzZza-wJbseLL_mQpYmS3tM,4070
|
|
7
|
-
cr_proc-0.1.8.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
8
|
-
cr_proc-0.1.8.dist-info/entry_points.txt,sha256=xb5dPAAWN1Z9NUHpvZgNakaslR1MVOERf_IfpG_M04M,77
|
|
9
|
-
cr_proc-0.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|