diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6217f459..ff04d3d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,33 +53,33 @@ use editors with SFTP support. If you haven't done so yet, fork the repository on GitHub, then add this fork to your rabbit's repository. -``` -cd /opt/pynab +```sh +cd $HOME/pynab git remote add fork https://github.com/YOUR_GITHUB_USERNAME/pynab.git ``` To develop your code, create a local branch with a name that makes sense. -``` +```sh git fetch origin git checkout -b feature-name origin/master ``` At anytime, you can run tests locally (on the rabbit) by first stopping pynab and services. Hardware tests require root access. -``` +```sh sudo ./venv/bin/python manage.py stop_all sudo ./venv/bin/pytest sudo ./venv/bin/python manage.py start_all ``` Before committing your code, make sure the style is conforming by running pre-commit -``` +```sh ./venv/bin/pre-commit ``` Once you are happy with the result, rebase and push it to a dedicated branch on your own GitHub fork. -``` +```sh git fetch origin git rebase origin/master git push fork HEAD:feature-name @@ -87,7 +87,7 @@ git push fork HEAD:feature-name GitHub will display the URL to create a pull request, with a git message such as: -``` +```sh remote: remote: Create a pull request for 'branch-name' on GitHub by visiting: remote: https://github.com/user/pynab/pull/new/branch-name @@ -104,7 +104,7 @@ If tests fail, fix them and push to the branch, either with new commits or by amending. Once tests pass, your request will be reviewed. At any time, if you did commit your changes, you can go back to master with: -``` +```sh git fetch origin git checkout master bash upgrade.sh diff --git a/README.md b/README.md index 4cda8504..fc4c1077 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,18 @@ -# Nabaztag en Python pour Raspberry Pi - -[![build (qemu)](https://github.com/nabaztag2018/pynab/actions/workflows/arm-runner.yml/badge.svg?branch=master)](https://github.com/nabaztag2018/pynab/actions/workflows/arm-runner.yml) -[![tests](https://github.com/nabaztag2018/pynab/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/nabaztag2018/pynab/actions/workflows/tests.yml) -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -[![Total alerts](https://img.shields.io/lgtm/alerts/g/nabaztag2018/pynab.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nabaztag2018/pynab/alerts/) -[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/nabaztag2018/pynab.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nabaztag2018/pynab/context:python) -[![codecov](https://codecov.io/gh/nabaztag2018/pynab/branch/master/graph/badge.svg)](https://codecov.io/gh/nabaztag2018/pynab) -[![Twitter](https://img.shields.io/twitter/follow/nabaztagtagtag?label=Follow&style=social)](https://twitter.com/nabaztagtagtag) +

Nabaztag en Python pour Raspberry Pi

+

+ Total alerts + Language grade: Python + codecov + Follow us in Twitter + Discord Server +

+

+ โœ”๏ธ  Python lint + ๐Ÿ—๏ธ  Build + ๐Ÿงช Tests + Code Style: Black + +

## Cartes