Skip to content

Automatically determine which files are added or removed between different options or versions #439

Closed

Description

@sjvrijn

Based on #383, #405, #429, #430, and #431.

Scenarios:

  • When upgrading the template from e.g. the minimal to RSE profile, new files will automatically be added. However, if at any point you decide to downgrade back, those additional files will still remain in the repo, since copier does not support automatic deletion of such files.
  • When migrating a repo from GitHub to GitLab, copier will not remove GitHub specific files, but only adds the new GitLab related files. This is of course also relevant in the reverse.

In both scenarios above, you will be left with additional files, but potentially without the knowledge of which files you can safely remove to clean up your repository. We should provide an overview of which files are added by various upgrades, so the user can safely remove just those files if ever undoing that upgrade.

Manually writing such an overview is also an option, but would be very susceptible to becoming outdated. My ideal solution would be a script that generates the list of which files are added/removed between predefined set of different choices or profiles, e.g.

  • RSE vs minimal
  • RSE vs optional
  • optional vs minimal
  • GitHub vs GitLab

Activity

  1. fdiblen commented on Aug 27, 2024

    @fdiblen
    Member

    The logic implemented in #547 is selecting the files for recommended profile. The files for the ask profile will depend on the selected features. Anything that cannot be selected by users will come with the minimum profile.

    An overview of files and profiles can be found at:

  2. fdiblen commented on Aug 27, 2024

    @fdiblen
    Member

    @sjvrijn can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions