Skip to content

Instantly share code, notes, and snippets.

@jsam
Last active April 28, 2020 13:01
Show Gist options
  • Save jsam/37a8fdacac8d197e10771cdc887ff2bb to your computer and use it in GitHub Desktop.
Save jsam/37a8fdacac8d197e10771cdc887ff2bb to your computer and use it in GitHub Desktop.
proposal
with this PR API usage would be something like this:
```
with chdir(project.abs_path):
with service_callback_communication(user_job):
import_dataset(...)
```
now cleaner version of this could be something like this
```
with project(path) as my_project: # this should under the hood chdir to the cwd and create project context manager
my_project.attach_output(stdout) # logs to the stdout as they happend (mainly for CLI usage) and it could be ommited completely
result = import_dataset(...)
if my_project.warnings:
pass # handle warnings
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment