andrej@2185: How Do I Submit A Good Pull Request? andrej@2185: ---------------------------------- andrej@2185: andrej@2185: It's highly recommended to write nice and clean python code. Beremiz andrej@2185: project tries to follows most of PEP-8 recommendations. They are andrej@2185: automatically checked on every push and merge by Bitbucket pipelines. andrej@2185: andrej@2185: To avoid pushing "unclean" code, i's recommended to add one of the following andrej@2185: commands to pre commit Mercurial hook into .hg/hgrc configuration file. andrej@2185: andrej@2241: Unfortunately script can't distinguish between real commit and shelve. If you andrej@2241: are using shelve (or maybe some other affected commands), it's recommended to andrej@2241: use pre- and post- hooks to create flags to skip checks on andrej@2241: some operations. andrej@2241: andrej@2241: andrej@2185: ``` andrej@2185: [hooks] andrej@2241: pre-shelve.linter = touch .hg/skiphook andrej@2241: post-shelve.linter = rm .hg/skiphook andrej@2185: pretxncommit.linter = ./tests/tools/check_source.sh --only-changes andrej@2185: ``` andrej@2185: or the same done using Docker container, so result will be the same as andrej@2185: on Bitbucket pipeline. andrej@2185: andrej@2185: ``` andrej@2185: [hooks] andrej@2241: pre-shelve.linter = touch .hg/skiphook andrej@2241: post-shelve.linter = rm .hg/skiphook andrej@2185: pretxncommit.linter = hg status -m -n -a -n -I '**.py' --change $HG_NODE > files.lst && docker run --volume=$PWD:/beremiz --workdir="/beremiz" --volume=$PWD/../CanFestival-3:/CanFestival-3 --memory=1g --entrypoint=/beremiz/tests/tools/check_source.sh skvorl/beremiz-requirements --files-to-check files.lst andrej@2185: ```