Skip to content

Expose all answers in Result #92

@airibarne

Description

@airibarne

Hi @12rambau! Firstly, thank you for your contribution, excellent and very needed package within the Copier ecosystem 😄

Description

In my templates, I normally have hidden answers I use as computed values, e.g. a repo name derived from a project name by eliminating spaces and lowercasing. For that, I use the when: false pattern as described here.

Now, to properly write tests for my templates, I'd like to have access to that hidden values. With the current implementation, I cannot, since the Result class holds only the output of Worker._answers_to_remember(), which only contains those unhidden answers.

Solution

I'd like to have access to another attribute in the Result class that contains, maybe, the output of Worker.answers.user, or even the whole Worker.answers's copier.AnswersMap object.

Alternatives

I cannot figure out an alternative with the current implementation.

Extra context

I can make a PR, if you have some opinion on which object should we hold in the Result class, as long as you find the feature useful.

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