Skip to content
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

Handle third party trademarks #168

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lwaern-intel
Copy link
Contributor

SIMICS-20769, SIMICS-20537, and SIMICS-20761

@syssimics
Copy link
Contributor

Verification #11294314: pass

Comment on lines +29 to +31
third_party_trademark_re = re.compile(
r'(?i:(' + '|'.join(third_party_trademarks)
+ r'))([*®™]|®|™|©|\\\*)?')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

urgh, I can't read this. Can you document what you mean with a unit test? A simple assert third_party_trademark_re.match(...) == ... on top level is sufficient.

Also, if you want to capture this in the future, then I suggest allowlist rather than blocklist, i.e. complain if the word before ® or does not match smth like Intel, Simics, DML.

Copy link
Contributor Author

@lwaern-intel lwaern-intel Mar 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

urgh, I can't read this. Can you document what you mean with a unit test? A simple assert third_party_trademark_re.match(...) == ... on top level is sufficient.

The regex can actually be improved a small bit (the second group doesn't need to try to match against anything but * or \*), but yes, I can do a unit test.

Also, if you want to capture this in the future, then I suggest allowlist rather than blocklist, i.e. complain if the word before ® or ™ does not match smth like Intel, Simics, DML.

Not good enough, that doesn't catch people using an external trademark without annotating it with an *, and that's the main point of the check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I want to keep the regex as-is and capitalize on it instead. Currently we check that an external trademark is annotated with * at least once per section it's referenced in. However, we should also check that no reference to an external trademark is annotated with ® or .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to protect from using external trademarks without *, then you need a much bigger list, because the world has more than two trademarked things.

And if we are to make this kind of check, then it's better to do it globally for all simics docs.

Comment on lines +56 to +60
acknowledgement = r'''
***
<sub>\* Other names and brands may be claimed as the property of others.</sub>
'''

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be part of the md_to_github script: The md sources are compiled into both simics-native docs and into github wiki, so better fix this in the md sources instead. Or is this stuff also auto-added by dodoc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Simics Online Documentation will have a separate solution that won't require authors to manually add acknowledgment lines. So this DML wiki exclusive logic should indeed be DML wiki exclusive.

Copy link
Contributor Author

@lwaern-intel lwaern-intel Mar 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively... the DML wiki could have a * Legal Information page... hmm...

Though that could be more cumbersome than an acknowledgement line (or awkward, if all it contains is the acknowledgement line)

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

Successfully merging this pull request may close these issues.

3 participants