-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to version to 1.1.5. Changed how the pytoml information is fo…
…und. Updated dependencies.
- Loading branch information
1 parent
17d3162
commit 6d538f3
Showing
13 changed files
with
177 additions
and
42 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# - Configuration file stored 2024-07-31 11:25:23.500548 - | ||
# - Configuration file stored 2024-08-08 13:17:14.134241 - | ||
LaserConfig: #!!python/object:controller.LaserConfig | ||
epos_dll: "@Path:<C:/Users/myjustice/Documents/workspace/fs.lasercontrol/src/SacherECLControl/libs/SacherLib/PythonMotorControlClass/EposCmd64.dll>" # epos_dll: None | ||
motor_control_pyd: "@Path:<C:/Users/myjustice/Documents/workspace/fs.lasercontrol/src/SacherECLControl/libs/SacherLib/PythonMotorControlClass/lib/Python312/SacherMotorControl.pyd>" # motor_control_pyd: None | ||
wl_sweep_start: 857 # wl_sweep_start: None | ||
wl_sweep_stop: 870 # wl_sweep_stop: None | ||
velocity: 10.0 # velocity: None | ||
acceleration: 2.0 # acceleration: None | ||
deceleration: 2.0 # deceleration: None | ||
velocity: 2.0 # velocity: None | ||
acceleration: 1.0 # acceleration: None | ||
deceleration: 1.0 # deceleration: None | ||
available_ports: ['USB0', 'USB1', 'USB2', 'USB3', 'USB4', 'USB5', 'USB6', 'USB7', 'USB8', 'USB9'] # available_ports: None | ||
port: "USB0" # port: None |
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
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ packages = ["src/SacherECLControl"] | |
|
||
[project] | ||
name = "PySacherECLControl" | ||
version = "1.1.3" | ||
version = "1.1.5" | ||
authors = [ | ||
{ name="Christoph Schmidt", email="[email protected]" }, | ||
] | ||
|
@@ -22,10 +22,10 @@ dependencies = [ | |
'PySide6', | ||
'rich', | ||
'pyyaml', | ||
'PyADScopeControl>=1.1.4', | ||
'PyADScopeControl>=1.1.7', | ||
'PySide6WidgetCollection>=1.0.2', # important, otherwise AboutDialog is not available | ||
'mpPy6', | ||
'confPy6' | ||
'confPy6>=1.3.1' | ||
] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# ====================================================================================================================== | ||
# EposCMD64.dll is needed, thus, try to copy it | ||
# ====================================================================================================================== | ||
import os | ||
import pathlib | ||
import shutil | ||
|
||
|
||
|
||
def copyEposDLL(epos_dll="./EposCMD64.dll", logger=None): | ||
if logger is None: | ||
logger = print | ||
else: | ||
logger = logger.info | ||
|
||
dll_dir = pathlib.Path(epos_dll) | ||
dll_name = os.path.basename(epos_dll) | ||
#epos_dll_name = pathlib.Path(epos_dll_name) | ||
logger(f"Copying {dll_dir} to {os.getcwd()}") | ||
|
||
if not dll_dir.exists(): | ||
raise FileNotFoundError(f"Could not find {epos_dll}") | ||
|
||
dll_dir = str(dll_dir.resolve()) | ||
dll_dest = f"{os.getcwd()}/{dll_name}" # Copy the file to the workspace folder | ||
# Copy the file "EposCMD64.dll" to the current dir | ||
if not pathlib.Path(dll_dest).exists(): | ||
shutil.copyfile(dll_dir, f"{os.getcwd()}/EposCMD64.dll") | ||
logger(f"Copied {dll_name} to {os.getcwd()}") | ||
elif pathlib.Path(dll_dest).exists(): | ||
logger(f"{dll_name} already exists in {os.getcwd()}") | ||
|
||
|
||
# Check if the file was copied | ||
if not pathlib.Path(dll_dest).exists(): | ||
raise FileNotFoundError(f"Could not copy {dll_name} to {os.getcwd()}") | ||
|
||
def check_if_git_or_pip(): | ||
# check if a folder .git is present ../../ | ||
git_dir = pathlib.Path(__file__).parent.parent.parent / ".git" | ||
if git_dir.exists(): | ||
print("git_dir:", git_dir) | ||
else: | ||
print("git_dir does not exist") | ||
|
||
def get_pyprojecttoml() -> pathlib.Path: | ||
# is found in ../../pyconfig.toml | ||
pytoml_via_git = pathlib.Path(__file__).parent.parent.parent / "pyproject.toml" | ||
# found in ./pyconfig.toml: Copied to the root dir | ||
pytoml_via_pip = pathlib.Path(__file__).parent / "pyproject.toml" | ||
|
||
if pytoml_via_git.exists(): | ||
#print("pytoml_via_git:", pytoml_via_git) | ||
return pytoml_via_git.resolve().absolute() | ||
elif pytoml_via_pip.exists(): | ||
#print("pytoml_via_pip:", pytoml_via_pip) | ||
return pytoml_via_pip.resolve().absolute() | ||
|
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
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
Oops, something went wrong.