robotframework-mind 0.1.1__tar.gz → 0.1.4__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 (35) hide show
  1. {robotframework_mind-0.1.1/robotframework_mind.egg-info → robotframework_mind-0.1.4}/PKG-INFO +149 -123
  2. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/README.md +121 -109
  3. robotframework_mind-0.1.4/pyproject.toml +46 -0
  4. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind.py +442 -442
  5. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/__init__.py +1 -1
  6. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/editors.py +59 -59
  7. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/folders.py +52 -52
  8. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/icons.py +141 -141
  9. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/lucide.py +71 -71
  10. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/settings.py +84 -84
  11. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/theme.py +204 -204
  12. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/window.py +621 -621
  13. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4/robotframework_mind.egg-info}/PKG-INFO +149 -123
  14. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/setup.cfg +4 -4
  15. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/tests/test_editors.py +27 -27
  16. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/tests/test_ui.py +353 -353
  17. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/tests/test_where.py +202 -202
  18. robotframework_mind-0.1.1/pyproject.toml +0 -28
  19. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/NOTICE +0 -0
  20. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/__main__.py +0 -0
  21. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/community_panel.py +0 -0
  22. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/engine.py +0 -0
  23. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/graph.py +0 -0
  24. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/graph_layout.py +0 -0
  25. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/graph_view.py +0 -0
  26. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/widgets.py +0 -0
  27. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robot_mind_app/worker.py +0 -0
  28. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robotframework_mind.egg-info/SOURCES.txt +0 -0
  29. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robotframework_mind.egg-info/dependency_links.txt +0 -0
  30. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robotframework_mind.egg-info/entry_points.txt +0 -0
  31. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robotframework_mind.egg-info/requires.txt +0 -0
  32. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/robotframework_mind.egg-info/top_level.txt +0 -0
  33. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/tests/test_graph.py +0 -0
  34. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/tests/test_graph_layout.py +0 -0
  35. {robotframework_mind-0.1.1 → robotframework_mind-0.1.4}/tests/test_query.py +0 -0
