Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 3.12 KB

CONTRIBUTING.md

File metadata and controls

43 lines (28 loc) · 3.12 KB

How to contribute

Git and GitHub Flow

Git is a version control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source code management in software development.

In genomics-workspace, we use git and GitHub flow. If you didn't know git or GitHub before, check following resources:

Installation of Development Requirements

There are additional Python and JavaScript requirements for development of this project. You can install them through following commands:

npm install
pip install -r dev_requirements.txt

Django

Genomics-workspace is a django website project, so you need to know django before any contribution. There are many useful resoures available. If you didn't know django before, check the official tutorial and tutorials by django girls first. One thing you need to note when you read any resource related to django is that currently, we use django 1.11. Followings are miscellaneous list of links that may help you when contributing this project:

Coding Style

This section describes our coding style guide. Our main rule is straightforward:

All code in any code-base should look like a single person typed it, no matter how many people contributed. —idiomatic.js

To make things easier, we adopt linters and code formatters together. Therefore, you only need to make sure code you contribute pass all the checks of linters, and run the code formatters for files you modify before commit the changes. Because most of the code base of this project are written in Python and JavaScript, currently we only restrict the code style of these two programming language, but we will exapand this ideas to other part of this project. For Python code, we use yapf as code formatter. For JavaScript code, we use JSHint as linter and prettier as code formatter. Detailed usages are summarized below:

  • Use yapf path_to_py_file_you_want_format.py to format a Python file. You may want to use option -i to write the formatted file in-place.
  • Use npx jshint --show-non-errors path_to_js_file_you_want_check.js to lint the JavaScript file.
  • Use npx prettier path_to_js_file_you_want_check.js to format a js file. You may want to use option --write to write the formatted file in-place.