Coder Social home page Coder Social logo

cli-tools's Introduction

IoT-LAB Main Repository

This repository contains common IoT-LAB resources, such as experiments management tools, deployment tools, dev. env. setup.

Overall documentation is available at https://github.com/iot-lab/iot-lab/wiki

To perform the initial setup of your development environment, run make.

cli-tools's People

Contributors

aabadie avatar audeoudh avatar cladmi avatar fsaintma avatar hugovk avatar miri64 avatar rienafairefr avatar timschubert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli-tools's Issues

Python3 incompatibility

The script is not compatible with python3.
The readme does not say that python2 is required.

testing: changes in tox

Responsible for the drop in coverage, but for more recent versions of tox

TOXENV="py27-tests,coverage_upload,py27-tools,coverage_upload,py27-lint,cli" (note the duplicate coverage_upload) will not result in two runs of the coverage_upload.

Bisecting, with tox version 3.5.2 I have the good behavior (duplicated test steps), and in version 3.14.0 the duplicated steps are not run.

More user-friendly `node-cli` when working with multiple archis

When working with a multi-archi experiment, you can't use node-cli without specifying a nodes list to work on (or to exclude).

When running --reset command, with an experiment with M3 and A8 nodes you get the following output:

HTTP error: 400
You couldn't launch reset command with A8 archi nodes.

When running --update firmware.elf command with m3 and wsn430 nodes:

HTTP error: 400
WSN430 nodes must be associated with an HEX firmware file format.

So either the server could choose for the user and run only the command on the compatible node, or an option could be added to restrict the command to only one archi.

to fix before 2.6.0 release

IMO, 2.6.0 might not be ready for release:

  • warnings: when iotlab ssh can be run (if ssh-cli-tools is installed), then we get this mouthful on top of every invocation
/home/matthieu/.virtualenvs/cli-tools/local/lib/python2.7/site-packages/pssh/clients/miko/parallel.py:48: UserWarning: This client will be replaced as the default client by the better performing and non-monkey patching pssh.clients.native.ParallelSSHClient from 2.0.0 onwards.
Please ensure required functionality is supported by the new client by switching to 'from pssh.clients import ParallelSSHClient'. The pssh2_client import for the new client will continue to be supported for backwards compatibility. 

To continue using this client please update imports to 'from pssh.clients.miko import ParallelSSHClient'.
  warn(_msg)
  • iotlab subcommand does not show the correct program in usage:
(cli-tools) matthieu@zurkus:~/iot-lab-dev/parts/cli-tools (doc)$ iotlab node
usage: iotlab [-h] [-u USERNAME] [-p PASSWORD] [-v] [--jmespath JMESPATH]
              [--format FORMAT] [-i EXPERIMENT_ID]
              (-sta | -sto | -r | --update-idle | --debug-start | --debug-stop | -up FIRMWARE_PATH | --profile PROFILE_NAME | --profile-load PROFILE_PATH | --profile-reset)
              [-e EXCLUDE_NODES_LIST | -l NODES_LIST]

iotlab should be iotlab node here

experiment-cli -a raises a TypeError

$ experiment-cli get -a -i 7959
Traceback (most recent call last):
  File "/home/harter/work/iot-lab/parts/cli-tools/experiment-cli", line 4, in <module>
    experiment_parser.main()
  File "/home/harter/work/iot-lab/parts/cli-tools/iotlabcli/experiment_parser.py", line 405, in main
    get_experiment(parser_options, request, parser)
  File "/home/harter/work/iot-lab/parts/cli-tools/iotlabcli/experiment_parser.py", line 311, in get_experiment
    data = request.get_experiment_archive(experiment_id)
  File "/home/harter/work/iot-lab/parts/cli-tools/iotlabcli/rest.py", line 190, in get_experiment_archive
    return self.method('experiments/%s?data' % expid)
  File "/home/harter/work/iot-lab/parts/cli-tools/iotlabcli/rest.py", line 57, in method
    return req.text
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 824, in text
    content = str(self.content, encoding, errors='replace')
TypeError: unicode() argument 2 must be string, not None

Should investigate on versions and all.

Better error message when job name is too long

When submitting jobs with very long names I received the following message: "HTTP Error 500: Experiment submit job error". Using a shorter job name allowed the jobs to be submitted.

It would be nice if the cli tools could detect this issue and output a better error message.

Switch to pytest

The tests are now performed using nose inside tox envs. The problem is that nose is not maintained anymore. Pytest also offers nice testing features and should be adopted instead.

The goal of this issue is to track the work required and discussion related to the switch to pytest.

Change CI infrastructure

I open this issue to discuss about the switch to Travis CI.
The CLI Tools are now using ci.inria.fr and Jenkins for their CI infrastructure. But I see several limitations:

  • It doesn't integrate nicely into github workflow
  • We have access to a limited list of Python versions (and partially out-dated, python 3.6 ?)

Looking at what was achieved in the ssh-cli-tools : using Travis and Codecov, keeping tox and use pytest. I think we could work on that.

Opinions ?

Python 2.6

I think the End of Life Python 2.6 has been officially dropped from support for py.test (pytest-dev/py#165) so travis builds are failing.

We could probably require a py test dependency pegged at a previous version (maybe pytest 3.2), but is that worth it I don't know

Add "dev-mode" configuration file ~/.iotlab.api-url

cli-tools currently have hard-coded API_URL, which makes it hard to switch between test and production servers using an installed cli-tool-set.

Add support for optional configuration file ~/.iotlab.api-url

iotlab-experiment: errors when binaries have same name but different paths

When running iotlab-experiment with two distinct binaries with the same name e.g. (using RIOT's tests/gnrc_udp for two different boards):

iotlab-experiment submit -d 30 \
    -l1,archi=samr21:at86rf233+site=saclay,bin/samr21-xpro/tests_gnrc_udp.elf \
    -l1,archi=arduino-zero:xbee+site=bin/arduino-zero/tests_gnrc_udp.elf

I get an error:

usage: iotlab-experiment [-h] [-u USERNAME] [-p PASSWORD] [-v]
                         [--jmespath JMESPATH] [--format FORMAT]
                         {submit,script,stop,get,load,reload,info,wait} ...
iotlab-experiment: error: Has different values for same key 'tests_gnrc_udp.elf'

Is there a way (except renaming the binary) to get around this somehow?

pytest-cov collection

Because of the setup.cfg (the --cov=iotlabcli part in addopts), when running pytest it will always try to collect every test in the iotlabcli/ hierarchy, even if we try to force it to run only a single test (e.g. by doing pytest iotlabcli/test/[...])
I could only force it to not collect everything by having an empty PYTEST_ADDOPTS environment variable.
We could try to put the --cov parameters in a specific tox environement (tests-coverage) instead of the setup.cfg ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.