Skip to content

Fix CI failure for io.exciting.inputs owing to scipy constant update #4244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

DanielYang59
Copy link
Contributor

@DanielYang59 DanielYang59 commented Jan 4, 2025

Summary

@DanielYang59 DanielYang59 force-pushed the fix-io-exciting-ci-scipy branch from d5d268c to 18a31e2 Compare January 4, 2025 05:50
test_scale = float(re.search(r'scale="([-+]?\d*\.\d+|\d+)"', test_list.pop(7))[1])

assert ref_list == test_list
assert math.isclose(ref_scale, test_scale)
Copy link
Contributor Author

@DanielYang59 DanielYang59 Jan 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit hacky but I didn't find any better way to compare XML files which may content numerical (mostly float) value, if anyone knows a better solution, feel free to comment :)

<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xml.exciting-code.org/excitinginput.xsd">
<title>Si2</title>
<structure speciespath="./">
<crystal scale="1.8897543760313331">
<basevect> 3.84000000 0.00000000 0.00000000</basevect>
<basevect> 1.92000000 2.71529004 -1.92000000</basevect>
<basevect> 0.00000000 0.00000000 3.84000000</basevect>
</crystal>
<species speciesfile="Si.xml">
<atom coord=" 0.00000000 0.00000000 0.00000000" />
<atom coord=" 0.75000000 0.50000000 0.75000000" />
</species>
</structure>
<grst do="fromscratch" ngridk="8 8 8" xctype="GGA_PBE_SOL" gmaxvr="14.0" />
<xs xstype="BSE" ngridk="4 4 4" ngridq="4 4 4" nempty="30" gqmax="3.0" broad="0.07" tevout="true">
<energywindow intv="0.0 1.0" points="1200" />
<screening screentype="full" nempty="100" />
<BSE bsetype="singlet" nstlbse="1 5 1 4" />
</xs>
</input>

Adding a new dependency xmldiff would apparently be super overkilling (also not sure if it checks exactly match only), meanwhile writing a helper function may not be of general interest for now AFAIK?

@DanielYang59 DanielYang59 marked this pull request as ready for review January 4, 2025 08:57
@shyuep shyuep merged commit 9b4623d into materialsproject:master Jan 7, 2025
43 checks passed
@DanielYang59 DanielYang59 deleted the fix-io-exciting-ci-scipy branch January 8, 2025 02:02
@DanielYang59 DanielYang59 mentioned this pull request Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants