Skip to content

Developer Guide

Yourun edited this page Mar 28, 2022 · 6 revisions

Developer Guide

A guide for me, and later for everyone who wants to contribute to kefir, how to properly contribute kefir.

First-time setup

In the beginning, just follow the instructions from here. But I'll still reproduce.

Fork my kefir from github

just touch Fork button

Clone your fork from github

git clone https://github.com/{your_name}/kefir.git
cd kefir

Enable venv

On Windows:

> py -m venv env
> env\scripts\activate

On MacOS/Linux:

$ python3 -m venv env
$ . env/bin/activate

Update pip and setuptools

py -m pip install -U pip setuptools

On Unix-based you need python or python3 instead of py

Install dev deps

pip install -r dev-requirements.txt

That's all about setup

Git flow

  1. Your change
    • do your change
    • write about changes in the changelog

2. Push it to main right nooow!!!

True 2.

Run test workflow:

black kefir/ tests.py
flake8 kefir/ tests.py --ignore E501
py -m unittest

If all is OK go to 3

  1. Commit changes with good commit message (len <= 35)

  2. Push it to branch or to main =_=

Create pull request

Just touch Compare and create pull request button. Now all PR go to main branch

Wait

Just wait. Or do some fix if i reviewed PR.

How to squash commits

I don't know this is really important, but why not. Let's go

git rebase -i HEAD~(num of last commits for squash)

Then you go to vim or emacs or visual studio code or notepad++ or something else, where you try to squash commits.

First commit is better when it isn't changed. Others change to s or to squash.

Then you save message only for first commit, others delete right now!

and finally:

git push -f origin your_branch

Congrats! Your pull request was merged (closed)

Good xp for you

Clone this wiki locally