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

Add a NEST documentation style guide #1986

Merged
merged 73 commits into from Jun 9, 2021

Conversation

jessica-mitchell
Copy link
Contributor

We've been discussing having a style guide for quite some time with the aim to help reduce inconsistencies in documentation writing.
This PR introduces a style guide inspired from several other style guides around the interwebs.

It includes several sections regarding English language as well as formatting and markup notation.

Please note:

There is a lot that still needs to be discussed here! @jougs @heplesser @terhorstd I'm sure you all have thoughts on this topic.

  • Any information that is missing? Anything too excessive?

  • Do we want to use an external style guide (like Microsoft's or Google's style guide) as a reference, in case people run into questions we do not address in our style guide?

  • Some of the choices like formatting marks made here are based on what we do usually or what has been discussed, but obviously we can make changes as we see fit. We just need to make sure that readability is improved with the choices we make not impeded.

Thanks to @sarakonradi for contributing to this as well.

@heplesser
Copy link
Contributor

@jessica-mitchell Thanks for all the fixes! But I still see no bullet points in the rendered lists. Looking at the HTML code reveals that the lists are properly encoded as lists, but with <ul class="simple"> and apparently

dl, ol, ul {
    margin: 0;
    padding: 0;
    list-style: none;
    list-style-image:none
}

in theme.css. I assume the zeros and nones here are the problem. It is the same with Safari and Firefox. Do you have any ideas?

@jessica-mitchell
Copy link
Contributor Author

Points still in need of discussion:

  • Should we say something about the use (or not) of contractions, e.g., "doesn't", "isn't", etc?
  • A policy on punctuation of and around "eg" and "ie"?
  • Conventions for reference labels (e.g., use sec_, fig_ eq_ at the beginning of each reference label to denote the type of reference)
  • numerate equations and refer to them?
  • Formatting: backticks, emphasis (bold, italic)
    • items which have markup with :role:`item`
    • What formatting should the following items have?
      • in line code - dbl back tick
      • paths/filenames - dbl back tick
      • commands - dbl back tick
      • model names - dbl back tick
      • parameters
      • variables (x)
      • values
      • variables with assigned values (x = 1)
      • values with symbols ( 5 mV)
      • types (bool, int)
      • meta characters (backslashes)
      • special characters (ampersands, math symbols)
      • words we want emphasized in text - bold / italic?

@jougs jougs requested review from heplesser and clinssen May 10, 2021 21:49
@jougs
Copy link
Contributor

jougs commented May 10, 2021

@jessica-mitchell: would it be possible to post a link to a rendered version? Thanks!

@jessica-mitchell
Copy link
Contributor Author

@jessica-mitchell: would it be possible to post a link to a rendered version? Thanks!

Yes, here you go: https://nest-test.readthedocs.io/en/nest_styleguide/contribute/styleguide/styleguide.html

Copy link
Contributor

@clinssen clinssen left a comment

Choose a reason for hiding this comment

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

There are many links in the document to external resources, consider gathering all of them in the References section at the bottom of the document.

doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
@jessica-mitchell
Copy link
Contributor Author

@clinssen most of your suggestion I added (see exceptions in comments above), including references at the bottom of the page. Thanks!

Copy link
Contributor

@heplesser heplesser left a comment

Choose a reason for hiding this comment

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

@jessica-mitchell Just a few more details ;).

doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
@jessica-mitchell
Copy link
Contributor Author

@heplesser I applied your suggestions, thanks!

Copy link
Contributor

@heplesser heplesser left a comment

Choose a reason for hiding this comment

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

@jessica-mitchell Great work!

@heplesser
Copy link
Contributor

@terhorstd @jougs You are either set up as reviewers or have commented earlier on the style guide. Do you still want to review/comment or can we go ahead and merge this one with two approvals in place?

Copy link
Contributor

@terhorstd terhorstd left a comment

Choose a reason for hiding this comment

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

Just two minor remarks. Since those are not critical we could also add them incrementally. Add them if possible.
👍

doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

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

Beautiful! I have added some minor suggestions.

doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
doc/userdoc/contribute/styleguide/styleguide.rst Outdated Show resolved Hide resolved
@jougs jougs merged commit 2080ce3 into nest:master Jun 9, 2021
Documentation automation moved this from Review to Done Jun 9, 2021
@jessica-mitchell jessica-mitchell deleted the nest_styleguide branch November 19, 2021 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation
Projects
Documentation
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants