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
[oneDAL] build warnings fix #154
[oneDAL] build warnings fix #154
Conversation
@rlnx @outoftardis what`s your opinion about this fix? Do we want to make it more consistent and refer to the terms always starting with capital or lowercase letter? |
I don't think it's a good idea to use capitalized terms in text. I provided a possible solution in the related issue. |
@outoftardis does it mean that I should not use capitalized references at all? There are some references to the topic sections, like "Dataset". When I somewhere else give a reference to this topic, it will be capitalized. Should I make lowercase aliases for such references? |
Agree with @outoftardis, capitalized word in the middle of the text seems odd to me.
Suppressing all the warnings related to the terms is also not very safe, as it could hide the real warning about missing term. |
@michael-smirnov, the best solution, probably, is to create custom role for Sphinx that would automatically add reference to the capitalized term. It should allow using non-capitilized text, but insert terms as if it was capitilized. :capterm:`feature` |
Shouldn't be difficult to implement: from docutils import nodes
def setup(app):
app.add_role('capterm', capterm_role)
def capterm_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
node = nodes.term(rawtext, text.title())
return [node], [] This can be added here. I'm not 100% sure the code snippet above is working as expected 😄. I used |
@rlnx @outoftardis you don't answer the main question - how to deal with links to a document sections? They are capitalized, for example:
Here Dataset is a link to the corresponding section, but feature is a link to the glossary term. |
Here we also have a term dataset. Do we want to distinguish cases when I refer to the dataset section and to the glossary term "dataset"? Or we should introduce some simple rule, e.g. reference always to the section if exists. |
@michael-smirnov, I prefer to avoid the capitalized links at all as I said previously.
Simple rule would be to refer the Dataset section always. |
Implemented custom role approach in #160 |
Closed because the better approach is proposed in #160 |
This PR fixes problem #147 and all other warnings from oneDAL component:
Warnings produced by case-sensitive checks are resolved this way:
Example:
table rows represent the observations and columns
represent the features.
Compiled version: https://michael-smirnov.github.io/oneapi-spec/elements/oneDAL/source/index.html