Skip to content

Commit

Permalink
Merge pull request #225 from SiLab-Bonn/fix_deprecation
Browse files Browse the repository at this point in the history
Fix deprecation errors/warnings
  • Loading branch information
YannickDieter authored May 23, 2024
2 parents 4bde44a + 216279a commit d910da9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
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

0 comments on commit d910da9

Please sign in to comment.