Freed-Wu / setuptools-generate

Generate shell completions and man page when building a python package.
https://setuptools-generate.readthedocs.io/
GNU General Public License v3.0
0 stars 0 forks source link

Full explanation of how data files get generated in docs #3

Open dbarnett opened 1 week ago

dbarnett commented 1 week ago

Looking at the usage examples at https://setuptools-generate.readthedocs.io/en/latest/, I can see what files are produced and kinda how those correspond to the config, but it's hard to understand exactly where the file contents originate from and how the inputs get hooked up to the outputs. Specifically...

I'm gonna dig through some code and can probably find the answers to those questions but still worth mentioning the documentation fail, that I can't understand how this works without going past the docs to read the code.

dbarnett commented 1 week ago

And if it's helpful, a little more context about the specific problem I'm trying to solve when I got stuck on these questions: I'm using pydantic and want to generate a json schema data file, ideally checked in as part of the source tree so that I can link to it in directives like #:schema https://raw.githubusercontent.com/insanum/gcalcli/HEAD/data/config-schema.json. I remembered setuptools-scm had a mechanism to dump a ./_version.py file and wanted to do something similar, found this project through some web searches, but am having trouble figuring out if it can handle my case and if so exactly how I'd need to configure it for my use case.