Skip to content

Commit 5194616

Browse files
unnessory comments removed
1 parent 870364d commit 5194616

6 files changed

Lines changed: 12 additions & 37 deletions

File tree

pica/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Auto-generated package init for pica
1+

pica/cli.py

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
"""
2-
PICA Command Line Interface (CLI)
3-
4-
This module handles the parsing of command-line arguments to launch
5-
specific instrument control GUIs and utility scripts.
6-
"""
7-
# pica/cli.py
8-
91
import os
102
import sys
113
import subprocess
@@ -33,7 +25,6 @@
3325
"pica.utils.PlotterUtil_GUI",
3426
]
3527

36-
# Metadata & Terms
3728
APP_NAME = "PICA Command Line Interface"
3829
VERSION = "17.0"
3930
AUTHORS = "Prathamesh K. Deshmukh, Sudip Mukherjee"
@@ -50,8 +41,7 @@
5041
"""
5142

5243
def print_banner():
53-
"""Prints the professional header."""
54-
print("\033[H\033[J") # Clear screen
44+
print("\033[H\033[J")
5545
print("="*60)
5646
print(f" {APP_NAME} (v{VERSION})")
5747
print(f" {AFFILIATION}")
@@ -65,14 +55,10 @@ def print_banner():
6555

6656

6757
def find_scripts(base_path):
68-
"""
69-
Recursively finds all python files ending with 'Instrument_Control.py'.
70-
Returns a list of tuples: (Display Name, Full Path)
71-
"""
7258
scripts = []
7359
base = Path(base_path)
7460

75-
# Exclude development/utility scripts that are not main measurement modules
61+
# Exclude non-main measurement scripts.
7662
exclude_list = [
7763
"BasicTest_S830_Instrument_Control.py",
7864
"GPIB_InterfaceTest_Simple_Instrument_Control.py",
@@ -82,18 +68,16 @@ def find_scripts(base_path):
8268
if path.name in exclude_list:
8369
continue
8470

85-
# Create a readable name from the filename
86-
# e.g., 'IV_K2400_Loop_Instrument_Control.py' -> 'IV K2400 Loop'
71+
# Create readable name from filename.
8772
name = path.stem.replace("_Instrument_Control", "").replace("_", " ")
8873

89-
# Get path relative to the run location for clarity, or absolute
74+
# Get relative or absolute path.
9075
scripts.append((name, str(path)))
9176

9277
return sorted(scripts)
9378

9479

9580
def run_script(script_path):
96-
"""Runs the selected script using the current python interpreter."""
9781
print(f"\n[INFO] Module: {os.path.basename(script_path)}")
9882
print("[INFO] Enter arguments below, or press ENTER for defaults.")
9983

@@ -116,7 +100,6 @@ def run_script(script_path):
116100

117101

118102
def main():
119-
# Detect where the 'pica' package is located
120103
current_dir = os.path.dirname(os.path.abspath(__file__))
121104

122105
while True:
@@ -157,4 +140,4 @@ def main():
157140
time.sleep(1.5)
158141

159142
if __name__ == "__main__":
160-
main()
143+
main()

pica/keithley/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Auto-generated package init for keithley
1+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Auto-generated package init for delta_mode
1+

pica/main.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def _render_markdown_content(self, text_area, lines):
919919
text_area.insert('end', part, "list_l1")
920920
text_area.insert('end', '\n')
921921
elif stripped in ('---', '***', '___'):
922-
text_area.insert('end', f"{''*120}\n", "hr")
922+
text_area.insert('end', f"{'-'*120}\n", "hr")
923923
else:
924924
parts = re.split(r'(\*\*.*?\*\*)', line)
925925
for part in parts:
@@ -1001,8 +1001,7 @@ def create_widgets(self):
10011001
text="Close",
10021002
style='App.TButton',
10031003
command=self.destroy).grid(
1004-
row=2,
1005-
column=0,
1004+
row=2, column=0,
10061005
sticky='ew',
10071006
pady=(
10081007
15,
@@ -1051,7 +1050,7 @@ def show_address_guide(self):
10511050
• SRS SR830 Lock-in: GPIB0::8::INSTR
10521051
• Stanford PS365 HV: GPIB0::14::INSTR
10531052
1054-
\n---------------------------------------------
1053+
---------------------------------------------
10551054
"""
10561055
self.log_to_scanner(guide_text, add_timestamp=False)
10571056

@@ -1112,4 +1111,4 @@ def main():
11121111
multiprocessing.set_start_method('spawn', force=True)
11131112
multiprocessing.freeze_support()
11141113

1115-
main()
1114+
main()

pica_cli.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
#!/usr/bin/env python3
2-
"""
3-
PICA Command Line Launcher
4-
--------------------------
5-
Use this script to run PICA measurement modules without the Graphical User Interface.
6-
Ideal for remote access (SSH) or automated environments.
7-
"""
8-
92
from pica.cli import main
103

114
if __name__ == "__main__":

0 commit comments

Comments
 (0)