|
| 1 | +# Contributing to Textual Inputs |
| 2 | + |
| 3 | +First, thank you for taking time to contribute to open source and to this project! Here's how contributing to this project works. |
| 4 | + |
| 5 | +## Git Workflow |
| 6 | + |
| 7 | +1. Fork the repo and create your own branch from `main`. The branch should be named after the type of issue your are solving. |
| 8 | + |
| 9 | +``` |
| 10 | +feat/[summary-with-dashes] (this one covers anything you can't fit in the other categories) |
| 11 | +fix/[summary-with-dashes] |
| 12 | +docs/[summary-with-dashes] |
| 13 | +``` |
| 14 | + |
| 15 | +2. Setup your local development environment. Texutal Inputs currently supports CPython 3.7 - 3.10. Please test your additions with at least the Python versions at the ends of that range. |
| 16 | + |
| 17 | +bash/zsh/sh |
| 18 | +```bash |
| 19 | +python3.7 -m venv venv7 |
| 20 | +source venv7/bin/activate |
| 21 | +python -m pip install -r requirements-dev.txt |
| 22 | +python -m pip install -e . |
| 23 | +deactivate |
| 24 | + |
| 25 | +python3.10 -m venv venv10 |
| 26 | +source venv10/bin/activate |
| 27 | +python -m pip install -r requirements-dev.txt |
| 28 | +python -m pip install -e . |
| 29 | +pre-commit install |
| 30 | +``` |
| 31 | + |
| 32 | +pwsh |
| 33 | +```powershell |
| 34 | +py -3.7 -m venv venv7 |
| 35 | +venv10/Scripts/activate |
| 36 | +python -m pip install -r requirements-dev.txt |
| 37 | +python -m pip install -e . |
| 38 | +deactivate |
| 39 | +
|
| 40 | +py -3.10 -m venv venv10 |
| 41 | +venv7/Scripts/activate |
| 42 | +python -m pip install -r requirements-dev.txt |
| 43 | +python -m pip install -e . |
| 44 | +pre-commit install |
| 45 | +``` |
| 46 | + |
| 47 | +3. Make your updates, including updating the documentation if necessary. |
| 48 | +5. Ensure your code passes our linting and formatting checks. This project uses [pre-commit](https://pre-commit.com/) to help manage code quality. It will run on `git commit`. You can also run it manually. |
| 49 | + |
| 50 | +```bash |
| 51 | +pre-commit run -a |
| 52 | +``` |
| 53 | + |
| 54 | +6. Start your commit message with a similar format to the branch. |
| 55 | + |
| 56 | +``` |
| 57 | +# Branch |
| 58 | +feat/add-integer-widget |
| 59 | +
|
| 60 | +# Commit |
| 61 | +feat: add integer widget |
| 62 | +
|
| 63 | +- list of changes |
| 64 | +- contained in this commit |
| 65 | +
|
| 66 | +``` |
| 67 | + |
| 68 | +7. Create a pull request and add `sirfuzzalot` as the reviewer. |
| 69 | +8. We'll got through a review of the code, work through any challenges we hit and then merge it in. |
| 70 | + |
| 71 | +## Package Versioning |
| 72 | + |
| 73 | +Version bumps will occur as separate pull requests and releases will get tagged on those commits. Please do not submit a version bump PR. Thanks! |
| 74 | + |
| 75 | +## Contributions and Licensing |
| 76 | + |
| 77 | +All contributions you make to this project will be licensed under the [MIT License](http://choosealicense.com/licenses/mit/). |
0 commit comments