Skip to content
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

move document package from internal to pkg #588

Merged
merged 8 commits into from
May 24, 2024

Conversation

jlewi
Copy link
Contributor

@jlewi jlewi commented May 24, 2024

The purpose of this PR is to make it possible to reuse runme's Markdown -> Notebook code.
In particular I'd like to use it to parse ChatGPT output into a notebook so that code blocks can be rendered in RunMe notebooks.

In Foyle, there is currently a bug with parsing out code blocks nested inside lists jlewi/foyle#114. Runme's code properly handles this use case. This will allow us to reuse RunMe's code to fix this problem.

@jlewi jlewi changed the title Jlewi/markdown move document package from internal to pkg May 24, 2024
@jlewi
Copy link
Contributor Author

jlewi commented May 24, 2024

Not sure what's going on with the test failure (possibly related to #587). It ran locally

=== RUN   Test_runnerService
--- PASS: Test_runnerService (0.00s)
=== RUN   Test_runnerService/Input
=== PAUSE Test_runnerService/Input
=== CONT  Test_runnerService/Input
2024-05-24T08:16:40.011-0700	INFO	runner/service.go:206	running Execute in runnerService	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB"}
2024-05-24T08:16:40.012-0700	DEBUG	runner/service.go:219	received initial request	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "req": "program_name:\"bash\"  commands:\"tr a-z x\"  tty:true  command_mode:COMMAND_MODE_INLINE_SHELL"}
2024-05-24T08:16:40.012-0700	DEBUG	runner/session.go:48	using simple env store
2024-05-24T08:16:40.012-0700	DEBUG	runner/service.go:293	command config	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "cfg": {"ProgramName":"bash","Args":null,"Directory":"","Session":{"ID":"01HYNJSVYCSG5QY968R3ZB80YY","Metadata":null},"Tty":true,"Winsize":{"Rows":0,"Cols":80,"X":0,"Y":0},"Stdin":{},"Stdout":{},"Stderr":{},"Commands":["tr a-z x"],"Script":"","CommandMode":1,"LanguageID":"","FileExtension":"","Logger":{}}}
2024-05-24T08:16:41.015-0700	DEBUG	runner/service.go:413	received input data	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "len": 4}
2024-05-24T08:16:41.016-0700	DEBUG	runner/service.go:448	sending data	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "lenStdout": 5, "lenStderr": 0}
2024-05-24T08:16:41.016-0700	DEBUG	runner/service.go:448	sending data	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "lenStdout": 5, "lenStderr": 0}
2024-05-24T08:16:42.015-0700	DEBUG	runner/service.go:413	received input data	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "len": 1}
2024-05-24T08:16:42.015-0700	INFO	runner/service.go:373	client closed the send direction; ignoring	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB"}
2024-05-24T08:16:42.015-0700	DEBUG	runner/command.go:379	finished copying from stdin to pty	{"count": 5}
2024-05-24T08:16:42.016-0700	DEBUG	runner/service.go:448	sending data	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "lenStdout": 4, "lenStderr": 0}
2024-05-24T08:16:42.025-0700	DEBUG	runner/command.go:404	finished copying from pty to stdout	{"count": 14}
2024-05-24T08:16:42.025-0700	INFO	runner/service.go:483	command finished	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "exitCode": 0}
2024-05-24T08:16:42.026-0700	INFO	runner/service.go:496	command was finalized successfully	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB"}
2024-05-24T08:16:42.026-0700	INFO	runner/service.go:525	sending the final response with exit code	{"_id": "01HYNJSVYB9QQTXHKHMGZSP3SB", "exitCode": 0}
    --- PASS: Test_runnerService/Input (2.02s)

@jlewi
Copy link
Contributor Author

jlewi commented May 24, 2024

Looks like the test failure was a flake because it passed at 8c1e584

@jlewi jlewi marked this pull request as ready for review May 24, 2024 15:42
@jlewi
Copy link
Contributor Author

jlewi commented May 24, 2024

@sourishkrout This is ready for you.

@sourishkrout sourishkrout self-requested a review May 24, 2024 17:11
Copy link
Member

@sourishkrout sourishkrout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straight-forward. LGTM ✅.

@sourishkrout sourishkrout merged commit 6d103ae into stateful:main May 24, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants