-
Notifications
You must be signed in to change notification settings - Fork 2
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 #5 from lobis/1-support-multiple-high-voltage-powe…
…r-supply-brands Support multiple power supply brands
- Loading branch information
Showing
21 changed files
with
104 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build" | |
|
||
|
||
[project] | ||
name = "caenhv" | ||
name = "hvps" | ||
authors = [ | ||
{ name = "Luis Antonio Obis Aparicio", email = "[email protected]" }, | ||
] | ||
|
@@ -30,9 +30,9 @@ test = [ | |
] | ||
|
||
[project.urls] | ||
"Download" = "https://github.com/lobis/caen-hv/releases" | ||
"Homepage" = "https://github.com/lobis/caen-hv" | ||
"Bug Tracker" = "https://github.com/lobis/caen-hv/issues" | ||
"Download" = "https://github.com/lobis/hvps/releases" | ||
"Homepage" = "https://github.com/lobis/hvps" | ||
"Bug Tracker" = "https://github.com/lobis/hvps/issues" | ||
|
||
[tool.hatch.version] | ||
path = "src/caenhv/version.py" | ||
path = "src/hvps/version.py" |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
from .devices import HVPS |
Empty file.
3 changes: 2 additions & 1 deletion
3
src/caenhv/commands/__init__.py → src/hvps/commands/caen/__init__.py
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
File renamed without changes.
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,11 @@ | ||
from __future__ import annotations | ||
import re | ||
|
||
from src.hvps.commands.iseg.channel import _get_set_channel_command, _get_mon_channel_command | ||
|
||
import logging | ||
|
||
|
||
def _parse_response(response: bytes) -> str: | ||
# TODO: implement | ||
pass |
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,11 @@ | ||
from __future__ import annotations | ||
|
||
|
||
def _get_mon_channel_command(channel: int, parameter: str) -> bytes: | ||
# TODO: implement | ||
pass | ||
|
||
|
||
def _get_set_channel_command(channel: int, parameter: str, value: str | int | float | None) -> bytes: | ||
# TODO: implement | ||
pass |
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 @@ | ||
from .hvps import HVPS |
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
File renamed without changes.
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,14 +1,16 @@ | ||
import pytest | ||
|
||
from caenhv import CaenHV | ||
from hvps import HVPS | ||
|
||
|
||
# find a way to only run these tests if a serial port connection exists | ||
|
||
@pytest.mark.skip(reason="Needs fixing") | ||
def test_caen_no_connection(): | ||
with pytest.raises(Exception): | ||
# no ports available | ||
caen = CaenHV(port=None, connect=False) | ||
caen = HVPS(port=None, connect=False) | ||
|
||
with pytest.raises(Exception): | ||
# no ports available or cannot connect | ||
caen = CaenHV(connect=True) | ||
caen = HVPS(connect=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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import pytest | ||
|
||
from hvps.commands.caen import _parse_response, _get_set_module_command, _get_mon_module_command | ||
|
||
|
||
def test_caen_module_get_commands(): | ||
with pytest.raises(ValueError): | ||
# invalid parameter name | ||
_get_mon_module_command(0, "TEST") | ||
|
||
with pytest.raises(ValueError): | ||
# invalid board number | ||
_get_mon_module_command(-1, "BDNAME") | ||
|
||
command = _get_mon_module_command(0, "BDNAME") | ||
|
||
|
||
def test_caen_module_set_commands(): | ||
pass | ||
|
||
|
||
def test_caen_channel_get_commands(): | ||
pass | ||
|
||
|
||
def test_caen_channel_set_commands(): | ||
pass | ||
|
||
|
||
def test_caen_parse_response(): | ||
pass |
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 @@ | ||
import pytest |
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,21 @@ | ||
import pytest | ||
|
||
|
||
def test_iseg_module_get_commands(): | ||
pass | ||
|
||
|
||
def test_iseg_module_set_commands(): | ||
pass | ||
|
||
|
||
def test_iseg_channel_get_commands(): | ||
pass | ||
|
||
|
||
def test_iseg_channel_set_commands(): | ||
pass | ||
|
||
|
||
def test_iseg_parse_response(): | ||
pass |