Skip to content

Storing remake files in mutiple directories #180

@tcholewik

Description

@tcholewik

I'm not sure I'm doing things correctly so correct me if I'm wrong.
Remake wants you to store all of remake files in your project root directory.

having ./.remake.yml that includes another remake file in a different directory is not allowed.
Example:

include:
  - ./src/remake.yml
  - ./../remake.yml

If so is anyone planning to enable such setup?

I can think of two reasons why this is a good idea.

Organize code better

When dealing with large amounts of source code developer is likely to organize it into subdirectories like:
./src/import
./src/features
./src/sampling
./src/models

If each one of those directories stores targets to be made then it would be convenient to store remake files in same directories. Currently, my workaround has been either using a comment in remake to deliminate different targets types/sections, and/or splitting makefile into smaller ones that mimic folder structure.

So my project would look like:
./src/import
./src/features
./src/sampling
./src/models
./.remake_src_import
./.remake_src_features
./.remake_src_sampling
./.remake_src_models

But this can grow very big, and it clutter root directory of your project

Integrate remake with tools that set their own root directory

R Notebooks force working directory to be the same as the directory they are located in.
Consequentially to use remake in a chunk, all notebooks need to live in the same directory as remake, which is messy. I have to admit that in case of rmarkdown & knitr packages workarounds exist but they are not great.

FYI the reason why I was trying to use remake in R Notebook was to load that already had been compiled by remake's target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions