-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add snoop as potential run option #3
Conversation
Pull Request Test Coverage Report for Build 2157877032
💛 - Coveralls |
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.
Thanks. Instead of just passing through kwargs, I think there should be an optional snoop_config
argument, and that should be used to populate the snoop Config
so that things other than color
can be changed.
I added a method snoop_config for this in the runner, which hopefully provides this flexibility then. |
How is snoop_config meant to be used? By overriding it in a subclass? Are users expected to call it? When does the default in exec_snoop get used? |
Subclasses can indeed override snoop_config to tune it to their needs. They shouldn't need to call it themselves unless they also override execute in this case. The default in exec_snoop is currently not used, so that could be removed I suppose. |
One problem with this API is that it's not easy to extend the default behaviour with a small tweak. You pretty much have to copy the code from the original method. Snoop's Config doesn't support copying or incremental changes. |
What do you propose then? Something similar to the original approach using kwargs? |
To clarify, I meant that you'd call ( |
…ently it takes snoop more than 0.1 seconds to get started.
On the contrary, it means that those internal directories shouldn't be traced. If you remove those lines, you can see a test failure with extra output from snoop tracing code from python_runner. Thanks for the PR. I'm happy to merge, are you? |
Good to know. Then I believe this is good to go! Could you then also create a new release? |
Released 0.6.0 |
Pull Request Test Coverage Report for Build 2157877032Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 2157104796Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Adds features discussed in dodona-edu/papyros#109 (comment)
Extra:
run and run_async accept arbitrary kwargs which are passed to execute, which can then be passed to e.g. exec_snoop to set Snoop config values.
I wasn't entirely sure what to do with the internal directory updates you did in futurecoder. Is this something we want in general, to also trace our inner workings? I don't see how I would want that for example in Papyros, or is that needed to be able to trace the methods in the user's file?