-
Notifications
You must be signed in to change notification settings - Fork 1
🐛 Handle id_required for src-trace #35
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this optional, so if users do not provide the ID, you calculate it yourself from the project/directory/file (replace all non-identifier chars with _). Or calculate a short hash from it, just like SN does. Something reproducible with the same inputs.
That ID information will presumably not be helpful because why would people link to the src-trace directive itself?
But if we want src-trace to be a dedicated need, then we should do that. Forcing users to set IDs that will not be useful is meeh.
A src-trace for the same combination of project, directory, and file cannot exist in a Sphinx project because that leads to duplicate needs.
See also #15 (comment)
57714cb to
b0f8a08
Compare
Co-authored-by: Marco Heinemann <[email protected]>
Issues
#23
#15
Summary
Based on the issues, adapt the directive
src-traceto haveidfield, so that the configid_required=Truedoes not block the need generation. This adaptation react to needs configid_from_titleandid_lengthImplementation
idis optional and when it's not given, the hash is always generated fromtitileandproject. Ifdirectoryorfileis given, it's taken as well.id_required