-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from lukasc-ubc/main
unit testing
- Loading branch information
Showing
10 changed files
with
422 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Run code tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- '**' | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
|
||
jobs: | ||
test_layouts: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout repo content | ||
uses: actions/checkout@v3 | ||
|
||
|
||
- name: setup python, 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: "pip" | ||
#cache-dependency-path: pyproject.toml | ||
|
||
- name: install Python 3.11 packages | ||
run: | | ||
pip install pytest pytest-cov | ||
pip install -e . | ||
- name: Test with pytest, Python 3.11 | ||
run: pytest app/siepic_testcreator | ||
|
||
|
||
|
||
|
||
# can also specify python version if needed | ||
- name: setup python, 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
#cache: "pip" | ||
#cache-dependency-path: pyproject.toml | ||
|
||
- name: install Python 3.10 packages | ||
run: | | ||
pip install pytest pytest-cov | ||
pip install -e . | ||
- name: Test with pytest, Python 3.10 | ||
run: pytest --cov=app/siepic_testcreator --cov-report=xml | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
if: github.repository_owner == 'SiEPIC' | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,39 @@ | ||
*.pyc | ||
__pycache__ | ||
|
||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# Mac OSX | ||
*.DS_Store | ||
.DS_Store | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
9 changes: 9 additions & 0 deletions
9
app/siepic_testcreator/tests/EBeam_heaters_mustafah_static.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
% X-coord, Y-coord, Polarization, wavelength, type, deviceID, params | ||
81, 333, TE, 1550, device, mustafahspiral, comment | ||
84, 269, TE, 1550, device, mustafahmzi, comment | ||
|
||
% X-coord, Y-coord, deviceID, padName, params | ||
393, 168, mustafahmzi, comment, comment | ||
393, 419, mustafahspiral, comment, comment | ||
|
||
% X-coord, Y-coord, recipeID, params |
205 changes: 205 additions & 0 deletions
205
app/siepic_testcreator/tests/EBeam_heaters_mustafah_tests.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
Devices: | ||
mustafah_mzi: | ||
device_id: mustafah_mzi | ||
device_type: device | ||
electricalCoordinates: | ||
- G | ||
- 393.0 | ||
- 168.0 | ||
opticalCoordinates: | ||
- 84.0 | ||
- 142.0 | ||
polarization: TE | ||
sequences: | ||
- IV_mzi(voltage_sweep_ida) | ||
- passive_sweep(wavelength_sweep_ida) | ||
- livsweep_mzi(set_wavelength_voltage_sweep_ida) | ||
- wavlsweep_biased(set_voltage_wavelength_sweep_ida) | ||
wavelength: '1550' | ||
mustafahspiral: | ||
device_id: mustafahspiral | ||
device_type: device | ||
electricalCoordinates: | ||
- G | ||
- 393.0 | ||
- 419.0 | ||
opticalCoordinates: | ||
- 84.0 | ||
- 333.0 | ||
polarization: TE | ||
sequences: | ||
- IV_spiral(voltage_sweep_ida) | ||
- passive_sweep(wavelength_sweep_ida) | ||
- livsweep_spiral(set_wavelength_voltage_sweep_ida) | ||
- wavlsweep_biased(set_voltage_wavelength_sweep_ida) | ||
wavelength: '1550' | ||
Sequences: | ||
IV_mzi(voltage_sweep_ida): | ||
Runtime: 25.0 | ||
results_info: | ||
csv: 'True' | ||
foldername: '' | ||
legend: 'True' | ||
mat: 'True' | ||
num_plots: '1' | ||
pdf: 'True' | ||
pkl: 'True' | ||
plottitle: Voltage Sweep | ||
save_location: '' | ||
saveplot: 'True' | ||
visual: 'True' | ||
xscale: '1' | ||
xtitle: Voltage (V) | ||
yscale: '1' | ||
ytitle: Current (A) | ||
variables: | ||
Channel A: 'True' | ||
Channel B: 'False' | ||
IV: 'True' | ||
PV: 'True' | ||
RV: 'True' | ||
Start: '0' | ||
Step: '0.1' | ||
Stop: '5' | ||
IV_spiral(voltage_sweep_ida): | ||
Runtime: 25.0 | ||
results_info: | ||
csv: 'True' | ||
foldername: '' | ||
legend: 'True' | ||
mat: 'True' | ||
num_plots: '1' | ||
pdf: 'True' | ||
pkl: 'True' | ||
plottitle: Voltage Sweep | ||
save_location: '' | ||
saveplot: 'True' | ||
visual: 'True' | ||
xscale: '1' | ||
xtitle: Voltage (V) | ||
yscale: '1' | ||
ytitle: Current (A) | ||
variables: | ||
Channel A: 'True' | ||
Channel B: 'False' | ||
IV: 'True' | ||
PV: 'True' | ||
RV: 'True' | ||
Start: '0' | ||
Step: '0.2' | ||
Stop: '10' | ||
livsweep_mzi(set_wavelength_voltage_sweep_ida): | ||
Runtime: 75.0 | ||
results_info: | ||
csv: 'True' | ||
foldername: '' | ||
legend: 'True' | ||
mat: 'True' | ||
num_plots: '1' | ||
pdf: 'True' | ||
pkl: 'False' | ||
plottitle: Set Wavelength Voltage Sweep | ||
save_location: '' | ||
saveplot: 'True' | ||
visual: 'True' | ||
xscale: '1' | ||
xtitle: Voltage (V) | ||
yscale: '1' | ||
ytitle: Current (A) | ||
variables: | ||
Channel A: 'True' | ||
Channel B: 'False' | ||
IV: 'True' | ||
PV: 'True' | ||
RV: 'True' | ||
Start: '0' | ||
Step: '0.1' | ||
Stop: '5' | ||
Wavelengths: 1520, 1540, 1560 | ||
livsweep_spiral(set_wavelength_voltage_sweep_ida): | ||
Runtime: 75.0 | ||
results_info: | ||
csv: 'True' | ||
foldername: '' | ||
legend: 'True' | ||
mat: 'True' | ||
num_plots: '1' | ||
pdf: 'True' | ||
pkl: 'False' | ||
plottitle: Set Wavelength Voltage Sweep | ||
save_location: '' | ||
saveplot: 'True' | ||
visual: 'True' | ||
xscale: '1' | ||
xtitle: Voltage (V) | ||
yscale: '1' | ||
ytitle: Current (A) | ||
variables: | ||
Channel A: 'True' | ||
Channel B: 'False' | ||
IV: 'True' | ||
PV: 'True' | ||
RV: 'True' | ||
Start: '0' | ||
Step: '0.2' | ||
Stop: '10' | ||
Wavelengths: 1520, 1540, 1560 | ||
passive_sweep(wavelength_sweep_ida): | ||
Runtime: 237.5 | ||
results_info: | ||
csv: 'True' | ||
foldername: '' | ||
legend: 'True' | ||
mat: 'True' | ||
num_plots: '1' | ||
pdf: 'True' | ||
pkl: 'False' | ||
plottitle: WavelengthSweep | ||
save_location: '' | ||
saveplot: 'True' | ||
visual: 'True' | ||
xscale: '1' | ||
xtitle: Wavelength (nm) | ||
yscale: '1' | ||
ytitle: Power (dBm) | ||
variables: | ||
Initialrange: '-20' | ||
Laser Output: High Power | ||
Numscans: '1' | ||
Power: '1' | ||
RangeDec: '20' | ||
Start: '1485' | ||
Step: '.1' | ||
Stop: '1580' | ||
Sweep Speed: auto | ||
wavlsweep_biased(set_voltage_wavelength_sweep_ida): | ||
Runtime: 1000.0 | ||
results_info: | ||
csv: 'True' | ||
foldername: '' | ||
legend: 'True' | ||
mat: 'True' | ||
num_plots: '1' | ||
pdf: 'True' | ||
pkl: 'False' | ||
plottitle: Set Voltage Wavelength Sweep | ||
save_location: '' | ||
saveplot: 'True' | ||
visual: 'True' | ||
xscale: '1' | ||
xtitle: Wavelength (nm) | ||
yscale: '1' | ||
ytitle: Power (dBm) | ||
variables: | ||
Channel A: 'True' | ||
Channel B: 'False' | ||
Initialrange: '-20' | ||
Laser Output: High Power | ||
Numscans: '1' | ||
Power: '1' | ||
RangeDec: '20' | ||
Start: '1480' | ||
Step: '.1' | ||
Stop: '1580' | ||
Sweep Speed: auto | ||
Voltages: 0, 2, 5, 10 |
Oops, something went wrong.