Skip to content
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

Add hardcoded reference image test once API is stable (i.e. in conjunction with results manuscript, v1.0.0) #162

Open
sgbaird opened this issue Jul 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sgbaird
Copy link
Member

sgbaird commented Jul 8, 2022

Something along the lines of the following (unfinished):

def test_png2xtal_from_loaded_images():
    # TODO: implement this once API is stable (i.e. 1.0.0+)
    imgs = []
    with Image.open("tests/V4Ni2Se8,volume=243,uid=8b92.png") as img:
        datum = list(img.getdata())
        imgs.append(img)
    with Image.open("tests/Zn8B8Pb4O24,volume=623,uid=b62a.png") as img:
        datum2 = list(img.getdata())
        imgs.append(img)

    data = [datum, datum2]

    xc = XtalConverter()
    decoded_structures = xc.png2xtal(imgs)
    assert_structures_approximate_match(
        example_structures, decoded_structures, tol_multiplier=2.0
    )
    return decoded_structures

See #146 (comment)

@sgbaird sgbaird added the enhancement New feature or request label Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant