forked from eduardacenteno/HCP_TDA_Minne
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPython_Template_Header_Instructions.py
More file actions
71 lines (45 loc) · 2.55 KB
/
Python_Template_Header_Instructions.py
File metadata and controls
71 lines (45 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""A short description or title.
Longer description.
"""
__author__ = "Name"
__contact__ = "Email"
__date__ = "YYYY/MM/DD" ### Date it was created
__status__ = "Production" ### Production = still being developed. Else: Concluded/Finished.
####################
# Review History #
####################
# Reviewed by Name Date ### e.g. Eduarda Centeno 20200909
####################
# Libraries #
####################
# Standard imports ### (Put here built-in libraries - https://docs.python.org/3/library/)
# Third party imports ### (Put here third-party libraries e.g. pandas, numpy)
import numpy as np # version 1.0.1
# Internal imports ### (Put here imports that are related to internal codes from the lab)
##### Please remove any patient/subject identifier from the code
##### Please use English (i.e. replace comments in Dutch or other languages)
##### Please include packages-libraries versions with a hashtag next to each of them (as numpy example above).
##### Please consider leaving a pip freeze requirements file in your projects folder so that we can keep track of all package versions used at the time the project was being executed. (https://blog.usejournal.com/why-and-how-to-make-a-requirements-txt-f329c685181e)
##### The comments in this file (e.g. ### Put here built-in..) do not need to be propagated to your code. They are only to give instructions in this template file.
##### Please consider using sections divisions such as the ones above enclosed by hashtags.
##### Please also have a look at https://www.python.org/dev/peps/pep-0008/. This will explain how to follow the Python community standards. E.g. i=i+1 is wrong, should be i = i + 1
##### Please consider limiting all lines to 72 characters (instructions on how to do that correctly can be found in PEP-0008 Maximum Line Length section).
##### Have a look at black.vercel.app (this is a browser link). This app will help you quickly format you code (basic formatting). Then you can proceed with manual enrichment.
##### Please document your functions to create docstrings (https://www.python.org/dev/peps/pep-0257/). Example:
def function(args):
"""Short description.
Parameters
----------
Argument1: what it should be, which format, example of file (if available)
Examples
----------
An example of how to use it, if necessary.
Returns
-------
out: what is the output, in which format.
Notes
----------
Details, if relevant. For example, function ignores NaNs or not.
"""