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

ctx.data and ctx.assets are not populated by the config #451

Open
BPR02 opened this issue Nov 25, 2024 · 0 comments · May be fixed by #452
Open

ctx.data and ctx.assets are not populated by the config #451

BPR02 opened this issue Nov 25, 2024 · 0 comments · May be fixed by #452

Comments

@BPR02
Copy link

BPR02 commented Nov 25, 2024

In the beet_default of a custom plugin, the config values for data_pack and resource_pack are not inserted into the ctx.data and ctx.assets fields respectively. The config values are currently not available except for the internal plugin that generates the output (i.e. the pack.mcmeta file).

Example:

beet.yaml

data_pack:
  name: My Data Pack
  description: a data pack
  load: src
  pack_format: 6
  supported_formats: [0,6]

pipeline:
  - custom_plugin

custom_plugin.py

def beet_default(ctx: Context):
  print(ctx.data.name)
  print(ctx.data.description)
  print(ctx.data.pack_format)
  print(ctx.data.supported_formats)

Result
This will print out the following (i.e. the default values):

None

48
None

Expected
The values should return the value set in the config:

My Data Pack
a data pack
6
[0, 6]
@BPR02 BPR02 linked a pull request Nov 25, 2024 that will close this issue
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