You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,23 @@ First off, thank you for taking the time to contribute! If you have a functional
12
12
13
13
We suggest you make sure all of your commits are atomic (one feature per commit). Please make sure that non-obvious lines of code are commented, and variable names are as clear as possible. Please do not send us undocumented code as we will not accept it. Including tests to your pull request will bring tears of joy to our eyes, and will also probably result in a faster merge.
14
14
15
-
16
15
## Coding conventions
17
16
18
-
Start reading our code to get a feel for it:
17
+
We use the industry standard [PEP 8](https://www.python.org/dev/peps/pep-0008/) styling guide within the `codonPython` package. **Therefore, it’s imperative that you use the coding standards found within PEP 8 when creating or modifying any code within the `codonPython` package**. Autoformatters for PEP8, for instance [autopep8](https://pypi.org/project/autopep8/), can easily ensure compliance. The reason we use PEP 8 coding standards is to make sure there is a layer of consistency across our codebase. This reduces the number of decisions that you need to make when styling your code, and also makes code easier to read when switching between functions etc.
18
+
19
+
While you are creating code, we recommend that you understand the style guide standards for the following topics:
20
+
21
+
*[Code layout](https://www.python.org/dev/peps/pep-0008/#code-lay-out) – Indentation, tabs or spaces, maximum line length, blank lines, source file encoding, imports & module level Dunder name
*[Whitespace in expressions and statements](https://www.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements) – Pet Peeves, alternative recommendations
24
+
*[When to use trailing commas](https://www.python.org/dev/peps/pep-0008/#when-to-use-trailing-commas)
*[Naming conventions](https://www.python.org/dev/peps/pep-0008/#naming-conventions) – Naming styles, naming conventions, names to avoid, ASCII compatibility, package and module names, class names, type variable names, exception names, global variable names, function and variable names, function and method arguments, method names and instance variables, constants & designing for inheritance
27
+
*[Programming recommendations](https://www.python.org/dev/peps/pep-0008/#programming-recommendations) – Function annotations & variable annotations
28
+
29
+
We also use docstrings and we try to follow [`numpy`'s docstring standards](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard).
30
+
31
+
Start reading our code to get a feel for it but most importantly, remember that this is open source software - consider the people who will read your code, and make it look nice for them.
19
32
20
33
* We use [PEP8](https://www.python.org/dev/peps/pep-0008/). Autoformatters for PEP8, for instance [autopep8](https://pypi.org/project/autopep8/), can easily ensure compliance.
21
34
* We use docstrings and we try to (loosely) follow [`numpy`'s docstring standards](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard).
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
## What is `codon`?
7
7
8
-
The `codon` project was created to increase code sharing, consistancy of code and coding standards and encourage collaboration. The repository contains Python, R and SQL code for ease of use in workflows on platforms used within NHS Digital such as Databricks. Everything you need to use the repository should be available on the GitHub pages however further information for NHS Digital staff can be found [here](https://confluence.digital.nhs.uk/display/CON/Codon+-+Code+sharing), via our internal confluence page. `codonPython` aims to reduce the barrier for entry for analysis and provide software development experience for those at a higher level of technical ability.
8
+
The `codon` project was created to increase code sharing, consistancy of code and coding standards and encourage collaboration. The repository contains Python, R and SQL code for ease of use in workflows on platforms used within NHS Digital such as Databricks. Everything you need to use the repository should be available on the GitHub pages however further information for NHS Digital staff can be found [here](https://confluence.digital.nhs.uk/display/CON/Codon+-+Code+sharing), via our internal confluence page. `codonPython` aims to reduce the barrier for entry for analysis and provide software development experience for those at a higher level of technical ability.
0 commit comments