Skip to content

Partially initialized folder #21

Description

@fblanchetNaN

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions