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

clean up generated files after successful run or before the next run #36

Closed
romeokienzler opened this issue Jan 24, 2024 · 8 comments
Closed
Assignees

Comments

@romeokienzler
Copy link
Member

current problem:

c3_create_gridwrapper s1download.ipynb -p "grid_process" -r us.icr.io/geodn creates gw_s1download.py and s1download.py - the latter causes the next run to fail with:

AssertionError: File s1download.py already exist. Cannot convert notebook.

@blumenstiel
Copy link
Collaborator

The file should be deleted after a successful run.
Your sure that the previous run did not fail / that you don't have a local file with the same name?

@blumenstiel
Copy link
Collaborator

We might want to delete the temporary file after an unsuccessful run.

@romeokienzler
Copy link
Member Author

yes, sorry, that's what I wanted to say, the compiler should cleanup all artifacts, ideally also when failing, but at least before the next start

@romeokienzler
Copy link
Member Author

@blumenstiel

@romeokienzler
Copy link
Member Author

image

@blumenstiel
Copy link
Collaborator

@romeokienzler I removed these additional files in the current version.

The question is, if we also want to remove any files when running the grid wrapper. Currently, you can run the grid wrapper but not create an operator because you want to review the code first. Therefore, we should not delete the adjusted component file or the grid wrapper file. If we change the behavior such as create_gridwrapper always creates an operator, it would make more sense to clean up the generated files.

@romeokienzler
Copy link
Member Author

Good point, I wasn't even aware that you can create a grid warpper without creating an operator.

What aboud adding a flag --keep-generated-code and also keep the Dockerfile? That one I was missing most.

If false (default) all generated assets are deleted on a successful run and tried to be deleted on failure and are deleted on a subsequent run before processing

@blumenstiel
Copy link
Collaborator

Added in #39

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

No branches or pull requests

2 participants