Everybody is invited and welcome to contribute to Wafer View.
The process is straight-forward.
- Read How to get faster PR reviews by Kubernetes (but skip step 0 and 1)
- Fork Wafer View git repository.
- Write the code for your feature/improvement/bug fix
- Ensure tests work.
- Create a Pull Request against the dev branch of Wafer View.
If you want to suggest a new feature for Home Assistant (e.g., new integrations), please open a thread in our Community Forum: Feature Requests. We use GitHub for tracking issues, not for tracking feature requests.
git clone [email protected]:<github-username>/wafer-view.git
cd wafer-view
git remote add upstream https://github.com/fronzbot/wafer-view.git
First: if on linux, it's possible you need to install GTK3 for the GUI to work. Run the following commands (commands shown for debian):
sudo apt-get update
sudo apt-get install build-essential libgtk-3-dev
python -m venv venv
source venv/bin/activate
pip install -r requirement.txt
pip install -r requirements_test.txt
pip install tox
pip install -e .
git checkout -b <branch-name>
Now you can make changes to your code. Keep changes minimal (ie. if you're working on adding a new standard, don't also include GUI changes- make those separate PR's even if they're linked)
To run all tests:
tox
On Debian, it can take a long time to install wxPython inside the tox venv. As such, here are the commands you can use that do not rely on tox:
For linting:
ruff check waferview tests
black --check --diff waferview tests
rst-lint README.rst
For tests:
pytest --timeout=9 --durations=10 -cov=waferview --cov-report term-missing
For new features, please add tests to ensure the feature works as intended and that any future changes do not break the intended behavior.
git add .
git commit
If your code is taking a while to develop, you may be behind the dev
branch, in which case you need to catch up before creating your pull-request. To do this you can run git rebase
as follows (running this on your local branch):
git fetch upstream dev
git rebase upstream/dev
If rebase detects conflicts, repeat the following process until all changes have been resolved:
- git status shows you the filw with a conflict. You will need to edit that file and resolve the lines between
<<<< | >>>>
- Add the modified file:
git add <file>
orgit add .
- Continue rebase:
git rebase --continue
- Repeat until all conflicts resolved
Once you're ready to submit your PR, go ahead and push your changes to your fork:
git push origin <branch-name>
- On GitHub, navigate to the wafer-view repository.
- In the "Branch" menu, choose the branch that contains your commits (from your fork).
- To the right of the Branch menu, click New pull request.
- The base branch dropdown menu should read
dev
. Use the compare branch drop-down menu to choose the branch you made your changes in. - Type a title and complete the provided description for your pull request.
- Click Create pull request.
More detailed instructions can be found here: Creating a Pull Request