-
Notifications
You must be signed in to change notification settings - Fork 2
[lang] add support for python #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,23 @@ | ||
| # Tasks | ||
|
|
||
| 1. Handle running with no log format. | ||
| 1. Extract a thread id from log when available and associate with source ref. | ||
| 1. Generate call stack from exceptions. | ||
| 1. Support multiple source roots from CLI. | ||
| 1. Serialize state for re-use on subsequent executions | ||
| - [ ] Handle running CLI with no log format. | ||
| - TSS: Doesn't this work already? I echo | ||
| the body of the log message into log2src | ||
| and it can find the message. | ||
| - [ ] Extract a thread id from log when available and associate with source ref. | ||
| - [ ] Generate call stack from exceptions. | ||
| - [ ] Support multiple source roots from CLI. | ||
| - [ ] Serialize state for re-use on subsequent executions | ||
|
|
||
| ## Extension | ||
|
|
||
| 1. Work with non .log extension (.json, etc). | ||
| 1. Basic test coverage | ||
| 1. Support src -> log breakpoints | ||
| - [ ] Work with non .log extension (.json, etc). | ||
| - [ ] Basic test coverage | ||
| - [ ] Support src -> log breakpoints | ||
|
|
||
| ## Languages | ||
|
|
||
| 1. Python | ||
| 1. Go | ||
| 1. JavaScript | ||
| - [X] Python | ||
| - [ ] Go | ||
| - [ ] JavaScript | ||
| - [ ] Typescript | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about adding test coverage here vs in the root test directory. I guess this tests the library pretty thoroughly end to end, so maybe those tests should focus more on the CLI features. Does that make sense to you?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I add tests in lib.rs so that I can use the debugger. The stuff under |
||
| source: src/lib.rs | ||
| expression: src_refs | ||
| --- | ||
| - sourcePath: in-mem.py | ||
| language: Python | ||
| lineNumber: 3 | ||
| endLineNumber: 3 | ||
| column: 16 | ||
| name: main | ||
| text: "\"foo %s \\N{greek small letter pi}\"" | ||
| quality: 5 | ||
| pattern: "(?s)^foo (.+) \\w$" | ||
| args: | ||
| - Placeholder | ||
| vars: | ||
| - test_var | ||
| - sourcePath: in-mem.py | ||
| language: Python | ||
| lineNumber: 4 | ||
| endLineNumber: 4 | ||
| column: 17 | ||
| name: main | ||
| text: "f'Hello, {args[1]}!'" | ||
| quality: 7 | ||
| pattern: "(?s)^Hello, (.+)!$" | ||
| args: | ||
| - Named: "args[1]" | ||
| vars: [] | ||
| - sourcePath: in-mem.py | ||
| language: Python | ||
| lineNumber: 5 | ||
| endLineNumber: 5 | ||
| column: 19 | ||
| name: main | ||
| text: "f\"warning message:\\nlow disk space\"" | ||
| quality: 29 | ||
| pattern: "(?s)^warning message:\\nlow disk space$" | ||
| args: [] | ||
| vars: [] | ||
| - sourcePath: in-mem.py | ||
| language: Python | ||
| lineNumber: 6 | ||
| endLineNumber: 7 | ||
| column: 16 | ||
| name: main | ||
| text: "rf\"\"\"info message:\nprocessing started -- {args[0]}\"\"\"" | ||
| quality: 33 | ||
| pattern: "(?s)^info message:\\nprocessing started -- (.+)$" | ||
| args: | ||
| - Named: "args[0]" | ||
| vars: [] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I tried it recently, but there was a panic when something was using the log format. Could we remove the log formats from the test code if they're unneeded by the test case?