Last active
April 28, 2020 13:01
-
-
Save jsam/37a8fdacac8d197e10771cdc887ff2bb to your computer and use it in GitHub Desktop.
proposal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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