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

Partially initialized folder #21

Open
fblanchetNaN opened this issue May 25, 2021 · 0 comments
Open

Partially initialized folder #21

fblanchetNaN opened this issue May 25, 2021 · 0 comments

Comments

@fblanchetNaN
Copy link
Collaborator

In PR #15 incipyt should be called from an empty/non-existent folder, however it could be a too much restrictive requirement.

Actually this requirement ensures incipyt do not destroy anything, but maybe we can setup a more finer policy.

Let's consider three cases:

  • Git: Just skip git init if the folder is already under supervision ? Also skip git add ?
  • package folder: Just skip creation of the folder ? What about __init__.py if it doesn't exist ? Create or skip ?
  • setup.cfg: What to do ?

A quite easy and general way to do that is setup policy at tool level; three (condition, policy) -- one for each step, pre/add_to/post, policy being skip/fail -- if the condition is met, then the policy is apply. Is any of them is "fail", incipyt stops. Eventually with a superset policy being "do not overwrite any file".

A related question is, what we do if incipyt failed while some files have been written ? Delete or keep them in place ?

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

1 participant