# Code of Conduct
* 請使用 [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) 進行開發
* 由於我們並沒有時間額外寫 test case 來測試每個人的 pull request,在送出 pull request 前至少確定 code 要跑的動,並且跑出你預期的結果。
* Write a document (readme + docstring)
An example of docstring:
```py=
def fit(self, train_loader, test_set, epochs, gt_index_path, name_query_path, jk_index_path, save_dir, early_stopping, check_init=False):
'''
Train the model for `epochs` epochs, where each epoch is composed of a training step and a testing step
Args:
train_loader (DataLoader): a dataloader that wraps the training dataset (a Veri776Train instance)
epochs (int): epochs
gt_index_path (str): the path to gt_index.txt under veri776 root folder
name_query_path (str): the path to name_query.txt under veri776 root folder
save_dir (str): path to save the model
check_init (boolean): if true, then test the model with initial weight
early_stopping (int): if the performance on validation set stop improving for a continuous `early_stopping` epochs, the `fit` method returns control
'''
# the code below is ignored
```
你只有在一些情況下**可以**不需要對某些 function 寫 docstring (能寫還是寫上去)
* 這個 function 並不是要給 client 呼叫的,client 不會動到這個 function
* 這個 function 只是要拿來做點小實驗用的,用過兩三次就不會再動到 (不過如果是這種情況的話,你也不該把這個東西推上GitHub)
* Try to maximize portability。例如,在處理路徑相關的字串時請善用 `os.path.join` 或 `os.path.split` 而不是自己組裝或拆解路徑字串。同樣地,我們沒有這方面的 test case,請在 coding 時自行檢查。
* 如果發現 repo 中有錯誤,你應該做下面的其中一項
* `git blame` 後通知作者
* fix it yourself and send a pull request
* 任何有牽扯到 random 相關運算的程式都應該設置 seed 以增進可重現性 (suggested seed: 0xdc51ab :rocket:)