Comments (4)
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.
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.
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.
Makes sense 👍
from qe-tools.
Related Issues (20)
- Exponentially-slow regex HOT 2
- Problem when encountering comments HOT 1
- dictionary problem with k_points
- Slight inconsistencies in physical constants HOT 9
- Wrong alat used if ibrav != 0 HOT 1
- Drop py2 support? HOT 10
- ibrav -13 is incorrect HOT 3
- Clearly define public vs. private interface HOT 8
- Structure of Qe/Pw/CpInputFile HOT 5
- Add (minimal) documentation build
- Check and update docstrings
- Add README as long_description in setup.py
- When set qetools as the parser for qeinputgenerator, the generated input file for pwscf always use this setting: calculation = 'scf'. HOT 5
- Update or pin pytest-cases
- Parsing PW input file HOT 4
- Empty line after ATOMIC_SPECIES makes the parser fail HOT 1
- Move CI from Travis to GHA
- Drop Python 3.5 compatibility, add Python 3.9 to test matrix
- Constructing cell from parameters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qe-tools.