fixed project structure and pdm compatibility

This commit is contained in:
Ali Elnwegy 2024-01-31 10:42:05 +01:00
parent 71d224d5b9
commit 0400bd6ecd
18 changed files with 178 additions and 23 deletions

1
.pdm-python Normal file
View File

@ -0,0 +1 @@
/home/an/Documents/Git/tuhh_gitlab/fn_gen/.venv/bin/python

View File

@ -1,11 +0,0 @@
SIN_RANGE = (1e-6, 50e6)
SQU_RANGE = (1e-6, 15e6)
RAMP_RANGE = (1e-6, 1.5e6)
PULSE_RANGE = (1e-6, 20e6)
HARM_RANGE = (1e-6, 20e6)
NOISE_BANDWIDTH = 100e6
USER_RANGE = (1e-6, 15e6)
DUALT_RANGE = (1e-6, 20e6)
PRBS_RANGE = (2e3, 40e6)
SEQ_RANGE = (2e3, 60e6)

150
pdm.lock Normal file
View File

@ -0,0 +1,150 @@
# This file is @generated by PDM.
# It is not intended for manual editing.
[metadata]
groups = ["default"]
strategy = ["cross_platform", "inherit_metadata"]
lock_version = "4.4.1"
content_hash = "sha256:d897fb1a81d6c743c286033805df50ba681b989395200b6d43a6f77f9dbb64ff"
[[package]]
name = "easy-scpi"
version = "0.1.4"
summary = "An easy library for controlling SCPI instruments"
groups = ["default"]
dependencies = [
"pyVISA",
]
files = [
{file = "easy-scpi-0.1.4.tar.gz", hash = "sha256:2864ad8a9e06e9aa1ad52462e3f4e08d4b9ab2d64c41617b11ab1591ef6bc32f"},
{file = "easy_scpi-0.1.4-py3-none-any.whl", hash = "sha256:c3204d1dd6d14089e76aa7f25c41ee46d72e7f6ed82cd05bddfdf9ed91a56aab"},
]
[[package]]
name = "ifaddr"
version = "0.2.0"
summary = "Cross-platform network interface and IP address enumeration library"
groups = ["default"]
files = [
{file = "ifaddr-0.2.0-py3-none-any.whl", hash = "sha256:085e0305cfe6f16ab12d72e2024030f5d52674afad6911bb1eee207177b8a748"},
{file = "ifaddr-0.2.0.tar.gz", hash = "sha256:cc0cbfcaabf765d44595825fb96a99bb12c79716b73b44330ea38ee2b0c4aed4"},
]
[[package]]
name = "pip"
version = "23.2.1"
requires_python = ">=3.7"
summary = "The PyPA recommended tool for installing Python packages."
groups = ["default"]
files = [
{file = "pip-23.2.1-py3-none-any.whl", hash = "sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be"},
{file = "pip-23.2.1.tar.gz", hash = "sha256:fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2"},
]
[[package]]
name = "psutil"
version = "5.9.7"
requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
summary = "Cross-platform lib for process and system monitoring in Python."
groups = ["default"]
files = [
{file = "psutil-5.9.7-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ea36cc62e69a13ec52b2f625c27527f6e4479bca2b340b7a452af55b34fcbe2e"},
{file = "psutil-5.9.7-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1132704b876e58d277168cd729d64750633d5ff0183acf5b3c986b8466cd0284"},
{file = "psutil-5.9.7-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe8b7f07948f1304497ce4f4684881250cd859b16d06a1dc4d7941eeb6233bfe"},
{file = "psutil-5.9.7-cp37-abi3-win32.whl", hash = "sha256:c727ca5a9b2dd5193b8644b9f0c883d54f1248310023b5ad3e92036c5e2ada68"},
{file = "psutil-5.9.7-cp37-abi3-win_amd64.whl", hash = "sha256:f37f87e4d73b79e6c5e749440c3113b81d1ee7d26f21c19c47371ddea834f414"},
{file = "psutil-5.9.7-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:032f4f2c909818c86cea4fe2cc407f1c0f0cde8e6c6d702b28b8ce0c0d143340"},
{file = "psutil-5.9.7.tar.gz", hash = "sha256:3f02134e82cfb5d089fddf20bb2e03fd5cd52395321d1c8458a9e58500ff417c"},
]
[[package]]
name = "pyvisa"
version = "1.14.1"
requires_python = ">=3.8"
summary = "Python VISA bindings for GPIB, RS232, TCPIP and USB instruments"
groups = ["default"]
dependencies = [
"typing-extensions",
]
files = [
{file = "PyVISA-1.14.1-py3-none-any.whl", hash = "sha256:6e4dfc9b6029b4f00d0d4960348c4889c2747aa7f83276950d48a349eab36a45"},
{file = "PyVISA-1.14.1.tar.gz", hash = "sha256:71030041ed4c5dad77687454cf44b8be4d1642e9d1aaa22019248d41d8ed7a79"},
]
[[package]]
name = "pyvisa-py"
version = "0.7.1"
requires_python = ">=3.8"
summary = "Pure Python implementation of a VISA library."
groups = ["default"]
dependencies = [
"pyvisa>=1.13.0",
"typing-extensions",
]
files = [
{file = "PyVISA-py-0.7.1.tar.gz", hash = "sha256:d0dd824055fd8cab8a2685d10e1277d52ad19604322fa53c17b47e70258d4594"},
{file = "PyVISA_py-0.7.1-py3-none-any.whl", hash = "sha256:3675aa9fcabfcee6fbcc1e596f565c2538ecd0f69e7061f479d147b4afbd8c75"},
]
[[package]]
name = "setuptools"
version = "65.5.0"
requires_python = ">=3.7"
summary = "Easily download, build, install, upgrade, and uninstall Python packages"
groups = ["default"]
files = [
{file = "setuptools-65.5.0-py3-none-any.whl", hash = "sha256:f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356"},
{file = "setuptools-65.5.0.tar.gz", hash = "sha256:512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17"},
]
[[package]]
name = "typing-extensions"
version = "4.9.0"
requires_python = ">=3.8"
summary = "Backported and Experimental Type Hints for Python 3.8+"
groups = ["default"]
files = [
{file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"},
{file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"},
]
[[package]]
name = "zeroconf"
version = "0.131.0"
requires_python = ">=3.7,<4.0"
summary = "A pure python implementation of multicast DNS service discovery"
groups = ["default"]
dependencies = [
"ifaddr>=0.1.7",
]
files = [
{file = "zeroconf-0.131.0-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:6a041468c428622798193f0006831237aa749ee23e26b5b79e457618484457ef"},
{file = "zeroconf-0.131.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a7f3b9a580af6bf74a7c435b80925dfeb065c987dffaf4d957d578366a80b2c"},
{file = "zeroconf-0.131.0-cp311-cp311-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:cc7a76103b03f47d2aa02206f74cc8b2120f4bac02936ccee5d6f29290f5bde5"},
{file = "zeroconf-0.131.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d777b177cb472f7996b9d696b81337bfb846dbe454b8a34a8e33704d3a435b0"},
{file = "zeroconf-0.131.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b843d5e2d2e576efeab59e382907bca1302f20eb33ee1a0a485e90d017b1088a"},
{file = "zeroconf-0.131.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:08eb87b0500ddc7c148fe3db3913e9d07d5495d756d7d75683f2dee8d7a09dc5"},
{file = "zeroconf-0.131.0-cp311-cp311-win32.whl", hash = "sha256:3b167b9e47f3fec8cc28a8f73a9e47c563ceb6681c16dcbe2c7d41e084cee755"},
{file = "zeroconf-0.131.0-cp311-cp311-win_amd64.whl", hash = "sha256:f74149a22a6a27e4c039f6477188dcbcb910acd60529dab5c114ff6265d40ba7"},
{file = "zeroconf-0.131.0-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:4865ef65b7eb7eee1a38c05bf7e91dd8182ef2afb1add65440f99e8dd43836d2"},
{file = "zeroconf-0.131.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38bfd08c9191716d65e6ac52741442ee918bfe2db43993aa4d3b365966c0ab48"},
{file = "zeroconf-0.131.0-cp312-cp312-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:2389e3a61e99bf74796da7ebc3001b90ecd4e6286f392892b1211748e5b19853"},
{file = "zeroconf-0.131.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:194cf1465a756c3090e23ef2a5bd3341caa8d36eef486054daa8e532a4e24ac8"},
{file = "zeroconf-0.131.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:2907784c8c88795bf1b74cc9b6a4051e37a519ae2caaa7307787d466bc57884c"},
{file = "zeroconf-0.131.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ce67d8dab4d88bcd1e5975d08235590fc5b9f31b2e2b7993ee1680810e67e56d"},
{file = "zeroconf-0.131.0-cp312-cp312-win32.whl", hash = "sha256:9dfa3d8827efffebec61b108162eeb76b0fe170a8379f9838be441f61b4557fd"},
{file = "zeroconf-0.131.0-cp312-cp312-win_amd64.whl", hash = "sha256:8642d374481d8cc7be9e364b82bcd11bda4a095c24c5f9f5754017a118496b77"},
{file = "zeroconf-0.131.0-pp310-pypy310_pp73-macosx_11_0_x86_64.whl", hash = "sha256:d4baa0450b9b0f1bd8acc25c2970d4e49e54726cbc437b81ffb65e5ffb6bd321"},
{file = "zeroconf-0.131.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:3768ab13a8d7f0df85e40e766edd9e2aef28710a350dc4b15e1f2c5dd1326f00"},
{file = "zeroconf-0.131.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c10158396d6875f790bfb5600391d44edcbf52ac4d148e19baab3e8bb7825f76"},
{file = "zeroconf-0.131.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:28d906fc0779badb2183f5b20dbcc7e508cce53a13e63ba4d9477381c9f77463"},
{file = "zeroconf-0.131.0-pp38-pypy38_pp73-macosx_11_0_x86_64.whl", hash = "sha256:7c4235f45defd43bb2402ff8d3c7ff5d740e671bfd926852541c282ebef992bc"},
{file = "zeroconf-0.131.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:d08170123f5c04480bd7a82122b46c5afdb91553a9cef7d686d3fb9c369a9204"},
{file = "zeroconf-0.131.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a57e0c4a94276ec690d2ecf1edeea158aaa3a7f38721af6fa572776dda6c8ad"},
{file = "zeroconf-0.131.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:0251034ed1d57eeb4e08782b22cc51e2455da7552b592bfad69a5761e69241c7"},
{file = "zeroconf-0.131.0-pp39-pypy39_pp73-macosx_11_0_x86_64.whl", hash = "sha256:34c3379d899361cd9d6b573ea9ac1eba53e2306eb28f94353b58c4703f0e74ae"},
{file = "zeroconf-0.131.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:d5d92987c3669edbfa9f911a8ef1c46cfd2c3e51971fc80c215f99212b81d4b1"},
{file = "zeroconf-0.131.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a613827f97ca49e2b4b6d6eb7e61a0485afe23447978a60f42b981a45c2b25fd"},
{file = "zeroconf-0.131.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:24b0a46c5f697cd6a0b27678ea65a3222b95f1804be6b38c6f5f1a7ce8b5cded"},
{file = "zeroconf-0.131.0.tar.gz", hash = "sha256:90c431e99192a044a5e0217afd7ca0ca9824af93190332e6f7baf4da5375f331"},
]

View File

@ -9,16 +9,19 @@ description = "A library for usage with SCPI compliant function generators (for
requires-python = ">=3.11"
version = "0.0.1"
dependencies = [
"easy-scpi==0.1.4",
"ifaddr==0.2.0",
"pip==23.2.1",
"psutil==5.9.7",
"PyVISA==1.14.1",
"PyVISA-py==0.7.1",
"setuptools==65.5.0",
"typing_extensions==4.9.0",
"zeroconf==0.131.0"
"easy-scpi==0.1.4",
"ifaddr==0.2.0",
"pip==23.2.1",
"psutil==5.9.7",
"PyVISA==1.14.1",
"PyVISA-py==0.7.1",
"setuptools==65.5.0",
"typing_extensions==4.9.0",
"zeroconf==0.131.0",
]
[tool.setuptools]
packages = ["fn_gen"]
[tool.pdm]
sdist = true
[tool.pdm.scripts]
edit = {shell = "$VISUAL src/"}

View File

@ -5,7 +5,19 @@ import pyvisa
from .errors import *
from .enums import *
from .common import *
from .constants.dg2052 import *
SIN_RANGE = (1e-6, 50e6)
SQU_RANGE = (1e-6, 15e6)
RAMP_RANGE = (1e-6, 1.5e6)
PULSE_RANGE = (1e-6, 20e6)
HARM_RANGE = (1e-6, 20e6)
NOISE_BANDWIDTH = 100e6
USER_RANGE = (1e-6, 15e6)
DUALT_RANGE = (1e-6, 20e6)
PRBS_RANGE = (2e3, 40e6)
SEQ_RANGE = (2e3, 60e6)
ON = True
OFF = False
class DG2052( pyvisa.resources.MessageBasedResource ):
comm: CommMethod