robotframework-mind 0.1.1__tar.gz → 0.1.3__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 (34) hide show
  1. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/PKG-INFO +135 -123
  2. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/README.md +121 -109
  3. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind.py +442 -442
  4. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/__init__.py +1 -1
  5. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/editors.py +59 -59
  6. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/folders.py +52 -52
  7. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/icons.py +141 -141
  8. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/lucide.py +71 -71
  9. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/settings.py +84 -84
  10. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/theme.py +204 -204
  11. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/window.py +621 -621
  12. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robotframework_mind.egg-info/PKG-INFO +135 -123
  13. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/setup.cfg +4 -4
  14. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/tests/test_editors.py +27 -27
  15. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/tests/test_ui.py +353 -353
  16. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/tests/test_where.py +202 -202
  17. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/NOTICE +0 -0
  18. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/pyproject.toml +0 -0
  19. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/__main__.py +0 -0
  20. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/community_panel.py +0 -0
  21. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/engine.py +0 -0
  22. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/graph.py +0 -0
  23. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/graph_layout.py +0 -0
  24. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/graph_view.py +0 -0
  25. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/widgets.py +0 -0
  26. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robot_mind_app/worker.py +0 -0
  27. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robotframework_mind.egg-info/SOURCES.txt +0 -0
  28. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robotframework_mind.egg-info/dependency_links.txt +0 -0
  29. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robotframework_mind.egg-info/entry_points.txt +0 -0
  30. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robotframework_mind.egg-info/requires.txt +0 -0
  31. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/robotframework_mind.egg-info/top_level.txt +0 -0
  32. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/tests/test_graph.py +0 -0
  33. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/tests/test_graph_layout.py +0 -0
  34. {robotframework_mind-0.1.1 → robotframework_mind-0.1.3}/tests/test_query.py +0 -0
@@ -1,123 +1,135 @@
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.3
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
+ ## Install
30
+
31
+ From [PyPI](https://pypi.org/project/robotframework-mind/), in the test repo's
32
+ venv:
33
+
34
+ ```bash
35
+ pip install robotframework-mind # the CLI: python -m robot_mind
36
+ pip install robotframework-mind[gui] # also the desktop app: python -m robot_mind_app
37
+ ```
38
+
39
+ ## Requirements
40
+
41
+ Python 3.10+ and `robotframework` (the repo's own venv already has it). No
42
+ other packages for the CLI.
43
+
44
+ ## Run
45
+
46
+ From the test repo's venv (`python -m robot_mind` in place of
47
+ `python path/to/robot_mind.py` once it is installed):
48
+
49
+ ```bash
50
+ python path/to/robot_mind.py --root <repo> ticket PROJ-123
51
+ python path/to/robot_mind.py --root <repo> kw "Open Profile Browser"
52
+ python path/to/robot_mind.py --root <repo> callers "Open Profile Browser"
53
+ python path/to/robot_mind.py --root <repo> tag role:role_quality_control
54
+ python path/to/robot_mind.py --root <repo> find /api/items/query
55
+ ```
56
+
57
+ | Command | Returns |
58
+ |---|---|
59
+ | `ticket KEY` | tests and keywords whose tags, name or doc mention the key |
60
+ | `kw NAME` | every definition, matched the way Robot matches names (case, spaces and underscores ignored) |
61
+ | `callers NAME` | each call site: keyword, test or suite fixture, at the call line; falls back to substring when no exact name matches |
62
+ | `tag TAG` | tests with that tag; `role:*` matches a prefix |
63
+ | `find TEXT` | names, tags, docs, args, values and JSON entries containing the text, then the keywords that use a matching variable |
64
+
65
+ `--limit N` caps the lines (default 20). No hit prints `no match`. `--json`
66
+ prints the hits as a JSON array (each with `kind`, `name`, `file`, `line`; a
67
+ `callers` hit also carries `call_line`).
68
+
69
+ ## Desktop app
70
+
71
+ The same lookups in a window. Pick a repo (or a folder that holds several),
72
+ choose what to search for, and get the hits as a table or as a graph of what
73
+ they call, use and hit. Open takes you to the file at the line in your editor.
74
+
75
+ ![Results table](docs/screenshots/table.png)
76
+
77
+ ![Graph of who calls a keyword, coloured by repo](docs/screenshots/graph.png)
78
+
79
+ Install it from PyPI (see Install above), download a build from the releases
80
+ page, or run it from source:
81
+
82
+ ```bash
83
+ pip install -e .[gui]
84
+ python -m robot_mind_app
85
+ ```
86
+
87
+ ## How it compares
88
+
89
+ Five questions on a real API test repo (553 Robot and JSON files, 9,930
90
+ indexed entries), answered three ways: this tool, a plain `grep -rn` over the
91
+ same files, and graphify 0.9.102 (`graphify update`, then `graphify query`
92
+ with the question in words). Sizes are characters of output; "files" is how
93
+ many of the files that hold the answer the output names.
94
+
95
+ | Question | robotframework-mind | grep | grep, then open the matched files | graphify query |
96
+ |---|---|---|---|---|
97
+ | 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 |
98
+ | where a keyword is defined (1) | 167, 1 of 1 | 3,290, 1 of 1 | 346,452 | 6,804, 1 of 1 |
99
+ | 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 |
100
+ | 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 |
101
+ | 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 |
102
+
103
+ grep finds the same files and its matched lines are about as short, but a
104
+ matched line is the tag or the call, not the test or keyword around it, so
105
+ the next step is opening the files: that is the third column. graphify's
106
+ `explain` does better on keywords (all 10 caller files in 3,564 characters)
107
+ but found nothing for the ticket, the tag or the endpoint.
108
+
109
+ Building the index took 2.3 s the first time and 0.25 s after that; the
110
+ graphify build of the same repo took 44.9 s.
111
+
112
+ ## How it stays current
113
+
114
+ The index lives in `~/.cache/robotframework-mind/`, one file per repo, never
115
+ in the repo. Each call compares file times and sizes and parses only changed
116
+ files. It reads each `.gitignore` on the way down (and `.git/info/exclude`)
117
+ itself, without calling git, so ignored probes and results stay out; a nested
118
+ repo follows only its own rules. Hidden folders, `node_modules`, `results` and
119
+ virtualenvs are skipped too. A file git tracks but a rule ignores is left out
120
+ as well. Files over the size cap are skipped: 5 MB for `docs/` JSON, 50 MB for
121
+ `.robot` and `.resource`.
122
+
123
+ ## Tests
124
+
125
+ ```bash
126
+ python -m unittest tests.test_where
127
+ ```
128
+
129
+ ## Credits
130
+
131
+ The parsing approach follows the Robot Framework extractor in
132
+ [graphify](https://github.com/Graphify-Labs/graphify) by Safi Shamsi
133
+ (Apache-2.0): Robot's own `robot.api` parser with a `ModelVisitor`, and
134
+ keyword names normalized the way Robot resolves them. No graphify code is
135
+ 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](docs/screenshots/table.png)
62
+
63
+ ![Graph of who calls a keyword, coloured by repo](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`.