Skip to content

Commit 2a01338

Browse files
path for refrence updated
1 parent f8d6bec commit 2a01338

4 files changed

Lines changed: 177 additions & 174 deletions

File tree

Rename_to_GUI.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

Update_path.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import os
2+
import datetime
3+
4+
# Configuration
5+
OUTPUT_FILE = os.path.join("docs", "project_paths_reference.txt")
6+
7+
# Folders and files to exclude from the reference list
8+
IGNORE_DIRS = {
9+
".git", ".github", "__pycache__", ".venv", "venv", "env",
10+
".vscode", ".idea", "build", "dist", "pica.egg-info"
11+
}
12+
IGNORE_FILES = {
13+
".DS_Store", "Thumbs.db", "update_paths.py",
14+
"fix_project.py", "finalize_structure.py"
15+
}
16+
17+
def generate_structure(startpath):
18+
output_lines = []
19+
20+
for root, dirs, files in os.walk(startpath):
21+
# filter directories in-place to prevent walking into them
22+
dirs[:] = [d for d in dirs if d not in IGNORE_DIRS]
23+
24+
# Calculate indentation level
25+
level = root.replace(startpath, '').count(os.sep)
26+
indent = ' ' * level
27+
28+
# Add the directory
29+
dirname = os.path.basename(root)
30+
if dirname == '.':
31+
dirname = "PICA (Root Directory)"
32+
output_lines.append(f"{indent}{dirname}/")
33+
34+
# Add the files
35+
sub_indent = ' ' * (level + 1)
36+
for f in sorted(files):
37+
if f not in IGNORE_FILES:
38+
output_lines.append(f"{sub_indent}{f}")
39+
40+
return "\n".join(output_lines)
41+
42+
def main():
43+
# Ensure docs directory exists
44+
if not os.path.exists("docs"):
45+
os.makedirs("docs")
46+
print("Created 'docs' directory.")
47+
48+
print("Scanning directory structure...")
49+
structure_text = generate_structure(".")
50+
51+
header = f"""PICA Project File Structure Reference
52+
Generated on: {datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
53+
================================================================================
54+
"""
55+
56+
try:
57+
with open(OUTPUT_FILE, "w", encoding="utf-8") as f:
58+
f.write(header + "\n")
59+
f.write(structure_text)
60+
print(f"✅ Successfully updated: {OUTPUT_FILE}")
61+
except Exception as e:
62+
print(f"❌ Error writing file: {e}")
63+
64+
if __name__ == "__main__":
65+
main()

docs/project_paths_reference.txt

