Skip to content

Prevent future cookiecutter update merge conflict with physical file separation #90

@tlvu

Description

@tlvu

With my recent cookiecutter refresh work in Raven, Finch, Flyingpigeon and Emu (issue #61), it strikes me that the 2 files with the most merge conflicts are the Makefile and the .travis.yml file.

These 2 files are essential for dev workflow and testing automation and would benefit most from staying in sync effortlessly without merge conflicts with all the latest improvements.

I am proposing we split these files into a "generic" file and an "override" file. The intention is to provide a clear physical boundary indication that if the "generic" file changes, the change should be backported to the cookiecutter to be synced to other projects.

Right now, I think there are differences because it's not clear which changes are generic and should be backported and which are not.

For the Makefile, all the generic targets and variables stay there and all the project specific targets and variables will go into a Makefile.inc and we can include into the Makefile. This is a strategy documented in Scaraplate https://scaraplate.readthedocs.io/en/latest/template.html?highlight=makefile#include-files

For the .travis.yml, it looks like we can use import statement to import snippets of generic code into the main .travis.yml file, see https://docs.travis-ci.com/user/build-config-imports.

I think other files would also benefit from this physical file boundary separation but let's just start with just these 2 most useful files and see how it goes.

@cehbrecht @Zeitsperre I would like to have your opinion whether it's something desirable and doable before I spend time on this.

Another very closely related issue is I think we should invoke as much as possible make targets from Travis-CI so we can test those make targets that a real dev will use and by the same token make those Travis-CI setup steps available to the dev via make targets so dev can also reproduce problems found on Travis-CI locally.

So I am proposing we migrate all the setup and testing steps in the .travis.yml file into make targets and call those make targets from the .travis.yml file.

Again, @cehbrecht @Zeitsperre I would like your opinion on this before proceeding.

Metadata

Metadata

Assignees

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