include style guide for easyconfigs (REVIEW)#311
Open
boegel wants to merge 12 commits intoeasybuilders:developfrom
Open
include style guide for easyconfigs (REVIEW)#311boegel wants to merge 12 commits intoeasybuilders:developfrom
boegel wants to merge 12 commits intoeasybuilders:developfrom
Conversation
…on --check-style, add (empty) subsection on easyconfig file names
migueldiascosta
requested changes
Mar 20, 2017
| configopts += "--yet-another-option" | ||
|
|
||
| For a parameter value that is a long list, either line wrapping can be used | ||
| or each list element can be put on a separate line, see :ref:`code_style_easyconfigs_lists`. |
Member
There was a problem hiding this comment.
s/code_style_easyconfigs_lists/code_style_easyconfigs_indentation/?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| **Hardcoding of parameter values in multiple places must be avoided if possible**, | ||
| the available easyconfig templates ``%(...)s`` must be used instead (see :ref:`avail_easyconfig_templates`). |
Member
There was a problem hiding this comment.
s/avail_easyconfig_templates/easyconfig_param_templates/?
| * :ref:`code_style_easyconfigs_whitespace` | ||
| * :ref:`code_style_easyconfigs_indentation` | ||
| * :ref:`code_style_easyconfigs_order_grouping` | ||
| * :ref:`code_style_easyconfigs_hardcoding` |
Member
There was a problem hiding this comment.
hardcoding = templates_constants?
| Even though the order of the parameter definitions in easyconfig files (mostly) doesn't matter, | ||
| maintaining a consistent order across easyconfig files helps to make them easier to digest at a glance. | ||
|
|
||
| Related easyconfig parameters must grouped together, with a (single) blank included between groups of parameters. |
| With the above in mind it is difficult to prescribe strict rules for picking a formatting style for lists, | ||
| so you will need to pick one yourself (taking into account :ref:`code_style_easyconfigs_max_line_length`). | ||
|
|
||
| For dictionary values, it is custom to put each key-value pair on a separate line, |
verdurin
requested changes
Jan 31, 2018
| that are wrapped across multiple lines. | ||
|
|
||
| For a long value of ``configopts``, string concatenation using '``+=```' can be used. | ||
| Do make sure to include a space either and the end of all but the last partial |
| or simply break the list across multiple lines while aligning the first list element on | ||
| each line. | ||
|
|
||
| Which formatting style you should for lists use depends on the length of the individual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
preview at http://boegel-eb.readthedocs.io/en/easyconfigs_style/Code_style.html