GithubHelp home page GithubHelp logo

Comments (3)

ajjackson avatar ajjackson commented on August 21, 2024

This seems reasonable. Will it be easy to test?

from sumo.

oashour avatar oashour commented on August 21, 2024

I guess most of the unit tests would sit in whatever package I end up writing to handle the actual parsing of the Wannier90 calculations, it would be an identical situation to the proposed Quantum ESPRESSO support. I guess it would be tested the same way sumo would test plotting from any other code, but I don't think there are any plotting-specific unit tests in sumo right now.

(I actually have no idea how to write plotting-specific unit tests, Julia's Plots.jl has this idea of plotting recipes that I used when unit testing Julia plots, but I don't know if matplotlib has anything similar).

from sumo.

ajjackson avatar ajjackson commented on August 21, 2024

Plot testing is really hard! There is at least one package out there for matplotlib that tries to normalise the less predictable parameters (screen resolution etc), save images and then compare them.

For Sumo tests we don't render the plot but have a poke around the ax.lines etc. to see if the data looks correct.

As more code interfaces are added it doesn't make sense to test the actual plots; we should just check the data that makes it to a plotter.

from sumo.

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.