rstudio / vetiver-python

Version, share, deploy, and monitor models.
https://rstudio.github.io/vetiver-python/stable/
MIT License
60 stars 17 forks source link

allow rewriting py file #66

Closed gsingh91 closed 2 years ago

gsingh91 commented 2 years ago

Is your feature request related to a problem? Please describe. while using the vetiver_write_app function, it does not allow rewriting the file if the file already exists

Describe the solution you'd like Allow rewriting the file

Describe alternatives you've considered For now, we manually delete the file first before rerunning the function.

Additional context

isabelizimm commented 2 years ago

Thank you for this feedback 🙌 I had chosen to not allow rewriting to not have people accidentally rewriting/deploying app files without noticing. However, I can add an argument to allow for rewriting, so users can chose to turn off this safety net!

isabelizimm commented 2 years ago

I looped this into #65 since vetiver_write_app (now vetiver.write_app) got a refresh. Setting overwrite=True should give you the desired behavior!