Closed HealthyPear closed 1 year ago
This is a great idea, a PR is welcome!
Note that you should be able to pass a full path to the towncrier config via conf.py
IIRC. I don't remember the details, though.. Somebody would need to dig into the source code.
@HealthyPear if you look one line below, you'll see that's redefined with an incoming setting, so it should be possible to set up towncrier_draft_config_path = 'towncrier.toml'
in conf.py
— that should work.
Though, you're right, and it'd be nice to have this Sphinx extension find it automatically…
This issue also affects Setuptools now that jaraco/skeleton is adopting towncrier.
Have you tried the workaround above? I'm on vacation this week so won't be able to look into it right now.
@webknjaz sorry for the big delay on this: I can confirm that your suggested workaround works!
It is true that this should be caught automatically, but since it's a configurable option I think this is sufficient (though it should be added to the documentation).
I'd prefer the FR to be implemented, still. So I won't be closing this issue even of someone sends a docs PR, which is always welcome :)
Have you tried the workaround above? I'm on vacation this week so won't be able to look into it right now.
Yes, the workaround is in place (pypa/setuptools@227ade7f8).
Unfortunately, it looks like towncrier doesn't expose the config file discovery without also parsing the config, meaning this project will necessarily have to provide its own copy of the logic.
The configuration of towncrier can also be placed in a dedicated configuration file named
towncrier.toml
with the same syntax, which is meant to be stored in the same place ofpyproject.toml
and takes precedence over it.It seems to me that this package doesn't respect this, and looks only at
pyproject.toml
: