From 7a92ebe539738cf659d54f5b4f9a9141d8dc3ef9 Mon Sep 17 00:00:00 2001 From: juk0de <5322305+juk0de@users.noreply.github.com> Date: Thu, 10 Aug 2023 08:26:27 +0200 Subject: [PATCH] README: Added 'Contributing' section --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.md b/README.md index dd38a71..617b5c0 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,45 @@ eval "$(register-python-argcomplete cmm)" After adding this line, restart your shell or run `source ` to enable autocompletion for the `cmm` script. +## Contributing + +### Enable commit hooks +``` +pip install pre-commit +pre-commit install +``` +### Execute tests before opening a PR +``` +pytest +``` +### Consider using `pyenv` / `pyenv-virtualenv` +Short installation instructions: +* install `pyenv`: +``` +cd ~ +git clone https://github.com/pyenv/pyenv .pyenv +cd ~/.pyenv && src/configure && make -C src +``` +* make sure that `~/.pyenv/shims` and `~/.pyenv/bin` are the first entries in your `PATH`, e. g. by setting it in `~/.bashrc` +* add the following to your `~/.bashrc` (after setting `PATH`): `eval "$(pyenv init -)"` +* create a new terminal or source the changes (e. g. `source ~/.bashrc`) +* install `virtualenv` +``` +git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv +``` +* add the following to your `~/.bashrc` (after the commands above): `eval "$(pyenv virtualenv-init -)` +* create a new terminal or source the changes (e. g. `source ~/.bashrc`) +* go back to the `ChatMasterMind` repo and create a virtual environment with the latest `Python`, e. g. `3.11.4`: +``` +cd +pyenv install 3.11.4 +pyenv virtualenv 3.11.4 py311 +pyenv activate py311 +``` +* see also the [official pyenv documentation](https://github.com/pyenv/pyenv#readme) + ## License This project is licensed under the terms of the WTFPL License. + +