1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
Metin Kaya
a1718c3700 tests/test_target: Read target connection settings from a YAML file
This will be useful in automating CI tests without modifying the source
code.

Replace unittest with pytest in order to make parameter passing to test
functions easier.

Move target configuration reading and generating target object outside
of the test function. Because we will run the test function for new
targets and may want to add new test functions.

While we are here, also fix pylint issues.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-02-23 12:48:44 -08:00
Metin Kaya
b5715b6560 utils/misc: Move load_struct_from_yaml() from WA to devlib
This is copied from WA (workload-automation/wa/utils/misc.py).
Hence, published another PR [1] removes the implementation from WA.

OTOH, this patch uses ``ruamel`` instead of ``yaml`` because of the
latter's design issues.

And also this patch fixes pylint issues in ``load_struct_from_yaml()``.

[1] https://github.com/ARM-software/workload-automation/pull/1248

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-02-23 12:48:44 -08:00
Douglas Raillard
52485fbaa5 setup.py: Re-add "future" PyPI package
Re-add the "future" PyPI package since it actually contains the "past"
Python package that devlib still uses.
2024-01-09 12:07:57 -08:00
Douglas Raillard
ea4eccf95d setup.py: Remove use of "imp" module
Python 3.12 removed the "imp" module, so replace its use in devlib.
2024-01-09 12:07:57 -08:00
Douglas Raillard
93ada9762d devlib: Remove "future"
Remove the "future" dependency as devlib does not support Python 2
anymore.

Also remove the "from __future__ import division" as this is the default
in Python 3.
2023-01-19 11:38:11 +00:00
Douglas Raillard
bdf8b88ac7 utils/async: Add new utils.async module
Home for async-related utilities.
2022-07-28 14:40:15 +01:00
Douglas Raillard
1da174a438 setup.py: Require Python >= 3.7
Require Python >= 3.7 in order to have access to a fully fledged asyncio
module.
2022-07-28 14:40:15 +01:00
Douglas Raillard
3c9804a45b setup.py: cleanup dependencies in setup.py
Remove dependencies that are ruled out due to the current Python minimal
version requirement.
2022-07-28 14:40:15 +01:00
Marc Bonnici
4941a7183a setup.py: Update project description 2021-04-19 10:58:59 +01:00
Marc Bonnici
3ab9d23a4a setup.py: Add long description to package
Use the readme as the long description, this will be
displayed on the PyPi page.
2021-04-19 10:58:59 +01:00
Marc Bonnici
e3da419e5b utils/android: Switch to using the lxml module
Using dexdump from versions 30.0.1-30.0.3 of Android build tools
does not produce valid XML caused by certain APKs
Use the lxml module for parsing xml as it is more robust and
better equipped to handle errors in input.
2021-01-08 17:22:12 +00:00
Jonathan Paynter
ebf1c1a2e1 utils/ssh: Add paramiko based scp transfers
Using scp over paramiko allows scp transfers to be treated similarly to
sftp transfers, instead of requiring subprocesses, and provides
the ability to monitor an scp transfer using a callback as can be done
using sftp.
2020-11-03 10:01:43 +00:00
Douglas RAILLARD
62e24c5764 connections: Unify BackgroundCommand API and use paramiko for SSH
* Unify the behavior of background commands in connections.BackgroundCommand().
  This implements a subset of subprocess.Popen class, with a unified behavior
  across all connection types

