`visualize_ascii` on unit test case is broken
(potentially related to https://github.com/JuliaMolSim/AtomsBase.jl/issues/83)
If I just copy/paste this code from test/interface.jl into the REPL:
box = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]u"m"
bcs = [Periodic(), Periodic(), DirichletZero()]
positions = [[0.25, 0.25, 0.25], [0.75, 0.75, 0.75]]u"m"
elements = [:C, :C]
atoms = [Atom(elements[i], positions[i]) for i in 1:2]
flexible = FlexibleSystem(atoms, box, bcs)
I get:
Error showing value of type FlexibleSystem{3, Atom{3, Quantity{Float64, ๐, Unitful.FreeUnits{(m,), ๐, nothing}}, Quantity{Float64, ๐ ๐โปยน, Unitful.FreeUnits{(aโ, sโปยน), ๐ ๐โปยน, nothing}}, Quantity{Float64, ๐, Unitful.FreeUnits{(u,), ๐, nothing}}}, Quantity{Int64, ๐, Unitful.FreeUnits{(m,), ๐, nothing}}}:
ERROR: ArgumentError: invalid Array dimensions
I haven't tried to track down exactly what is causing this, but it doesn't seem to affect any functionality (or cause any tests to fail, since tests only test show and not display, which is what is called in the REPL if you just put the variable name), I'm wondering if we should just dispatch display to show by default. Is there any foreseeable issue with that approach?
I'm wondering if we should just dispatch display to show by default. Is there any foreseeable issue with that approach?
Don't know the details, but I recall that the two functions are not doing the same thing. Also I believe this is just a bug in visualize_ascii, where the canvas to plot is chosen too large or with negative dimensions. That would be my guess.
I thought I ran into this during debugging as well. But now the tests seem to be running fine again.