Giter Site home page Giter Site logo

Comments (4)

giovannipizzi avatar giovannipizzi commented on September 3, 2024

91 is ok to add.
-13, I don't know... As this was inconsistent, I would catch this case and raise an explicit exception explaining why we don't support it?
Maybe we can then add a custom optional parameter that, if specified, can tell the function "I am aware of this, and I want to the old/new version of the definition". We need to see how to made this extensible in the future if the same happens to other ibrav numbers, and how this needs to be propagates so it's easily accessible to users when using the parser class (maybe a class property defined in the init, and then forwarded to this function?)

Also, in this case, the explicit exception message could say which flag to use to enable parsing.

from qe-tools.

greschd avatar greschd commented on September 3, 2024

Throwing an exception for -13 with an explanation is certainly a good start.

Maybe a good way to handle this consistently throughout would be to define a "QE version" object that can be passed into the parsers and free functions? If we encounter some logic that depends on the version, it needs to be specified otherwise an exception will be raised.

One potential issue: what happens to code that used to be independent of the QE version, but then a new QE version changes it. The above logic would turn previously-running code into an exception. So maybe it would be better to then fall back to the oldest version, with a UserWarning / DeprecationWarning.

from qe-tools.

giovannipizzi avatar giovannipizzi commented on September 3, 2024

I would err on the safe side, and in those cases we release a new version of qe-tools that raises. In the long term it will be strange to use the oldest version, and it will be hard to decide when to jump.

from qe-tools.

greschd avatar greschd commented on September 3, 2024

Makes sense 👍

from qe-tools.

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.