Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce @package header support #586

Closed
omry opened this issue May 13, 2020 · 0 comments · Fixed by #584
Closed

Introduce @package header support #586

omry opened this issue May 13, 2020 · 0 comments · Fixed by #584
Milestone

Comments

@omry
Copy link
Collaborator

omry commented May 13, 2020

Package Header

Hydra 1.0 introduces a package header described in details in this design doc.

The header contains the @package directive, defined as:

@package: _global_ | package-path

  • _global_: Global package, this is the default behavior in Hydra 0.11
  • package-path: Explicit package path, such as oompa.loompa,
    the following keywords are replaced at runtime:
    • _group_: config group in dot notation: foo/bar/zoo.yaml -> foo.bar
    • _name_: config name: foo/bar/zoo.yaml -> zoo

Header format

The header format is generic:

# @oompa a.b.c
# @loompa: yup
x: 10

The resulting header is

{"oompa": "a.b.c", "loompa": "yup"}

Both colon and whitespace are accepted as a separator between the key and the value.
Unrecognized header keys (like oompa and loompa) are ignored.

@omry omry added this to the 1.0.0 milestone May 13, 2020
@omry omry mentioned this issue May 14, 2020
@omry omry closed this as completed in #584 May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant