README: Added 'Contributing' section
This commit is contained in:
parent
9b6b13993c
commit
7a92ebe539
39
README.md
39
README.md
@ -113,6 +113,45 @@ eval "$(register-python-argcomplete cmm)"
|
||||
|
||||
After adding this line, restart your shell or run `source <your-shell-config-file>` 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 <CMM_REPO_PATH>
|
||||
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.
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user