👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to this GitHub project. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
If you want to open an issue about a problem or bug you encountered, simply go to the GitHub page and click New issue in the issues section. You will be presented with templates to use, choose a relevant one. (If no template fits, you can open a blank issue. But make sure you input all the appropriate information!)
Fill out the template. You should at least provide the following information:
- a short but exact description of your problem (screenshots often help)
- steps on how to reproduce the problem
- Information about your system:
- your OS
- your Python version and implementation
- the version of
readcharyou use
Follow these steps if you want to contribute code to the project:
-
Fork this Git repository and create your branch from
master. -
Check out the code to your local machine by following the steps in Getting the code and make your changes.
-
Make sure the tests pass!!
-
If you added to the source code, add tests for your new code.
-
Update the documentation, if necessary.
-
Write a good commit message, if you have multiple changes, make sure your commits are atomic (single irreducible change that makes sense on its own)
-
Done, you can open a pull request.
If you want to experiment with the code yourself, you can get started by following these steps.
-
Clone the repository. (or yours if you created a fork)
git clone https://github.com/magmax/python-readchar.git cd python-readchar -
Create a virtual environment:
python -m venv .venv
-
Enter the virtual environment
on Linux systems:
source .venv/bin/activateor for Windows systems:
.venv\Scripts\activate
-
Install dev-dependencies (this also automatically installs the library in editable mode)
pip install -r requirements.txt
Always make sure all tests pass before suggesting any changes! This will avoid invalid PR's.
The simplest way is to just run make. The provided Makefile calls all tests for you.
makeIf you don't have make, you could run all tests manually like this:
-
run
pytest(source-code testing)pytest
-
run
pre-commit(linting and styling)pre-commit run -a
-
run
setup.py(to test build process)python setup.py sdist bdist_wheel