Hi all,
The purpose of this thread
is to coordinate discussions on schelp style guide decisions (this does not pertain to the code examples). The idea is to group the large number of questions and decisions this involves into a slightly more manageable number of issues, for which I will then open issues on the github project page. Each issue will comprise multiple questions/decisions. The present thread isn’t about making those decisions, but rather about agreeing which decision goes into which issue. Maybe we can tentatively aim to settle this first part of the process by the End of March? (Even better if we’re done before then, but people have lives.)
I will be proposing an outline below to get us started, and will try to keep it updated as people make suggestions, additions, or ask me to remove things (I erred toward the overly explicit for now).
Blah blah blah
At the moment, I’m formulating all of this as questions, and including answers in round brackets where I think there may already be consensus, or if the old style guidelines provide an answer. If you think I am misrepresenting that consensus, let me know and I will remove that answer; no need to provide reasons (the fact that you disagree is reason enough). At any rate, the focus is on the questions for now.
[Square brackets around questions are things that occurred to me as I was writing this, but that I didn’t see mentioned anywhere. If two more people confirm that they these square-bracketed questions should be explicitly addressed in the style guide, I’ll remove the brackets; if two people think they’re irrelevant, I’ll remove the question. Things that are still in brackets at the end of this discussion won’t make it into the issues.]
Maybe this is organizational overkill at this point, but to make my life easier, you could begin your posts with a short heading describing what you suggest I change, and then the reasoning behind it. E.g., “Remove capitalization question”, “Move method description formatting question to general formatting issue”, etc.; also helpful: If you agree with someone else, post a quick +1 of their heading, e.g. “+1 Remove capitalization question”, or “+1 add commitment to luxury space communism to schelp style guidelines formatting issue”.
Issue 1: Formulate role of style guide for contributors and reviewers.
- Should style guide compliance ever be a criterion for PR rejection? (No.)
- Should regular help contributors be expected to adhere to style guide? (Yes.)
- Should first-time help contributors be expected to adhere to style guide? (They should be nudged toward it but this should not discourage contribution.)
- To what extent should occasional help contributors be expected to adhere to style guide?
- [Should we qualify style guide rules by importance? E.g., unified spelling may be more important than unified punctuation because of search, but in case someone asks, it would be nice to have a quick answer to the somewhat unimportant punctuation question of whether the comma comes before or after the quote sign.]
- [Should the style guide rules reflect the current state of the help files or some neater, ideal version?]
Issue 2: Text formatting, spelling. (The things user sees in the help browser)
NOTE: This issue should probably be split up into multiple smaller ones; current organization into a,b,c is a suggestion.
a) prose things:
- Which spelling do we expect? (American: synthesize, color, center, etc.)
- [Which punctuation rules do we expect? See above, not sure if this is worth discussing]
- What capitalization rules apply? (Usual English, maybe link to CMOS or some such; but capitalize classes such as AbstractFunction)
- [What citation style do we encourage? Again, low importance, but good to state somewhere so those who care can look it up.]
- Should we specify the implicit grammatical context of method descriptions?
- are paragraph breaks ok after just one line (or sentence) of text?
b. argument related:
- [Should argument names mentioned in the text be highlighted? Some files do this, some don’t.]
- boiler plate phrases for common args (freq, phase, amp, …)
- guidance on how to document arguments accept multiple values. E.g.
GrainBuf
’sinterp
argument accepts 1,2,4 — Inline description? bullet list? table? - guidance on how to format wording for default argument values and valid ranges, if provided.
- Confirm old style guide:
Either all of the parameters and/or return value should be documented, or none should be.
When documenting a parameter or return value, make sure to include the expected type.
- Coordinate with discussion re keyword argument representation in scdoc
c. misc formatting
- guidance on when to use
code::
(inline and block styles) vs.teletype::
(monospace, non-colorized) - formatting when referring to file names of file paths (e.g. italic,
emphasis::
) - Should all mentions of classes be tagged with links, e.g. link::Classes/AbstractFunction.schelp::? If not all, what are the conditions under which they should?
- [Should math:: typesetting be explicitly encouraged? Can’t expect everyone to know how to do that, but otoh whoever designs/documents a filter probably does know basic tex; I may be wrong.]
Issue 3: Text structure.
EDIT: Turns out almost all of what I had here is already addressed in the Writing Help guide and SCDoc Syntax document. (That’s the magic of schelp: The info is already there, except not where you happened to look.)
Maybe this means that the style guide should least link to those two docs … the old one doesn’t, maybe because it’s too obvious.
Issue 4: Text format (as seen by contributors, not HelpBrowser users).
REMINDER: This has (almost) no effect on the result in the HelpBrowser, which ignores single newlines (wrapping the text instead) turns double newlines into paragraph breaks, and ignores case in tags.
- Confirm old style guide:
use tabs for indentation in schelp-formatted text and code
private methods should be hidden using private::
prefer using the lowercase forms of tags (code:: ::, method::), unless this would break with convention in the context being edited
prefer using argument:: and returns:: instead of the method description body to document parameters
In this category, there are already the items in @prko’s PR (to be discussed there, pasting here for completeness):
should line length be limited to a certain number of characters, words, sentences?
Reordering the header: changing class:: to title::, reordering the tags in the header.
Arranging (adding or removing) whitespace after ::.
Blank line alignment: only one blank line between line codes.
Capitalisation of the first word after description::, sections::, subsection::, method::methodName\n and argument::argumentName\n.
Change 3rd singular present form without grammatical subject after section tags like description::, sections::, subsection::, method::methodName\n and argument::argumentName\n to instructive (declarative) tone.
Issue 5: Things that concern the entirety of the help:
- What different kinds of help files should there be, and how do we specify expectations for each? E.g., Class docs, reference, guides, tutorials, overviews…? Writing Help broaches this under “Directory Layout” but this could use some fleshing out.
- Should categories:: be treated as non-hierarchical? (Yes I think: they are a comma-separated list, more like tags than folders, although many files have just one assigned category.)
- Should we strive to eventually standardize the terminological inconsistencies that @prko brought up: (answer vs. return, item vs. element, …)?