Skip to content

Developer Beginner

Fork the project from github and make pull requests to the origin repository.

Github

Sign and sign-off all commits or tags

We prefer your commits or tags are signed. And also sign-off your commits.

Tip

Please read this docs to learn about how to sign your commits and tags.

Repository

Fork

Click Fork button on the top-right at the COSCUP/COSCUP-Volunteer repo page.

Clone

git clone from the repo you have forked.

Code style

The codebase is compliant in PEP8 and typing hint (PEP484).

  • pylint
  • autopep8
  • pytest
  • pytest-cov
  • mypy

Note

We also have github actions to verify those quality. The PEP8 must have to be complied.

Dependency

Poetry

Please install Poetry for dependency management and packaging in Python. And not recommended install in pip.

curl -sSL https://install.python-poetry.org | python3 -

After the poetry is installed, you could run poetry install to install the packages at local.

libmemcached (optional)

If you want development at root system instead of docker containers, please install this dependency for memcached.

brew install libmemcached
apt-get install libmemcached11
dnf install libmemcached
yum install epel-release && yum install libmemcached.x86_64

Development Environment

Install the packages.

poetry install

Shell within the virtual environment.

poetry shell

Note

The virtualenvs.in-project of poetry configuration has been set to true. The folder named .venv is in the root directory of the project.

Setting up IDE

Setup the Python: Select Interpreter Cmd+Shift+P, and input the poetry's env full path.

vim will auto read the pyproject.toml file, so there is nothing changed here.