diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 20:18:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 20:18:28 +0000 |
commit | f8363b456f1ab31ee56abad579b215af195093d5 (patch) | |
tree | b1500c675c2e0a55fb75721a854e1510acf7c862 /CONTRIBUTING.md | |
parent | Initial commit. (diff) | |
download | rich-f8363b456f1ab31ee56abad579b215af195093d5.tar.xz rich-f8363b456f1ab31ee56abad579b215af195093d5.zip |
Adding upstream version 9.11.0.upstream/9.11.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6e27d56 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,64 @@ +# Contributing to Rich + +This project welcomes contributions in the form of Pull Requests. +For clear bug-fixes / typos etc. just submit a PR. +For new features or if there is any doubt in how to fix a bug, you might want +to open an issue prior to starting work, or email willmcgugan+rich@gmail.com +to discuss it first. + +## Development Environment + +Rich uses [poetry](https://python-poetry.org/docs/) for packaging and +dependency management. To start developing with Rich, install Poetry +using the [recommended method](https://python-poetry.org/docs/#installation) or run: + +``` +pip install poetry +``` + +Once Poetry is installed, install the dependencies with the following command: + +``` +poetry install +``` + +### Tests + +Run tests with the following command: + +``` +make test +``` + +Or if you don't have `make`, run the following: + +``` +pytest --cov-report term-missing --cov=rich tests/ -vv +``` + +New code should ideally have tests and not break existing tests. + +### Type Checking + +Rich uses type annotations throughout, and `mypy` to do the checking. +Run the following to type check Rich: + +``` +make typecheck +``` + +Or if you don't have `make`: + +``` +mypy -p rich --ignore-missing-imports --warn-unreachable +``` + +Please add type annotations for all new code. + +### Code Formatting + +Rich uses [`black`](https://github.com/psf/black) for code formatting. +I recommend setting up black in your editor to format on save. + +To run black from the command line, use `make format-check` to check your formatting, +and use `make format` to format and write to the files. |