To manage our codebase, it is necessary to learn some tools. This may take some time for beginners, but will benefit the rest life. All the following instructions assume that the reader is familiar and comfortable with linux command line.
Steps to contribute your codes to this repository:
- Fork the repo to your own github account.
git clone
andgit pull
the forked repo to your own computer.- Create your own branch
git checkout -b
. Write codes and test. git commit
your changes with clean commit message.- Push your branch to your forked repo with
git push
. - Head on over to the forked repo on GitHub, and open a pull request to merge your changes to main project.
- Get your PR reviewed and approved.
- Code style. We basically follow the PEP8 standard. Please also refer to the Google Python Style Guide. Please pay special attention to indentations, spaces, linebreaks, name style, comments and docstrings.
- Doc style. Please refer to Google Python Style Docstrings.
- Commit message. Please refer to Git Commit Message Conventions for good examples of commit message. You may also use tools like cz-cli.
VSCode is the recommended IDE for coding. It is extremely powerful with the following plugins:
- remote ssh: link to remote server
- debug python codes by simply adding breakpoints with mouse click
- autoformat your code to pep8 standard
- nested jupyter notebook
- markdown editing and preview
- and so on...
Please always use git to track your codes. Refer to the Pro Git book for comprehensive understanding of git. You may also get a quick start with the git cheatsheet. Also, the chinese Git教程 is also available. Some suggestions:
- Write clean commit message when you push to this repository.
- If conflict happens when you push your code, you can pull down the repository first with
git pull origin main
and fix the merge.
Please manage your local coding dependencies with anaconda.