Skip to content

Minimal configuration errors due to missing tool.vulcan configuration #64

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

Open
danjones1618 opened this issue Apr 26, 2023 · 0 comments

Comments

@danjones1618
Copy link

With the minimal pyproject.toml listed in the README.md, vulcan errors with the following:

$ vulcan add textual

Traceback (most recent call last):
  File "/home/dan/.local/bin/vulcan", line 8, in <module>
    sys.exit(main())
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1654, in invoke
    super().invoke(ctx)
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/vulcan/cli.py", line 54, in main
    ctx.obj = Vulcan.from_source(Path().absolute(), fail_on_missing_lock=False)
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/vulcan/__init__.py", line 75, in from_source
    config = all_config['tool']['vulcan']  # type: ignore[index]
  File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/tomlkit/container.py", line 650, in __getitem__
    raise NonExistentKey(key)
tomlkit.exceptions.NonExistentKey: 'Key "tool" does not exist.'

I think the appropriate solution is to not require an empty [tool.vulcan] section as apposed to adding the blank section to the configuration.

On a side note, "dependencies" should probably be added to the dynamic array

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

No branches or pull requests

1 participant