Skip to content

Commit 47713cd

Browse files
authored
Merge pull request #23 from fronzbot/dev
1.0.0.b0
2 parents 3a830c0 + 11ad0bf commit 47713cd

21 files changed

Lines changed: 1473 additions & 20 deletions

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[run]
2+
parallel = true
3+
omit =
4+
tests/*
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: fronzbot
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. Ubuntu]
28+
- Version [e.g. 22]
29+
- Python Version [e.g. 3.10]
30+
31+
**Additional context**
32+
Add any other context about the problem here.

.github/workflows/lint.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,31 @@ on:
1111

1212
jobs:
1313
lint:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-22.04
1515
strategy:
1616
matrix:
1717
python-version: [3.9]
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: Set up Python ${{ matrix.python-version }}
2222
uses: actions/setup-python@v4
2323
with:
2424
python-version: ${{ matrix.python-version }}
25-
- name: Install dependencies
25+
- name: Install GTK
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install build-essential libgtk-3-dev
29+
- name: Install wxPython
2630
run: |
2731
python -m pip install --upgrade pip
32+
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 wxPython --user
33+
- name: Install Dependencies
34+
run: |
2835
pip install -r requirements.txt
2936
pip install -r requirements_test.txt
30-
pip install tox
3137
- name: Lint
3238
run: |
33-
tox -r -e lint
39+
ruff check waferview tests
40+
black --check --diff waferview tests
41+
rst-lint README.rst

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python
1818
uses: actions/setup-python@v4
1919
with:
20-
python-version: '3.9'
20+
python-version: '3.11'
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip

.github/workflows/test.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,53 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ${{ matrix.platform }}
11+
runs-on: ${{ matrix.os }}
1212
strategy:
1313
max-parallel: 4
14+
fail-fast: false
1415
matrix:
15-
platform:
16-
- ubuntu-latest
17-
python-version: ['3.8', '3.9', '3.10', '3.11']
18-
16+
include:
17+
- os: ubuntu-22.04
18+
python-version: '3.9'
19+
download-wheel: true
20+
- os: ubuntu-22.04
21+
python-version: '3.10'
22+
download-wheel: true
23+
- os: ubuntu-22.04
24+
python-version: '3.11'
25+
download-wheel: true
26+
- os: ubuntu-20.04
27+
python-version: '3.10'
28+
download-wheel: true
29+
- os: macos-latest
30+
python-version: '3.11'
31+
- os: windows-latest
32+
python-version: '3.11'
1933
steps:
20-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
35+
with:
36+
lfs: true
2137
- name: Set up Python ${{ matrix.python-version }}
2238
uses: actions/setup-python@v4
2339
with:
2440
python-version: ${{ matrix.python-version }}
25-
- name: Install dependencies
41+
- name: Update Pip
2642
run: |
2743
python -m pip install --upgrade pip
44+
- if: ${{ matrix.download-wheel }}
45+
name: Install GTK
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install build-essential libgtk-3-dev
49+
- if: ${{ matrix.download-wheel }}
50+
name: Install wxPython
51+
run: |
52+
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }} wxPython --user
53+
- name: Install Dependencies
54+
run: |
2855
pip install -r requirements.txt
2956
pip install -r requirements_test.txt
3057
pip install tox
3158
- name: Tests
3259
run: |
33-
tox -r
60+
pytest --timeout=9 --durations=10 -cov=waferview --cov-report term-missing

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ share/python-wheels/
2525
.installed.cfg
2626
*.egg
2727
MANIFEST
28+
.DS_Store
2829

2930
# PyInstaller
3031
# Usually these files are written by a python script from a template
@@ -50,6 +51,7 @@ coverage.xml
5051
.hypothesis/
5152
.pytest_cache/
5253
cover/
54+
.ruff_cache/
5355

5456
# Translations
5557
*.mo

CONTRIBUTING.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Contributing to Wafer View
2+
3+
Everybody is invited and welcome to contribute to Wafer View.
4+
5+
The process is straight-forward.
6+
7+
- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0 and 1)
8+
- Fork Wafer View [git repository](https://github.com/fronzbot/wafer-view).
9+
- Write the code for your feature/improvement/bug fix
10+
- Ensure tests work.
11+
- Create a Pull Request against the [**dev**](https://github.com/fronzbot/wafer-view/tree/dev) branch of Wafer View.
12+
13+
## Feature suggestions
14+
15+
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](https://community.home-assistant.io/c/feature-requests).
16+
We use [GitHub for tracking issues](https://github.com/home-assistant/core/issues), not for tracking feature requests.
17+
18+
## Development Quick-Start
19+
20+
#### Setup Local Repository
21+
22+
```bash
23+
git clone git@github.com:<github-username>/wafer-view.git
24+
cd wafer-view
25+
git remote add upstream https://github.com/fronzbot/wafer-view.git
26+
```
27+
28+
#### Create a virtualenv and install dependencies
29+
30+
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):
31+
32+
```bash
33+
sudo apt-get update
34+
sudo apt-get install build-essential libgtk-3-dev
35+
```
36+
37+
```bash
38+
python -m venv venv
39+
source venv/bin/activate
40+
pip install -r requirement.txt
41+
pip install -r requirements_test.txt
42+
pip install tox
43+
pip install -e .
44+
```
45+
46+
#### Create your feature branch
47+
48+
```bash
49+
git checkout -b <branch-name>
50+
```
51+
52+
#### Make changes
53+
54+
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)
55+
56+
#### Test changes
57+
58+
To run all tests:
59+
60+
```bash
61+
tox
62+
```
63+
64+
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:
65+
66+
For linting:
67+
```bash
68+
ruff check waferview tests
69+
black --check --diff waferview tests
70+
rst-lint README.rst
71+
```
72+
73+
For tests:
74+
```bash
75+
pytest --timeout=9 --durations=10 -cov=waferview --cov-report term-missing
76+
```
77+
78+
For new features, please add tests to ensure the feature works as intended and that any future changes do not break the intended behavior.
79+
80+
#### Commit Changes
81+
82+
```bash
83+
git add .
84+
git commit
85+
```
86+
87+
#### Catching up with dev
88+
89+
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):
90+
91+
```bash
92+
git fetch upstream dev
93+
git rebase upstream/dev
94+
```
95+
96+
If rebase detects conflicts, repeat the following process until all changes have been resolved:
97+
98+
1. git status shows you the filw with a conflict. You will need to edit that file and resolve the lines between `<<<< | >>>>`
99+
2. Add the modified file: `git add <file>` or `git add .`
100+
3. Continue rebase: `git rebase --continue`
101+
4. Repeat until all conflicts resolved
102+
103+
#### Push and Submit PR
104+
105+
Once you're ready to submit your PR, go ahead and push your changes to your fork:
106+
107+
```bash
108+
git push origin <branch-name>
109+
```
110+
1. On GitHub, navigate to the [wafer-view](https://github.com/fronzbot/wafer-view/tree/dev) repository.
111+
2. In the "Branch" menu, choose the branch that contains your commits (from your fork).
112+
3. To the right of the Branch menu, click New pull request.
113+
4. The base branch dropdown menu should read `dev`. Use the compare branch drop-down menu to choose the branch you made your changes in.
114+
5. Type a title and complete the provided description for your pull request.
115+
6. Click Create pull request.
116+
7.
117+
More detailed instructions can be found here: [Creating a Pull Request](https://help.github.com/articles/creating-a-pull-request)

README.rst

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,57 @@
11
wafer-view |Build Status| |PyPi Version|
22
=======================================================
33

4-
Wafer map viewer for semi.org xml standards written in Python
4+
Wafer map viewer for semi.org XML standards written in Python
5+
6+
Summary
7+
--------
8+
9+
The Wafer-View utility allows a generic XML wafermap file to be viewed. The tool parses the XML and generates bitmap images corresponding to the die status as defined in the wafermap XML file. Each die status can be individually enabled or disabled as well as their colors modified, to easily distinguish where on the wafer any failures occur. Total die, pass/fail, and yield results are also calculated and reported.
10+
11+
.. figure:: wafer_map.png
12+
:alt: wafer map
13+
14+
wafermap
15+
16+
17+
Installation
18+
--------------
19+
20+
Pre-Requisites
21+
```````````````
22+
23+
If you are running MacOS or Windows, please skip this section.
24+
For linux systems, you may need to install GTK. This is done as follows (using Debian commands as an example):
25+
26+
.. code-block::
27+
28+
sudo apt-get update
29+
sudo apt-get install build-essential libgtk-3-dev
30+
31+
From PyPi (Preferred)
32+
``````````````````````
33+
34+
.. code-block::
35+
36+
pip install wafer-view
37+
38+
From Github
39+
`````````````
40+
41+
Clone the github repository and install
42+
43+
.. code-block::
44+
45+
git clone https://github.com/fronzbot/wafer-view.git
46+
cd wafer\-view
47+
git checkout main
48+
pip install .
49+
50+
Usage
51+
------
52+
53+
Once installed, running the command `waferview` will open up the Wafer View GUI. Using the File menu, an xml wafermap can be loaded and viewed. Each bin can be independantly enabled/disabled and the color scheme can be changed on the fly to easily find where failures occur on a die. The wafer image can also be saved as a bitmap.
54+
555

656
.. |Build Status| image:: https://github.com/fronzbot/wafer-view/workflows/build/badge.svg
757
:target: https://github.com/fronzbot/wafer-view/actions?query=workflow%3Abuild

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "wafer-view"
7-
version = "1.0.0-alpha"
8-
license = "Apache-2.0"
7+
version = "1.0.0-beta"
8+
license = {file = "LICENSE"}
99
description = "An open source semi.org xml wafer viewer"
1010
readme = "README.rst"
1111
authors = [
12-
{name = "Kevin Fronczak", email = "kfronczak@gmail.com"},
12+
{name = "Kevin Fronczak", email = "kfronczak@gmail.com"}
1313
]
1414
maintainers = [
1515
{name = "Kevin Fronczak", email = "kfronczak@gmail.com"},
@@ -26,6 +26,9 @@ classifiers = [
2626
requires-python = ">=3.8.0"
2727
dynamic = ["dependencies"]
2828

29+
[project.scripts]
30+
waferview = "waferview:__main__"
31+
2932
[tool.setuptools.dynamic]
3033
dependencies = {file = ["requirements.txt"]}
3134

@@ -87,7 +90,7 @@ ignore = [
8790

8891
line-length = 88
8992

90-
target-version = "py39"
93+
target-version = "py311"
9194

9295
[tool.ruff.per-file-ignores]
9396

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
xmltodict==0.13.0
2+
wxPython==4.2.1

0 commit comments

Comments
 (0)