Giter VIP home page Giter VIP logo

Comments (5)

hgrecco avatar hgrecco commented on August 19, 2024

By the way, the same policy will be applied to pyvisa-sim and the ni backend

from pyvisa-sim.

MatthieuDartiailh avatar MatthieuDartiailh commented on August 19, 2024

What bothers me is that if we do that we won't have a nice traceback to follow to determine the origin of the error. When debugging a pyvisa-sim .yaml it is invaluable ! I would be in favour of introducing a helper function in charge of adding some information to the error and then do a standard reraising.
As we only catch nicely behaved exception whose args[0] exists and is a string we should be able to do that easily. The best way would be to use raise ... from ... but this is sadly python 3 only.

from pyvisa-sim.

hgrecco avatar hgrecco commented on August 19, 2024

I think there are two types of errors. I was only referring for the ones supported by NI-VISA (like a timeout). I am fine with raising the others.

from pyvisa-sim.

famish99 avatar famish99 commented on August 19, 2024

Yeah I think there should be some work done at the parser layer to catch bugs to make debugging the yaml files easier. Also I have an intern working with me for the summer whose task is to improve our unittesting framework so I may be able to get some of these tasks completed.

On a separate note, we wish to have a framework where we can tie mocked equipment together (e.g. changing a mock power supply would show up on a mock multimeter) is this effort existing anywhere or should we create a pyvisa-system-sim side project for the task?

from pyvisa-sim.

hgrecco avatar hgrecco commented on August 19, 2024

I think that the way to facilitate debugging pyvisa-sim is failing fast, logging and decoupling the VISA status codes from the real errors.

Regarding your separate note, that is something in which we definitely interested. Before pyvisa-sim started I did something like this for Lantz (See here) Making something like this in a more robust and configurable way will be awesome. Open another issue to brainstorm ideas.

from pyvisa-sim.

Related Issues (20)

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.