-
Notifications
You must be signed in to change notification settings - Fork 23
Contribution rules
GreatYYX edited this page Apr 19, 2017
·
3 revisions
- https://www.python.org/dev/peps/pep-0008/
- Naming rules:
- class: camel case
- variable: lower_case_under_scores
- constant: UPPER_CASE_UNDER_SCORES
- private member / variable: starts with under score
- string: single quote
- Annotation:
- http://www.sphinx-doc.org/en/stable/ext/example_google.html
- don't forget to note
optional
and its default value.
- Functional module should not have states.
- Create test cases in tests folder and use pytest to run them.
- Add dependencies to requirements.txt.
- Create
dev_test
folder in root path, use it to write code snippet and do local tests. - If some of the private function will only be used within a method, make this private function to a inner function of the method.
- Invoke self._get_abs_path() on all file path string to get the absolute path.
tk = rltk.init()
iter1 = get_iterator(file_path, id_path)
iter2 = get_iterator(file_path, id_path)
tk.q_gram_blocking(iter1, iter2, size_range=(2,5), output_path)
tk.lsh_blocking(...)
tk.compute_features(blocking_path, iter1, iter2, feature_config, feature_output_path)
model = tk.train_model(train_data, iter1, iter2, feature_config, model_config)