Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed docs and naming convention, removed debugging print statements #14 #15

Merged
merged 24 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run-code-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
pip install -e .

- name: Test with pytest, Python 3.11
run: pytest app/siepic_testcreator
run: pytest app/SiEPIC_TestCreator



Expand All @@ -54,7 +54,7 @@ jobs:
pip install -e .

- name: Test with pytest, Python 3.10
run: pytest --cov=app/siepic_testcreator --cov-report=xml
run: pytest --cov=app/SiEPIC_TestCreator --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ A tool for creating YAML files for use across UBC probe stations. This aplicatio
## Setup

1. **Prerequisites/Labelling:** Python 3.10 and above
![](readme_images/optical_labels.png)
![image](https://github.com/PetervandenDoel/SiEPIC_testcreator/assets/73015873/12854132-ae9a-4b37-8059-e10656113491)



![](readme_images/electrical_labels.png)

2. **Installation**

![](readme_images/installation.png)
![image](https://github.com/PetervandenDoel/SiEPIC_testcreator/assets/73015873/381ae711-785b-4e66-b2dd-03c5bfe6c2e6)


## Usage

Find here instruction on the work flow of the application

The GUI can be launched using the terminal or via python. For an example using python, see [run_gui.py](example/run_gui.py). To launch the GUI via the terminal, execute the command below:
```
siepic_testcreator --gui
SiEPIC_TestCreator --gui
```


Expand All @@ -30,10 +34,11 @@ siepic_testcreator --gui

![](readme_images/upload_file.png)
![](readme_images/create_sequences.png)
![](readme_images/general_design.png)
![image](https://github.com/PetervandenDoel/SiEPIC_testcreator/assets/73015873/a67420ec-2395-4cd2-9aec-26c3e7694928)



![](readme_images/time_limit.png)
![](readme_images/seting_routines.png)
![image](https://github.com/PetervandenDoel/SiEPIC_testcreator/assets/73015873/406d5bde-5b99-4e24-be7b-ed83b0c7522f)


## License
Expand Down
7 changes: 3 additions & 4 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ Windows 10 or greater, Linux, or Mac OSX
### Installing

```
pip install siepic_testcreator
pip install SiEPIC_TestCreator
```

### Executing program

* How to run the program
* How to run the program, note imports are case sensitive
```
import siepic_testcreator
from siepic_testcreator import sequencecreator as sc
from SiEPIC_TestCreator import sequencecreator as sc
sc.launch()
```

Expand Down
2 changes: 1 addition & 1 deletion app/SiEPIC_TestCreator/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from siepic_testcreator.sequencecreator import launch
from SiEPIC_TestCreator.sequencecreator import launch

def main():
if '--gui' in sys.argv:
Expand Down
24 changes: 12 additions & 12 deletions app/SiEPIC_TestCreator/sequencecreator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,8 @@ def create_devices_from_file(self, file_path):
x, y, device_id = line.split(", ")


print("device ID is")
print(device_id)
#print("device ID is")
#print(device_id)
# #"If its clean with no underscores, add pad to device dictonary"
# if("_" not in device_id):
# elec_coords = ['G', float(x), float(y)]
Expand Down Expand Up @@ -1314,33 +1314,33 @@ def create_devices_from_file(self, file_path):
#We need to strip away the ground label at the end though
device_id = device_id.replace("_G1", "")

print("new device ID is")
print(device_id)
#print("new device ID is")
#print(device_id)
#Now we should be fine to add the electrical coordinates To our device dictionary
print("attempting to append device")
#print("attempting to append device")
elec_coords = ['G', float(x), float(y)]
devices_dict[device_id].add_electrical_coordinates(elec_coords)
print("appended successfully")
#print("appended successfully")

elif(device_id.endswith("_G")):
device_id = device_id.replace("_G", "")


print("new device ID is")
print(device_id)
#print("new device ID is")
#print(device_id)

print("attempting to append device")
#print("attempting to append device")
elec_coords = ['G', float(x), float(y)]
devices_dict[device_id].add_electrical_coordinates(elec_coords)
print("appended successfully")
#print("appended successfully")


else: #If there is none of these ground labels then we can just try to add the coordinates and Throw exceptions if there are any other errors

print("attempting to append device")
#print("attempting to append device")
elec_coords = ['G', float(x), float(y)]
devices_dict[device_id].add_electrical_coordinates(elec_coords)
print("appended successfully")
#print("appended successfully")

except:
print(
Expand Down
7 changes: 0 additions & 7 deletions app/siepic_testcreator/File_edits/coordinate_file_edits.txt

This file was deleted.

2 changes: 0 additions & 2 deletions app/siepic_testcreator/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions app/siepic_testcreator/__main__.py

This file was deleted.

21 changes: 0 additions & 21 deletions app/siepic_testcreator/run_gui_for_debugging.py

This file was deleted.

Loading
Loading