* Implement the SSH connection using paramiko rather than pxssh.
2020-03-06 17:33:04 +00:00
Javi Merino
4df2b9a4c4 daq: move to daqpower 2.0
daqpower 2.0 has a new interface and it is more stable.
2019-11-26 16:29:04 +00:00
Douglas RAILLARD
ded30eef00 misc: Add batch_contextmanager
Convenience wrapper around standard contextlib.ExitStack class.
2019-07-30 18:05:21 +01:00
Marc Bonnici
0c434e8a1b setup.py: Remove Python2 as a supported version 2019-07-19 17:07:41 +01:00
Marc Bonnici
2e8d42db79 setup.py Update classifiers 2019-07-19 16:37:04 +01:00
Marc Bonnici
f619f1dd07 setup.py: Set maximum package version for python2.7 support
In the latest versions of panadas and numpy python2.7 support has been
dropped therefore restrict the maximum version of these packages.
2019-07-08 13:46:19 +01:00
Marc Bonnici
c0d8a98d90 setup.py: Use version_helper to generate devlib version
Instead of parsing the text of the file to extract the current version
use the version_helper to access the newly added version tuple.
2019-02-27 10:55:20 +00:00
Valentin Schneider
60c2e7721e setup.py: Add enum34 dependency for Python < 3.4 2018-11-21 10:54:46 +00:00
Pierre-Clement Tosi
63d2fb53fc Instrument/BaylibreAcme: Add IIO-based ACME instr.
Add BaylibreAcmeInstrument, a new instrument providing support for the
Baylibre ACME board as a wrapper for the IIO interface. This class
provides better access to the ACME hardware (e.g. the ability to control
the sampling frequency) and to the retrieved samples than what the other
instrument, AcmeCapeInstrument, provides. Furthermore, it removes an
unnecessary and limiting dependency by interfacing directly with the IIO
drivers instead of relying on an intermediate script ("iio-capture") potentially
introducing unexpected bugs. Finally, it allows handling multiple probes
(the ACME can have up to 8) through an easy-to-use single instance of this
class instead of having to have an instance of AcmeCapeInstrument per channel
potentially (untested) leading to race conditions between the underlying
scripts for accessing the hardware.

This commit does not overwrite AcmeCapeInstrument as
BaylibreAcmeInstrument does not provide interface compatibility with
that class. Anyhow, we believe that anything that can be achieved with
AcmeCapeInstrument can be done with BaylibreAcmeInstrument (the
reciprocal is not true) so that BaylibreAcmeInstrument might eventually
replace AcmeCapeInstrument.

Add BaylibreAcmeInstrument documentation detailing the class interface
and the ACME instrument itself and discussing the way it works and its
potential limitations.
2018-08-22 16:00:25 +01:00
Sergei Trofimov
56f3b1c317 setup.py: add -s flag to sdist
Add -s flag to sdist command, which, when used, strips away the git
commit hash from the package version. This is needed for upload to PyPI.
2018-07-06 17:15:10 +01:00
Marc Bonnici
fec0868734 setup.py: Change format of version to conform with PEP440
When installing from source devlib attempts to include the commit ID in the
version of the installed pacakge however this caused issues with package
managers like pip. PEP440 specifies that local identifiers must be in the
form `<public version identifier>[+<localversion label>]` so update the
version to conform.

https://www.python.org/dev/peps/pep-0440/#local-version-identifiers
2018-06-27 11:41:28 +01:00
Sergei Trofimov
cc04e1a839 Implement PEP396
Implement PEP396 which specifies that a package should advertise its
version via __version__ attribute.

As devlib is often used as a development version directly from source,
also add a __full_version__ attribute which appends the current commit
ID to the version.

Use the __full_version__ inside setup.py
2018-06-15 08:58:35 +01:00
Sergei Trofimov
5cafd2ec4d Add support for Python 3
Add support for running on Python 3 while maintaining Python 2
compatibility.
2018-06-07 14:45:43 +01:00
Sergei Trofimov
56e9147e58 setup.py: update URL
Update the url entry in the package metadata to be a valid URL. This is
now required for upload to PyPI.
2018-03-22 11:10:43 +00:00
Sergei Trofimov
1f7421bc39 setup.py: Add monsoon's dependencies to extras_require 2017-05-22 13:54:49 +01:00
setrofim
bb7591e8fa Version bump. 2017-05-04 17:39:53 +01:00
Michele Di Giorgio
539e9b34b9 devlib/utils/misc: improve memoize decorator
Using the wrapt module we can improve the memoize decorator. In fact, it allows
to preserve the attributes of the memoized function, such as signature,
docstring, path to the file where the function is implemented, and so on.

Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
2016-06-23 09:51:47 +01:00
Sergei Trofimov
40274101ad Version bump. 2015-11-19 09:41:24 +00:00
Sergei Trofimov
4e6afe960b devlib initial commit. 2015-10-09 09:30:04 +01:00