Lines changed: 112 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,112 @@
1-
===============================================================================
2-
PICA Project Path Reference
3-
===============================================================================
4-
5-
This document consolidates all hardcoded and dynamically generated paths
6-
used throughout the PICA project for build, development, and runtime operations.
7-
8-
9-
-------------------------------------------------------------------------------
10-
1. Main Executable Launcher (`Setup/Picachu.py`)
11-
-------------------------------------------------------------------------------
12-
13-
This file is the entry point for the compiled executable. It uses a `resource_path`
14-
function to resolve paths differently for development vs. bundled modes.
15-
16-
**Asset & Documentation Paths:**
17-
- LOGO_FILE: _assets/LOGO/UGC_DAE_CSR_NBG.jpeg
18-
- MANUAL_URL: https://github.com/prathameshnium/PICA-Python-Instrument-Control-and-Automation/tree/main/_assets/Manuals
19-
- README_FILE: PICA_README.md
20-
- LICENSE_FILE: LICENSE
21-
- UPDATES_FILE: Change_Logs.md
22-
23-
**Sub-Program Directory (Bundled):**
24-
- SUB_PROGRAMS_DIR: "programs"
25-
26-
**Script Paths for Bundled Executable (`SCRIPT_PATHS`):**
27-
- Delta Mode I-V Sweep: programs/IV_K6221_DC_Sweep_Frontend_V10.exe
28-
- Delta Mode R-T: programs/Delta_RT_K6221_K2182_L350_T_Control_Frontend_v5.exe
29-
- Delta Mode R-T (T_Sensing): programs/Delta_RT_K6221_K2182_L350_Sensing_Frontend_v5.exe
30-
- K2400 I-V: programs/IV_K2400_Frontend_v5.exe
31-
- K2400 R-T: programs/RT_K2400_L350_T_Control_Frontend_v3.exe
32-
- K2400 R-T (T_Sensing): programs/RT_K2400_L350_T_Sensing_Frontend_v4.exe
33-
- K2400_2182 I-V: programs/IV_K2400_K2182_Frontend_v3.exe
34-
- K2400_2182 R-T: programs/RT_K2400_K2182_T_Control_Frontend_v3.exe
35-
- K2400_2182 R-T (T_Sensing): programs/RT_K2400_2182_L350_T_Sensing_Frontend_v2.exe
36-
- K6517B I-V: programs/IV_K6517B_Frontend_v11.exe
37-
- K6517B R-T: programs/RT_K6517B_L350_T_Control_Frontend_v13.exe
38-
- K6517B R-T (T_Sensing): programs/RT_K6517B_L350_T_Sensing_Frontend_v14.exe
39-
- Pyroelectric Current: programs/Pyroelectric_K6517B_L350_Frontend_v4.exe
40-
- Lakeshore Temp Control: programs/T_Control_L350_RangeControl_Frontend_v8.exe
41-
- Lakeshore Temp Monitor: programs/T_Sensing_L350_Frontend_v4.exe
42-
- LCR C-V Measurement: programs/CV_KE4980A_Frontend_v3.exe
43-
- Plotter Utility: programs/PlotterUtil_Frontend_v3.exe
44-
45-
**Script Paths for Development Mode (`SCRIPT_PATHS_DEV`):**
46-
- IV_K6221_DC_Sweep_Frontend_V10.py: Delta_mode_Keithley_6221_2182/IV_K6221_DC_Sweep_Frontend_V10.py
47-
- Delta_RT_K6221_K2182_L350_T_Control_Frontend_v5.py: Delta_mode_Keithley_6221_2182/Delta_RT_K6221_K2182_L350_T_Control_Frontend_v5.py
48-
- Delta_RT_K6221_K2182_L350_Sensing_Frontend_v5.py: Delta_mode_Keithley_6221_2182/Delta_RT_K6221_K2182_L350_Sensing_Frontend_v5.py
49-
- IV_K2400_Frontend_v5.py: Keithley_2400/IV_K2400_Frontend_v5.py
50-
- RT_K2400_L350_T_Control_Frontend_v3.py: Keithley_2400/RT_K2400_L350_T_Control_Frontend_v3.py
51-
- RT_K2400_L350_T_Sensing_Frontend_v4.py: Keithley_2400/RT_K2400_L350_T_Sensing_Frontend_v4.py
52-
- IV_K2400_K2182_Frontend_v3.py: Keithley_2400_Keithley_2182/IV_K2400_K2182_Frontend_v3.py
53-
- RT_K2400_K2182_T_Control_Frontend_v3.py: Keithley_2400_Keithley_2182/RT_K2400_K2182_T_Control_Frontend_v3.py
54-
- RT_K2400_2182_L350_T_Sensing_Frontend_v2.py: Keithley_2400_Keithley_2182/RT_K2400_2182_L350_T_Sensing_Frontend_v2.py
55-
- IV_K6517B_Frontend_v11.py: Keithley_6517B/High_Resistance/IV_K6517B_Frontend_v11.py
56-
- RT_K6517B_L350_T_Control_Frontend_v13.py: Keithley_6517B/High_Resistance/RT_K6517B_L350_T_Control_Frontend_v13.py
57-
- RT_K6517B_L350_T_Sensing_Frontend_v14.py: Keithley_6517B/High_Resistance/RT_K6517B_L350_T_Sensing_Frontend_v14.py
58-
- Pyroelectric_K6517B_L350_Frontend_v4.py: Keithley_6517B/Pyroelectricity/Pyroelectric_K6517B_L350_Frontend_v4.py
59-
- T_Control_L350_RangeControl_Frontend_v8.py: Lakeshore_350_340/T_Control_L350_RangeControl_Frontend_v8.py
60-
- T_Sensing_L350_Frontend_v4.py: Lakeshore_350_340/T_Sensing_L350_Frontend_v4.py
61-
- CV_KE4980A_Frontend_v3.py: LCR_Keysight_E4980A/CV_KE4980A_Frontend_v3.py
62-
- PlotterUtil_Frontend_v3.py: Utilities/PlotterUtil_Frontend_v3.py
63-
64-
65-
-------------------------------------------------------------------------------
66-
2. Development Launcher (`PICA_v6.py`)
67-
-------------------------------------------------------------------------------
68-
69-
This file is the entry point for running the suite from source code.
70-
71-
**Asset & Documentation Paths:**
72-
- LOGO_FILE: _assets/LOGO/UGC_DAE_CSR_NBG.jpeg
73-
- MANUAL_FILE: _assets/Manuals
74-
- README_FILE: README.md
75-
- LICENSE_FILE: LICENSE
76-
- UPDATES_FILE: Change_Logs.md
77-
78-
**Script Paths for Development (`SCRIPT_PATHS`):**
79-
- All paths are identical to `SCRIPT_PATHS_DEV` in `Picachu.py` but are resolved
80-
relative to the project root.
81-
82-
83-
-------------------------------------------------------------------------------
84-
3. Build Script (`build.py`)
85-
-------------------------------------------------------------------------------
86-
87-
This script orchestrates the PyInstaller build process.
88-
89-
**Build Directories:**
90-
- PROJECT_ROOT: (Dynamically determined) f:\GitHub\PICA-Python-Instrument-Control-and-Automation
91-
- DIST_DIR: dist/
92-
- BUILD_DIR: build/
93-
- SUB_PROGRAMS_TEMP_DIR: build/programs/
94-
- SPECS_DIR: Setup/specs/
95-
96-
**Build Assets:**
97-
- ICON_FILE: _assets/LOGO/PICA_LOGO.ico
98-
- PICACHU_SCRIPT: Setup/Picachu.py
99-
100-
**Sub-Programs to Compile (`SUB_PROGRAMS`):**
101-
- This list mirrors the keys in `Picachu.py`'s `SCRIPT_PATHS`, mapping the
102-
source .py file to its final .exe name.
103-
104-
105-
-------------------------------------------------------------------------------
106-
4. Individual Frontend Scripts (General Pattern)
107-
-------------------------------------------------------------------------------
108-
109-
Most frontend scripts define paths to their assets and utilities relative to
110-
their own file location.
111-
112-
**Asset Paths (Example from `IV_K2400_Frontend_v5.py`):**
113-
- LOGO_FILE: ../_assets/LOGO/UGC_DAE_CSR_NBG.jpeg
114-
115-
**Utility Launch Paths (Example from `IV_K2400_Frontend_v5.py`):**
116-
- Plotter Utility: ../Utilities/PlotterUtil_Frontend_v3.py
117-
- GPIB Scanner: ../Utilities/GPIB_Instrument_Scanner_Frontend_v4.py
118-
(Note: Path depth `..` varies depending on the script's location)
119-
120-
121-
-------------------------------------------------------------------------------
122-
5. GitHub Actions Workflow (`.github/workflows/build-exe.yml`)
123-
-------------------------------------------------------------------------------
124-
125-
This file automates the Nuitka build on GitHub's servers.
126-
127-
**Nuitka Build Paths:**
128-
- script-name: Setup/Picachu.py
129-
- output-dir: build
130-
- windows-icon-from-ico: _assets/LOGO/UGC_DAE_CSR.ico
131-
- include-data-dir: _assets=_assets
132-
- include-data-files: LICENSE=LICENSE, PICA_README.md=PICA_README.md, Change_Logs.md=Change_Logs.md
133-
- include-package: (Lists all top-level script directories like `Keithley_2400`, `Utilities`, etc.)
134-
135-
**Release Asset Path:**
136-
- file: build/Picachu.exe
1+
PICA Project File Structure Reference
2+
Generated on: 2025-11-21 23:18:42
3+
================================================================================
4+
5+
PICA (Root Directory)/
6+
.gitignore
7+
CITATION.cff
8+
CODE_OF_CONDUCT.md
9+
CONTRIBUTING.md
10+
LICENSE
11+
PICA_v6.py
12+
README.md
13+
Update_path.py
14+
pyproject.toml
15+
requirements.txt
16+
robots.txt
17+
assets/
18+
Images/
19+
PICA_Laucher_V4.png
20+
PICA_Laucher_V6.png
21+
LOGO/
22+
PICA_LOGO.ico
23+
PICA_LOGO.png
24+
PICA_LOGO_NBG.png
25+
UGC_DAE_CSR.ico
26+
UGC_DAE_CSR.jpeg
27+
UGC_DAE_CSR_NBG.jpeg
28+
Manuals/
29+
6517B-900-01B_August_2022_User.pdf
30+
6517B-901-01E_Aug_2022_Ref.pdf
31+
Keithley_2182A_Manual.pdf
32+
Keithley_6221_Manual.pdf
33+
Keithley_Low-Level-Measurements-Handbook_7Ed.pdf
34+
Lakeshore_340_Manual.pdf
35+
Lakeshore_350_Manual.pdf
36+
PyMeasure_Documentation.pdf
37+
PyMeasure_Keithley-2400-Example.pdf
38+
PyVISA_Complex-Examples.pdf
39+
PyVISA_Documentation.epub
40+
pymeasure-readthedocs-io-en-latest.pdf
41+
Delta_mode_Keithley_6221_2182/
42+
Delta_RT_K6221_K2182_L350_Sensing_GUI_v5.py
43+
Delta_RT_K6221_K2182_L350_T_Control_GUI_v5.py
44+
IV_K6221_DC_Sweep_GUI_V10.py
45+
Backends/
46+
Delta_K6221_K2182_L350_T_Sensing_Backend_v1.py
47+
Delta_K6221_K2182_Simple_v7.py
48+
deployment/
49+
Picachu.py
50+
build-exe.yml
51+
build.py
52+
docs/
53+
Change_Logs.md
54+
GPIB_Address_Guide.md
55+
Geting_Strated_With_Interfacing.md
56+
PICA_README.md
57+
Ranges_for_Measurements.md
58+
index.rst
59+
project_paths_reference.txt
60+
Keithley_2400/
61+
IV_K2400_GUI_v5.py
62+
RT_K2400_L350_T_Control_GUI_v3.py
63+
RT_K2400_L350_T_Sensing_GUI_v4.py
64+
Backends/
65+
IV_K2400_Loop_Backend_v10.py
66+
Keithley_2400_Keithley_2182/
67+
IV_K2400_K2182_GUI_v3.py
68+
RT_K2400_2182_L350_T_Sensing_GUI_v2.py
69+
RT_K2400_K2182_T_Control_GUI_v3.py
70+
Backends/
71+
IV_K2400_K2182_Backend_v1.py
72+
Keithley_6517B/
73+
High_Resistance/
74+
IV_K6517B_GUI_v11.py
75+
RT_K6517B_L350_T_Control_GUI_v13.py
76+
RT_K6517B_L350_T_Sensing_GUI_v14.py
77+
Backends/
78+
IV_K6517B_L350_T_Control_Backend_v6.py
79+
IV_K6517B_Simple_Backend_v10.py
80+
Pyroelectricity/
81+
Pyroelectric_K6517B_L350_GUI_v4.py
82+
Backends/
83+
Current_K6517B_Simple_Backend_v10.py
84+
Poling_K6517B_Backend_v10.py
85+
PyroDataVisualization_Simple_v10.py
86+
Pyroelectric_K6517B_Working_Backend_v10.py
87+
Lakeshore_350_340/
88+
T_Control_L350_RangeControl_GUI_v8.py
89+
T_Sensing_L350_GUI_v4.py
90+
Backends/
91+
T_Control_L350_Simple_Backend_v10.py
92+
LCR_Keysight_E4980A/
93+
CV_KE4980A_GUI_v3.py
94+
Backends/
95+
CV_KE4980A_Simple_Backend_v10.py
96+
Lock_in_amplifier/
97+
BasicTest_S830_Backend_v1.py
98+
paper/
99+
paper.bib
100+
paper.md
101+
tests/
102+
__init__.py
103+
test_auto_discovery.py
104+
test_deep_simulation.py
105+
test_full_stack_simulation.py
106+
Utilities/
107+
GIPB_InterfaceTest_Simple_Backend.py
108+
GPIB_Instrument_Scanner_GUI_v4.py
109+
GPIB_Interface_Rescue_Simple_Backened_v2_.py
110+
GUI_Basic_Format_v2.py
111+
LivePlotter_v10.py
112+
PlotterUtil_GUI_v3.py

0 commit comments

Comments
 (0)