First off, thanks for taking the time to contribute! Contributions include but are not restricted to:
- Reporting bugs
- Contributing to code
- Writing tests
- Writing documents
The following is a set of guidelines for contributing.
This guideline is for new beginners of OSS. If you are an experienced OSS developer, you can skip this section.
-
First, fork this project to your own namespace using the fork button at the top right of the repository page.
-
Clone the upstream repository to local:
$ git clone https://github.com/pi-dal/django-vditor.git # Or if you prefer SSH clone: $ git clone [email protected]:pi-dal/django-vditor.git # Or if you prefer gh repo: $ gh repo clone pi-dal/django-vditor
-
Add the fork as a new remote:
$ git remote add fork https://github.com/yourname/django-vditor.git $ git fetch fork
where
fork
is the remote name of the fork repository.
ProTips:
-
Don't modify code on the dev branch, the dev branch should always keep track of origin/dev.
To update dev branch to date:
$ git pull origin dev # In rare cases that your local dev branch diverges from the remote dev: $ git fetch origin && git reset --hard dev
-
Create a new branch based on the up-to-date dev for new patches.
-
Create a Pull Request from that patch branch.
First, install package management tools pdm
.
# If you are on MacOS and using homebrew, install it by:
$ brew install pdm
# Otherwise, it is recommended to install pdm in an isolated environment with pipx:
$ pipx install pdm
# Or you can install it under a user site:
$ pip install --user pdm
Then, configure the shell according to the document.
Finally, You need to use pdm
to install development dependencies:
$ pdm sync -d
In fact, when you install the development dependency, you already have coverage
installed, but if you are installing it in another way, please install it first:
$ pdm add -d coverage
Then, use coverage
to start testing code coverage:
$ python3 -m coverage run manage.py test
# Get XML file
$ python3 -m coverage xml