Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,19 @@ repos:
additional_dependencies:
- packaging==26.0
args: [--verbose]

# Vale prose linting for documentation. All styles are tracked in
# .vale/styles (no remote packages, so no `vale sync` needed). Vale needs
# docutils (rst2html) on PATH to lint reStructuredText, so both are
# installed into one isolated hook environment via the `vale` PyPI package
# (which bundles the official binary).
- repo: local
hooks:
- id: vale
name: vale
language: python
additional_dependencies: ['vale==3.13.0.0', 'docutils>=0.21']
entry: vale
args: [--output=line, --minAlertLevel=error]
types: [rst]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this be for md files too? The readmes?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes, please. Many Fern projects use MD and MDX. You all may at some point be asked strongly to consider switching to Fern.

Short positive plug-------i recently did a Sphinx to Fern conversion. Very clean, minimal changes, and lots of value on the side of faster publishing, easier for AI to scan docs to find what the user needs. Oh and some form of a much better search engine.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I haven't heard of fern! I will check it out.

files: ^docs/
15 changes: 15 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
StylesPath = .vale/styles
MinAlertLevel = suggestion

Vocab = NVIDIA

[*.rst]
BasedOnStyles = Vale, NVIDIA

# Skip inline Sphinx roles (:class:`...`, :const:`...`, etc.), Sphinx
# directive blocks (.. automodule:: ...), which rst2html leaves as text,
# and dotted code paths in prose: multi-segment (physicsnemo.metrics.mse)
# and lowercase two-segment (physicsnemo.mesh; first segment 2+ chars so
# "e.g."/"i.e." stay visible to NVIDIA.LatinAbbreviations).
TokenIgnores = (:[a-zA-Z:]+:`[^`]+`_?), (\b[A-Za-z_][\w]*\.[A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)+\b), (\b[a-z_][\w]+\.[a-z_][\w]*\b)
BlockIgnores = (?m)^\.\. [a-zA-Z:]+::[^\n]*(?:\n[ \t]+[^\n]*)*
273 changes: 273 additions & 0 deletions .vale/styles/NVIDIA/Adverbs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
# Adapted from the MIT-licensed Microsoft style for Vale
# (https://github.com/errata-ai/Microsoft).
extends: existence
message: "Remove '%s' if it's not important to the meaning of the statement."
ignorecase: true
level: suggestion
action:
name: remove
tokens:
- abnormally
- absentmindedly
- accidentally
- adventurously
- anxiously
- arrogantly
- awkwardly
- bashfully
- beautifully
- bitterly
- bleakly
- blindly
- blissfully
- boastfully
- boldly
- bravely
- briefly
- brightly
- briskly
- broadly
- busily
- calmly
- carefully
- carelessly
- cautiously
- cheerfully
- cleverly
- closely
- coaxingly
- colorfully
- continually
- coolly
- courageously
- crossly
- cruelly
- curiously
- daintily
- dearly
- deceivingly
- deeply

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"deeply-nested dictionary" seems fair game

- defiantly
- deliberately

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This one feels like it has a place in comments/docstrings? "This is deliberately left as X, for reason Y" conveys intent

- delightfully
- diligently
- dimly
- doubtfully
- dreamily
- easily
- effectively
Comment on lines +57 to +58

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am imagining these two are going to show up pretty often in our current docs :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

effective would be ok.....effectively doesn't show up that often in the tech docs I have edited. And i am trying to think back to all those HP, IBM, Cisco drafts of things. Usually, the point of the sentence has to do with how things are effective, so al we would have to do is be specific. i do love to use elegantly in how i personally describe how things work, but again, an odd word to run into outside of the marketing content.

- elegantly
- energetically
- enormously
- enthusiastically
- excitedly
- extremely
- fairly
- faithfully
- famously
- ferociously
- fervently
- fiercely
- fondly
- foolishly
- fortunately
- frankly
- frantically
- freely
- frenetically
- frightfully
- furiously
- generally
- generously
- gently
- gladly
- gleefully
- gracefully

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Graceful(ly) is often used in a technical sense to describe fallbacks

- gratefully
- greatly
- greedily
- happily
- hastily
- healthily
- heavily

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"heavily compressed"?

- helplessly
- honestly
- hopelessly
- hungrily
- innocently
- inquisitively
- intensely
- intently
- interestingly
- inwardly
- irritably
- jaggedly
- jealously
- jovially
- joyfully
- joyously
- jubilantly
- judgmentally
- justly
- keenly
- kiddingly
- kindheartedly
- knavishly
- knowingly
- knowledgeably
- lazily

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are we sure about this? I guess we use lazy quite a lot for dataloaders / datapipes

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I am going to switch to a knavish design for the dataloader. This will actually be really problematic if we merge this.

- lightly
- limply
- lively
- loftily
- longingly
- loosely
- loudly
- lovingly
- loyally
- madly
- majestically
- meaningfully
- mechanically
- merrily
- miserably
- mockingly
- mortally
- mysteriously
- naturally
- nearly
- neatly
- nervously
- nicely
- noisily
- obediently
- obnoxiously
- oddly
- offensively
- optimistically
- overconfidently
- painfully
- partially
- patiently
- perfectly
- playfully
- politely
- poorly
- positively
- potentially
- powerfully
- promptly
- properly
- punctually
- quaintly
- queasily
- queerly
- questionably
- quickly
- quietly
- quirkily
- quite
- quizzically
- randomly

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same with this. This might be very common in math context

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"randomly generated samples" etc. ?

- rapidly
- rarely
- readily
- really
- reassuringly
- recklessly
- regularly
- reluctantly
- repeatedly
- reproachfully
- restfully
- righteously
- rightfully
- rigidly
- roughly
- rudely
- safely
- scarcely
- scarily
- searchingly
- sedately
- seemingly
- selfishly
- separately
- seriously
- shakily
- sharply
- sheepishly
- shrilly
- shyly
- silently
- sleepily
- slowly
- smoothly
- softly
- solemnly
- solidly
- speedily
- stealthily
- sternly
- strictly
- suddenly
- supposedly
- surprisingly
- suspiciously
- sweetly
- swiftly
- sympathetically
- tenderly
- tensely
- terribly
- thankfully
- thoroughly
- thoughtfully
- tightly
- tremendously
- triumphantly
- truthfully
- ultimately
- unabashedly
- unaccountably
- unbearably
- unethically
- unexpectedly
- unfortunately
- unimpressively
- unnaturally
- unnecessarily
- urgently
- usefully
- uselessly
- utterly
- vacantly
- vaguely
- vainly
- valiantly
- vastly
- verbally
- very
- viciously
- victoriously
- violently
- vivaciously
- voluntarily
- warmly
- weakly
- wearily
- wetly
- wholly
- wildly
- willfully
- wisely
- woefully
- wonderfully
- worriedly
- yawningly
- yearningly
- yieldingly
- youthfully
- zealously
- zestfully
- zestily
8 changes: 8 additions & 0 deletions .vale/styles/NVIDIA/Ampersand.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# House style: spell out "and" in prose and headings; "&" only in
# code, product names, or where space is constrained (tables).
extends: existence
message: "Use 'and' instead of '&' in prose and headings."
level: warning
nonword: true
raw:
- ' & '
8 changes: 8 additions & 0 deletions .vale/styles/NVIDIA/Branding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NVIDIA writing guidelines: brand and product names use exact casing.
extends: substitution
message: "Use '%s' instead of '%s'."
level: error
ignorecase: false
swap:
'\b(?:Nvidia|nVidia|nVIDIA)\b': NVIDIA
'\b(?:NeMoTron|NemoTron)\b': Nemotron
15 changes: 15 additions & 0 deletions .vale/styles/NVIDIA/ConjunctiveAdverbs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NVIDIA writing guidelines (Technical Content > Readability):
# "Use academic or formal conjunctive adverbs sparingly."
extends: existence
message: "Use the formal conjunctive adverb '%s' sparingly."
level: suggestion
ignorecase: true
tokens:
- additionally
- consequently
- furthermore
- hence
- moreover
- thus
- undoubtedly
- whilst
27 changes: 27 additions & 0 deletions .vale/styles/NVIDIA/Contractions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# House style for formal technical documentation: expand contractions.
# (Replaces Microsoft.Contractions, which prefers the opposite.)
extends: substitution
message: "Use '%s' instead of '%s' in formal technical documentation."
level: warning
ignorecase: true
action:
name: replace
swap:
aren't: are not
can't: cannot
'can not': cannot
couldn't: could not
didn't: did not
doesn't: does not
don't: do not
hasn't: has not
haven't: have not
isn't: is not
"it's": it is
shouldn't: should not
"that's": that is
wasn't: was not
weren't: were not
won't: will not
wouldn't: would not
"you're": you are
9 changes: 9 additions & 0 deletions .vale/styles/NVIDIA/FileExtensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# NVIDIA writing guidelines (Technical Content > File Name Extensions):
# Extensions are lowercase with a period (a .tgz file); file types are
# uppercase without a period (a TGZ file).
extends: existence
message: "Use lowercase for file name extensions ('%s'); reserve uppercase (no period) for the file type."
level: warning
ignorecase: false
raw:
- '\.(?:ZIP|TAR|TGZ|GZ|BZ2|PDF|PNG|JPE?G|GIF|SVG|YAML|YML|JSON|XML|CSV|TXT|PY|RST|MD|SH|EXE|DEB|RPM|ONNX|WHL|HTML?)\b'
9 changes: 9 additions & 0 deletions .vale/styles/NVIDIA/GitHubRepo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# NVIDIA writing guidelines (Technical Content > GitHub Repositories):
# "Use a forward slash and a repository name for GitHub links."
# Correct: the /NVIDIA/NeMo GitHub repo. Incorrect: the GitHub repo.
extends: existence
message: "Name the repository when referring to it, e.g. 'the /NVIDIA/PhysicsNeMo GitHub repo'."
level: suggestion
ignorecase: true
raw:
- '\bthe GitHub repo(?:sitory)?\b'
Loading
Loading