Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation errors/warnings #225

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions basil/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from pkg_resources import get_distribution, DistributionNotFound
from importlib.metadata import version, PackageNotFoundError
import collections
import yaml


__version__ = None # required for initial installation

try:
__version__ = get_distribution("basil_daq").version
except DistributionNotFound:
__version__ = version("basil_daq")
except PackageNotFoundError:
__version__ = "(local)"


Expand Down
6 changes: 3 additions & 3 deletions examples/mio_sram_test/tests/test_Sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_overflow(self):
self.chip['PULSE'].start()

ret = self.chip['FIFO'].get_data()
x = np.arange((128 + 1023) * 4, (128 + 1023 + 1) * 4, dtype=np.uint8)
x = np.arange((128 + 1023) * 4, (128 + 1023 + 1) * 4).astype(np.uint8)
x.dtype = np.uint32

np.testing.assert_array_equal(ret, x)
Expand Down Expand Up @@ -197,12 +197,12 @@ def test_continouse(self):
for _ in range(100):
ret = self.chip['FIFO'].get_data()

x = np.arange(i * 4, (i + ret.shape[0]) * 4, dtype=np.uint8)
x = np.arange(i * 4, (i + ret.shape[0]) * 4).astype(np.uint8)
x.dtype = np.uint32

i += ret.shape[0]

ok = np.alltrue(ret == x)
ok = np.all(ret == x)
# print 'OK?', ok, ret.shape[0], i, k
if not ok:
error = True
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def package_files(directory):
setup(
name='basil_daq',
version=version,
python_requires='>=3.7',
python_requires='>=3.8',
description='Basil - a data acquisition and system testing framework',
url='https://github.com/SiLab-Bonn/basil',
license='BSD 3-Clause ("BSD New" or "BSD Simplified") License',
Expand Down
Loading