mlr-org / mlr-org/batchtools

ability to suppress warning on failure to source `source` when calling makeRegistry

Open
#281 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
184
Forks
53
Avg merge
7d 2h
Merged PRs (30d)
1

Description

the makeRegistry function contains this line

with_dir(reg$work.dir, loadRegistryDependencies(reg))

which itself will source the source argument of makeRegistries (if specified). This is often a good idea, since it allows testing of the source script in the current environment, but there may be reasons why sourcing that file in the current R session is definitely expected to fail (e.g. if it depends on specific environment variables set in the template file). It would be nice to have a way to suppress this warning message:

 handler("Failed to source file '%s': %s", fn,
                  as.character(ok))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with makeRegistry and its with_dir(reg$work.dir, loadRegistryDependencies(reg)) call, then inspect loadRegistryDependencies and the handler that reports "Failed to source file". Determine where an opt-out can be exposed, and verify that callers can suppress this warning while the existing warning remains available by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.