@@ -1,123 +1,149 @@
1
- Metadata-Version: 2.4
2
- Name: robotframework-mind
3
- Version: 0.1.1
4
- Summary: Exact lookups over a Robot Framework test repo: CLI and desktop UI
5
- Requires-Python: >=3.10
6
- Description-Content-Type: text/markdown
7
- License-File: NOTICE
8
- Requires-Dist: robotframework>=7
9
- Provides-Extra: gui
10
- Requires-Dist: PySide6-Essentials>=6.12.0; extra == "gui"
11
- Provides-Extra: dev
12
- Requires-Dist: pytest>=9; extra == "dev"
13
- Dynamic: license-file
14
-
15
- # robotframework-mind
16
-
17
- Exact lookups over a Robot Framework test repo, for people and scripts. Ask
18
- which tests cover a ticket, who calls a keyword or where an endpoint is used,
19
- and get one line per hit with its `file:line` instead of reading whole suites.
20
-
21
- It indexes:
22
-
23
- - tests: name, tags (`bug:PROJ-123`, `role:...`, `op:GET /api/...`), first doc line, keyword calls
24
- - user keywords: name, arguments, first doc line, calls, variables used
25
- - variables from `*** Variables ***` and inline `VAR` statements, with their values
26
- - suite and test setup/teardown calls
27
- - JSON files under `docs/`, one entry per object key
28
-
29
- ## Requirements
30
-
31
- Python 3.10+ and `robotframework` (the repo's own venv already has it). No
32
- other packages.
33
-
34
- ## Run
35
-
36
- From the test repo's venv:
37
-
38
- ```bash
39
- python path/to/robot_mind.py --root <repo> ticket PROJ-123
40
- python path/to/robot_mind.py --root <repo> kw "Open Profile Browser"
41
- python path/to/robot_mind.py --root <repo> callers "Open Profile Browser"
42
- python path/to/robot_mind.py --root <repo> tag role:role_quality_control
43
- python path/to/robot_mind.py --root <repo> find /api/items/query
44
- ```
45
-
46
- | Command | Returns |
47
- |---|---|
48
- | `ticket KEY` | tests and keywords whose tags, name or doc mention the key |
49
- | `kw NAME` | every definition, matched the way Robot matches names (case, spaces and underscores ignored) |
50
- | `callers NAME` | each call site: keyword, test or suite fixture, at the call line; falls back to substring when no exact name matches |
51
- | `tag TAG` | tests with that tag; `role:*` matches a prefix |
52
- | `find TEXT` | names, tags, docs, args, values and JSON entries containing the text, then the keywords that use a matching variable |
53
-
54
- `--limit N` caps the lines (default 20). No hit prints `no match`. `--json`
55
- prints the hits as a JSON array (each with `kind`, `name`, `file`, `line`; a
56
- `callers` hit also carries `call_line`).
57
-
58
- ## Desktop app
59
-
60
- The same lookups in a window. Pick a repo (or a folder that holds several),
61
- choose what to search for, and get the hits as a table or as a graph of what
62
- they call, use and hit. Open takes you to the file at the line in your editor.
63
-
64
- ![Results table](docs/screenshots/table.png)
65
-
66
- ![Graph of who calls a keyword, coloured by repo](docs/screenshots/graph.png)
67
-
68
- Download a build from the releases page, or run it from source:
69
-
70
- ```bash
71
- pip install -e .[gui]
72
- python -m robot_mind_app
73
- ```
74
-
75
- ## How it compares
76
-
77
- Five questions on a real API test repo (553 Robot and JSON files, 9,930
78
- indexed entries), answered three ways: this tool, a plain `grep -rn` over the
79
- same files, and graphify 0.9.102 (`graphify update`, then `graphify query`
80
- with the question in words). Sizes are characters of output; "files" is how
81
- many of the files that hold the answer the output names.
82
-
83
- | Question | robotframework-mind | grep | grep, then open the matched files | graphify query |
84
- |---|---|---|---|---|
85
- | tests for a ticket (7 hits in 2 files) | 1,570 chars, 2 of 2 files | 2,181, 2 of 2 | 18,611 | 17,328, 0 of 2 |
86
- | where a keyword is defined (1) | 167, 1 of 1 | 3,290, 1 of 1 | 346,452 | 6,804, 1 of 1 |
87
- | who calls that keyword (30 calls in 10 files) | 3,411, 10 of 10 | 3,290, 10 of 10 | 346,452 | 6,802, 3 of 10 |
88
- | tests with a tag (60 in 27 files) | 41,107, 27 of 27 | 38,363, 27 of 27 | 136,226 | 6,704, 0 of 27 |
89
- | where an endpoint is used (8 in 6 files) | 2,879, 6 of 6 | 1,935, 6 of 6 | 2,642,809 | 6,838, 0 of 6 |
90
-
91
- grep finds the same files and its matched lines are about as short, but a
92
- matched line is the tag or the call, not the test or keyword around it, so
93
- the next step is opening the files: that is the third column. graphify's
94
- `explain` does better on keywords (all 10 caller files in 3,564 characters)
95
- but found nothing for the ticket, the tag or the endpoint.
96
-
97
- Building the index took 2.3 s the first time and 0.25 s after that; the
98
- graphify build of the same repo took 44.9 s.
99
-
100
- ## How it stays current
101
-
102
- The index lives in `~/.cache/robotframework-mind/`, one file per repo, never
103
- in the repo. Each call compares file times and sizes and parses only changed
104
- files. It reads each `.gitignore` on the way down (and `.git/info/exclude`)
105
- itself, without calling git, so ignored probes and results stay out; a nested
106
- repo follows only its own rules. Hidden folders, `node_modules`, `results` and
107
- virtualenvs are skipped too. A file git tracks but a rule ignores is left out
108
- as well. Files over the size cap are skipped: 5 MB for `docs/` JSON, 50 MB for
109
- `.robot` and `.resource`.
110
-
111
- ## Tests
112
-
113
- ```bash
114
- python -m unittest tests.test_where
115
- ```
116
-
117
- ## Credits
118
-
119
- The parsing approach follows the Robot Framework extractor in
120
- [graphify](https://github.com/Graphify-Labs/graphify) by Safi Shamsi
121
- (Apache-2.0): Robot's own `robot.api` parser with a `ModelVisitor`, and
122
- keyword names normalized the way Robot resolves them. No graphify code is
123
- copied. See `NOTICE`.
1
+ Metadata-Version: 2.4
2
+ Name: robotframework-mind
3
+ Version: 0.1.4
4
+ Summary: Exact lookups over a Robot Framework test repo: CLI and desktop UI
5
+ Author: Abdulwahab Isam
6
+ Project-URL: Homepage, https://ai94iq.github.io/robotframework-mind/
7
+ Project-URL: Source, https://github.com/ai94iq/robotframework-mind
8
+ Project-URL: Issues, https://github.com/ai94iq/robotframework-mind/issues
9
+ Project-URL: Releases, https://github.com/ai94iq/robotframework-mind/releases
10
+ Keywords: robotframework,robot-framework,test-automation,code-search,ticket,keyword
11
+ Classifier: Framework :: Robot Framework
12
+ Classifier: Framework :: Robot Framework :: Tool
13
+ Classifier: Topic :: Software Development :: Testing
14
+ Classifier: Environment :: Console
15
+ Classifier: Environment :: X11 Applications :: Qt
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Operating System :: OS Independent
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: NOTICE
22
+ Requires-Dist: robotframework>=7
23
+ Provides-Extra: gui
24
+ Requires-Dist: PySide6-Essentials>=6.12.0; extra == "gui"
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=9; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ # robotframework-mind
30
+
31
+ Exact lookups over a Robot Framework test repo, for people and scripts. Ask
32
+ which tests cover a ticket, who calls a keyword or where an endpoint is used,
33
+ and get one line per hit with its `file:line` instead of reading whole suites.
34
+
35
+ It indexes:
36
+
37
+ - tests: name, tags (`bug:PROJ-123`, `role:...`, `op:GET /api/...`), first doc line, keyword calls
38
+ - user keywords: name, arguments, first doc line, calls, variables used
39
+ - variables from `*** Variables ***` and inline `VAR` statements, with their values
40
+ - suite and test setup/teardown calls
41
+ - JSON files under `docs/`, one entry per object key
42
+
43
+ ## Install
44
+
45
+ From [PyPI](https://pypi.org/project/robotframework-mind/), in the test repo's
46
+ venv:
47
+
48
+ ```bash
49
+ pip install robotframework-mind # the CLI: python -m robot_mind
50
+ pip install robotframework-mind[gui] # also the desktop app: python -m robot_mind_app
51
+ ```
52
+
53
+ ## Requirements
54
+
55
+ Python 3.10+ and `robotframework` (the repo's own venv already has it). No
56
+ other packages for the CLI.
57
+
58
+ ## Run
59
+
60
+ From the test repo's venv (`python -m robot_mind` in place of
61
+ `python path/to/robot_mind.py` once it is installed):
62
+
63
+ ```bash
64
+ python path/to/robot_mind.py --root <repo> ticket PROJ-123
65
+ python path/to/robot_mind.py --root <repo> kw "Open Profile Browser"
66
+ python path/to/robot_mind.py --root <repo> callers "Open Profile Browser"
67
+ python path/to/robot_mind.py --root <repo> tag role:role_quality_control
68
+ python path/to/robot_mind.py --root <repo> find /api/items/query
69
+ ```
70
+
71
+ | Command | Returns |
72
+ |---|---|
73
+ | `ticket KEY` | tests and keywords whose tags, name or doc mention the key |
74
+ | `kw NAME` | every definition, matched the way Robot matches names (case, spaces and underscores ignored) |
75
+ | `callers NAME` | each call site: keyword, test or suite fixture, at the call line; falls back to substring when no exact name matches |
76
+ | `tag TAG` | tests with that tag; `role:*` matches a prefix |
77
+ | `find TEXT` | names, tags, docs, args, values and JSON entries containing the text, then the keywords that use a matching variable |
78
+
79
+ `--limit N` caps the lines (default 20). No hit prints `no match`. `--json`
80
+ prints the hits as a JSON array (each with `kind`, `name`, `file`, `line`; a
81
+ `callers` hit also carries `call_line`).
82
+
83
+ ## Desktop app
84
+
85
+ The same lookups in a window. Pick a repo (or a folder that holds several),
86
+ choose what to search for, and get the hits as a table or as a graph of what
87
+ they call, use and hit. Open takes you to the file at the line in your editor.
88
+
89
+ ![Results table](https://raw.githubusercontent.com/ai94iq/robotframework-mind/main/docs/screenshots/table.png)
90
+
91
+ ![Graph of a search, coloured by repo](https://raw.githubusercontent.com/ai94iq/robotframework-mind/main/docs/screenshots/graph.png)
92
+
93
+ Install it from PyPI (see Install above), download a build from the releases
94
+ page, or run it from source:
95
+
96
+ ```bash
97
+ pip install -e .[gui]
98
+ python -m robot_mind_app
99
+ ```
100
+
101
+ ## How it compares
102
+
103
+ Five questions on a real API test repo (553 Robot and JSON files, 9,930
104
+ indexed entries), answered three ways: this tool, a plain `grep -rn` over the
105
+ same files, and graphify 0.9.102 (`graphify update`, then `graphify query`
106
+ with the question in words). Sizes are characters of output; "files" is how
107
+ many of the files that hold the answer the output names.
108
+
109
+ | Question | robotframework-mind | grep | grep, then open the matched files | graphify query |
110
+ |---|---|---|---|---|
111
+ | tests for a ticket (7 hits in 2 files) | 1,570 chars, 2 of 2 files | 2,181, 2 of 2 | 18,611 | 17,328, 0 of 2 |
112
+ | where a keyword is defined (1) | 167, 1 of 1 | 3,290, 1 of 1 | 346,452 | 6,804, 1 of 1 |
113
+ | who calls that keyword (30 calls in 10 files) | 3,411, 10 of 10 | 3,290, 10 of 10 | 346,452 | 6,802, 3 of 10 |
114
+ | tests with a tag (60 in 27 files) | 41,107, 27 of 27 | 38,363, 27 of 27 | 136,226 | 6,704, 0 of 27 |
115
+ | where an endpoint is used (8 in 6 files) | 2,879, 6 of 6 | 1,935, 6 of 6 | 2,642,809 | 6,838, 0 of 6 |
116
+
117
+ grep finds the same files and its matched lines are about as short, but a
118
+ matched line is the tag or the call, not the test or keyword around it, so
119
+ the next step is opening the files: that is the third column. graphify's
120
+ `explain` does better on keywords (all 10 caller files in 3,564 characters)
121
+ but found nothing for the ticket, the tag or the endpoint.
122
+
123
+ Building the index took 2.3 s the first time and 0.25 s after that; the
124
+ graphify build of the same repo took 44.9 s.
125
+
126
+ ## How it stays current
127
+
128
+ The index lives in `~/.cache/robotframework-mind/`, one file per repo, never
129
+ in the repo. Each call compares file times and sizes and parses only changed
130
+ files. It reads each `.gitignore` on the way down (and `.git/info/exclude`)
131
+ itself, without calling git, so ignored probes and results stay out; a nested
132
+ repo follows only its own rules. Hidden folders, `node_modules`, `results` and
133
+ virtualenvs are skipped too. A file git tracks but a rule ignores is left out
134
+ as well. Files over the size cap are skipped: 5 MB for `docs/` JSON, 50 MB for
135
+ `.robot` and `.resource`.
136
+
137
+ ## Tests
138
+
139
+ ```bash
140
+ python -m unittest tests.test_where
141
+ ```
142
+
143
+ ## Credits
144
+
145
+ The parsing approach follows the Robot Framework extractor in
146
+ [graphify](https://github.com/Graphify-Labs/graphify) by Safi Shamsi
147
+ (Apache-2.0): Robot's own `robot.api` parser with a `ModelVisitor`, and
148
+ keyword names normalized the way Robot resolves them. No graphify code is
149
+ copied. See `NOTICE`.
@@ -1,109 +1,121 @@
1
- # robotframework-mind
2
-
3
- Exact lookups over a Robot Framework test repo, for people and scripts. Ask
4
- which tests cover a ticket, who calls a keyword or where an endpoint is used,
5
- and get one line per hit with its `file:line` instead of reading whole suites.
6
-
7
- It indexes:
8
-
9
- - tests: name, tags (`bug:PROJ-123`, `role:...`, `op:GET /api/...`), first doc line, keyword calls
10
- - user keywords: name, arguments, first doc line, calls, variables used
11
- - variables from `*** Variables ***` and inline `VAR` statements, with their values
12
- - suite and test setup/teardown calls
13
- - JSON files under `docs/`, one entry per object key
14
-
15
- ## Requirements
16
-
17
- Python 3.10+ and `robotframework` (the repo's own venv already has it). No
18
- other packages.
19
-
20
- ## Run
21
-
22
- From the test repo's venv:
23
-
24
- ```bash
25
- python path/to/robot_mind.py --root <repo> ticket PROJ-123
26
- python path/to/robot_mind.py --root <repo> kw "Open Profile Browser"
27
- python path/to/robot_mind.py --root <repo> callers "Open Profile Browser"
28
- python path/to/robot_mind.py --root <repo> tag role:role_quality_control
29
- python path/to/robot_mind.py --root <repo> find /api/items/query
30
- ```
31
-
32
- | Command | Returns |
33
- |---|---|
34
- | `ticket KEY` | tests and keywords whose tags, name or doc mention the key |
35
- | `kw NAME` | every definition, matched the way Robot matches names (case, spaces and underscores ignored) |
36
- | `callers NAME` | each call site: keyword, test or suite fixture, at the call line; falls back to substring when no exact name matches |
37
- | `tag TAG` | tests with that tag; `role:*` matches a prefix |
38
- | `find TEXT` | names, tags, docs, args, values and JSON entries containing the text, then the keywords that use a matching variable |
39
-
40
- `--limit N` caps the lines (default 20). No hit prints `no match`. `--json`
41
- prints the hits as a JSON array (each with `kind`, `name`, `file`, `line`; a
42
- `callers` hit also carries `call_line`).
43
-
44
- ## Desktop app
45
-
46
- The same lookups in a window. Pick a repo (or a folder that holds several),
47
- choose what to search for, and get the hits as a table or as a graph of what
48
- they call, use and hit. Open takes you to the file at the line in your editor.
49
-
50
- ![Results table](docs/screenshots/table.png)
51
-
52
- ![Graph of who calls a keyword, coloured by repo](docs/screenshots/graph.png)
53
-
54
- Download a build from the releases page, or run it from source:
55
-
56
- ```bash
57
- pip install -e .[gui]
58
- python -m robot_mind_app
59
- ```
60
-
61
- ## How it compares
62
-
63
- Five questions on a real API test repo (553 Robot and JSON files, 9,930
64
- indexed entries), answered three ways: this tool, a plain `grep -rn` over the
65
- same files, and graphify 0.9.102 (`graphify update`, then `graphify query`
66
- with the question in words). Sizes are characters of output; "files" is how
67
- many of the files that hold the answer the output names.
68
-
69
- | Question | robotframework-mind | grep | grep, then open the matched files | graphify query |
70
- |---|---|---|---|---|
71
- | tests for a ticket (7 hits in 2 files) | 1,570 chars, 2 of 2 files | 2,181, 2 of 2 | 18,611 | 17,328, 0 of 2 |
72
- | where a keyword is defined (1) | 167, 1 of 1 | 3,290, 1 of 1 | 346,452 | 6,804, 1 of 1 |
73
- | who calls that keyword (30 calls in 10 files) | 3,411, 10 of 10 | 3,290, 10 of 10 | 346,452 | 6,802, 3 of 10 |
74
- | tests with a tag (60 in 27 files) | 41,107, 27 of 27 | 38,363, 27 of 27 | 136,226 | 6,704, 0 of 27 |
75
- | where an endpoint is used (8 in 6 files) | 2,879, 6 of 6 | 1,935, 6 of 6 | 2,642,809 | 6,838, 0 of 6 |
76
-
77
- grep finds the same files and its matched lines are about as short, but a
78
- matched line is the tag or the call, not the test or keyword around it, so
79
- the next step is opening the files: that is the third column. graphify's
80
- `explain` does better on keywords (all 10 caller files in 3,564 characters)
81
- but found nothing for the ticket, the tag or the endpoint.
82
-
83
- Building the index took 2.3 s the first time and 0.25 s after that; the
84
- graphify build of the same repo took 44.9 s.
85
-
86
- ## How it stays current
87
-
88
- The index lives in `~/.cache/robotframework-mind/`, one file per repo, never
89
- in the repo. Each call compares file times and sizes and parses only changed
90
- files. It reads each `.gitignore` on the way down (and `.git/info/exclude`)
91
- itself, without calling git, so ignored probes and results stay out; a nested
92
- repo follows only its own rules. Hidden folders, `node_modules`, `results` and
93
- virtualenvs are skipped too. A file git tracks but a rule ignores is left out
94
- as well. Files over the size cap are skipped: 5 MB for `docs/` JSON, 50 MB for
95
- `.robot` and `.resource`.
96
-
97
- ## Tests
98
-
99
- ```bash
100
- python -m unittest tests.test_where
101
- ```
102
-
103
- ## Credits
104
-
105
- The parsing approach follows the Robot Framework extractor in
106
- [graphify](https://github.com/Graphify-Labs/graphify) by Safi Shamsi
107
- (Apache-2.0): Robot's own `robot.api` parser with a `ModelVisitor`, and
108
- keyword names normalized the way Robot resolves them. No graphify code is
109
- copied. See `NOTICE`.
1
+ # robotframework-mind
2
+
3
+ Exact lookups over a Robot Framework test repo, for people and scripts. Ask
4
+ which tests cover a ticket, who calls a keyword or where an endpoint is used,
5
+ and get one line per hit with its `file:line` instead of reading whole suites.
6
+
7
+ It indexes:
8
+
9
+ - tests: name, tags (`bug:PROJ-123`, `role:...`, `op:GET /api/...`), first doc line, keyword calls
10
+ - user keywords: name, arguments, first doc line, calls, variables used
11
+ - variables from `*** Variables ***` and inline `VAR` statements, with their values
12
+ - suite and test setup/teardown calls
13
+ - JSON files under `docs/`, one entry per object key
14
+
15
+ ## Install
16
+
17
+ From [PyPI](https://pypi.org/project/robotframework-mind/), in the test repo's
18
+ venv:
19
+
20
+ ```bash
21
+ pip install robotframework-mind # the CLI: python -m robot_mind
22
+ pip install robotframework-mind[gui] # also the desktop app: python -m robot_mind_app
23
+ ```
24
+
25
+ ## Requirements
26
+
27
+ Python 3.10+ and `robotframework` (the repo's own venv already has it). No
28
+ other packages for the CLI.
29
+
30
+ ## Run
31
+
32
+ From the test repo's venv (`python -m robot_mind` in place of
33
+ `python path/to/robot_mind.py` once it is installed):
34
+
35
+ ```bash
36
+ python path/to/robot_mind.py --root <repo> ticket PROJ-123
37
+ python path/to/robot_mind.py --root <repo> kw "Open Profile Browser"
38
+ python path/to/robot_mind.py --root <repo> callers "Open Profile Browser"
39
+ python path/to/robot_mind.py --root <repo> tag role:role_quality_control
40
+ python path/to/robot_mind.py --root <repo> find /api/items/query
41
+ ```
42
+
43
+ | Command | Returns |
44
+ |---|---|
45
+ | `ticket KEY` | tests and keywords whose tags, name or doc mention the key |
46
+ | `kw NAME` | every definition, matched the way Robot matches names (case, spaces and underscores ignored) |
47
+ | `callers NAME` | each call site: keyword, test or suite fixture, at the call line; falls back to substring when no exact name matches |
48
+ | `tag TAG` | tests with that tag; `role:*` matches a prefix |
49
+ | `find TEXT` | names, tags, docs, args, values and JSON entries containing the text, then the keywords that use a matching variable |
50
+
51
+ `--limit N` caps the lines (default 20). No hit prints `no match`. `--json`
52
+ prints the hits as a JSON array (each with `kind`, `name`, `file`, `line`; a
53
+ `callers` hit also carries `call_line`).
54
+
55
+ ## Desktop app
56
+
57
+ The same lookups in a window. Pick a repo (or a folder that holds several),
58
+ choose what to search for, and get the hits as a table or as a graph of what
59
+ they call, use and hit. Open takes you to the file at the line in your editor.
60
+
61
+ ![Results table](https://raw.githubusercontent.com/ai94iq/robotframework-mind/main/docs/screenshots/table.png)
62
+
63
+ ![Graph of a search, coloured by repo](https://raw.githubusercontent.com/ai94iq/robotframework-mind/main/docs/screenshots/graph.png)
64
+
65
+ Install it from PyPI (see Install above), download a build from the releases
66
+ page, or run it from source:
67
+
68
+ ```bash
69
+ pip install -e .[gui]
70
+ python -m robot_mind_app
71
+ ```
72
+
73
+ ## How it compares
74
+
75
+ Five questions on a real API test repo (553 Robot and JSON files, 9,930
76
+ indexed entries), answered three ways: this tool, a plain `grep -rn` over the
77
+ same files, and graphify 0.9.102 (`graphify update`, then `graphify query`
78
+ with the question in words). Sizes are characters of output; "files" is how
79
+ many of the files that hold the answer the output names.
80
+
81
+ | Question | robotframework-mind | grep | grep, then open the matched files | graphify query |
82
+ |---|---|---|---|---|
83
+ | tests for a ticket (7 hits in 2 files) | 1,570 chars, 2 of 2 files | 2,181, 2 of 2 | 18,611 | 17,328, 0 of 2 |
84
+ | where a keyword is defined (1) | 167, 1 of 1 | 3,290, 1 of 1 | 346,452 | 6,804, 1 of 1 |
85
+ | who calls that keyword (30 calls in 10 files) | 3,411, 10 of 10 | 3,290, 10 of 10 | 346,452 | 6,802, 3 of 10 |
86
+ | tests with a tag (60 in 27 files) | 41,107, 27 of 27 | 38,363, 27 of 27 | 136,226 | 6,704, 0 of 27 |
87
+ | where an endpoint is used (8 in 6 files) | 2,879, 6 of 6 | 1,935, 6 of 6 | 2,642,809 | 6,838, 0 of 6 |
88
+
89
+ grep finds the same files and its matched lines are about as short, but a
90
+ matched line is the tag or the call, not the test or keyword around it, so
91
+ the next step is opening the files: that is the third column. graphify's
92
+ `explain` does better on keywords (all 10 caller files in 3,564 characters)
93
+ but found nothing for the ticket, the tag or the endpoint.
94
+
95
+ Building the index took 2.3 s the first time and 0.25 s after that; the
96
+ graphify build of the same repo took 44.9 s.
97
+
98
+ ## How it stays current
99
+
100
+ The index lives in `~/.cache/robotframework-mind/`, one file per repo, never
101
+ in the repo. Each call compares file times and sizes and parses only changed
102
+ files. It reads each `.gitignore` on the way down (and `.git/info/exclude`)
103
+ itself, without calling git, so ignored probes and results stay out; a nested
104
+ repo follows only its own rules. Hidden folders, `node_modules`, `results` and
105
+ virtualenvs are skipped too. A file git tracks but a rule ignores is left out
106
+ as well. Files over the size cap are skipped: 5 MB for `docs/` JSON, 50 MB for
107
+ `.robot` and `.resource`.
108
+
109
+ ## Tests
110
+
111
+ ```bash
112
+ python -m unittest tests.test_where
113
+ ```
114
+
115
+ ## Credits
116
+
117
+ The parsing approach follows the Robot Framework extractor in
118
+ [graphify](https://github.com/Graphify-Labs/graphify) by Safi Shamsi
119
+ (Apache-2.0): Robot's own `robot.api` parser with a `ModelVisitor`, and
120
+ keyword names normalized the way Robot resolves them. No graphify code is
121
+ copied. See `NOTICE`.
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["setuptools>=80"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "robotframework-mind"
7
+ dynamic = ["version"]
8
+ description = "Exact lookups over a Robot Framework test repo: CLI and desktop UI"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{ name = "Abdulwahab Isam" }]
12
+ keywords = ["robotframework", "robot-framework", "test-automation", "code-search", "ticket", "keyword"]
13
+ dependencies = ["robotframework>=7"]
14
+ classifiers = [
15
+ "Framework :: Robot Framework",
16
+ "Framework :: Robot Framework :: Tool",
17
+ "Topic :: Software Development :: Testing",
18
+ "Environment :: Console",
19
+ "Environment :: X11 Applications :: Qt",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3 :: Only",
22
+ "Operating System :: OS Independent",
23
+ ]
24
+
25
+ [project.optional-dependencies]
26
+ gui = ["PySide6-Essentials>=6.12.0"]
27
+ dev = ["pytest>=9"]
28
+
29
+ [project.urls]
30
+ Homepage = "https://ai94iq.github.io/robotframework-mind/"
31
+ Source = "https://github.com/ai94iq/robotframework-mind"
32
+ Issues = "https://github.com/ai94iq/robotframework-mind/issues"
33
+ Releases = "https://github.com/ai94iq/robotframework-mind/releases"
34
+
35
+ [project.gui-scripts]
36
+ robot-mind-gui = "robot_mind_app.__main__:main"
37
+
38
+ [tool.setuptools.dynamic]
39
+ version = { attr = "robot_mind_app.__version__" }
40
+
41
+ [tool.setuptools]
42
+ py-modules = ["robot_mind"]
43
+ packages = ["robot_mind_app"]
44
+
45
+ [tool.pytest.ini_options]
46
+ testpaths = ["tests"]