Closed SimonEnsemble closed 6 years ago
Oh sorry, I got a bit ahead of myself. Tests don't run. grid_test.jl
has to be updated first
what in particular? what is your error msg? runs for me and Travis CI
Grid Tests: Error During Test at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:14
Test threw exception
Expression: required_n_pts(box, 0.1) == (11, 101, 51)
UndefVarError: required_n_pts not defined
Stacktrace:
[1] macro expansion at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:14 [inlined]
[2] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
[3] top-level scope at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:13
See /home/sturlusa/my_projects/PorousMaterials.jl/test/data/grids/test_grid.cube
Grid Tests: Error During Test at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:25
Test threw exception
Expression: PorousMaterials._arg_nearest_neighbor(n_pts, [0.001, 0.001, 0.001]) == [1, 1, 1]
UndefVarError: _arg_nearest_neighbor not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
[2] macro expansion at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:25 [inlined]
[3] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
[4] top-level scope at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:13
Grid Tests: Error During Test at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:26
Test threw exception
Expression: PorousMaterials._arg_nearest_neighbor(n_pts, [0.999, 0.999, 0.999]) == [10, 20, 30]
UndefVarError: _arg_nearest_neighbor not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
[2] macro expansion at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:26 [inlined]
[3] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
[4] top-level scope at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:13
Grid Tests: Error During Test at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:11
Got exception outside of a @test
UndefVarError: _apply_pbc_to_index! not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
[2] macro expansion at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:28 [inlined]
[3] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
[4] top-level scope at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:13
[5] include at ./boot.jl:317 [inlined]
[6] include_relative(::Module, ::String) at ./loading.jl:1038
[7] include(::Module, ::String) at ./sysimg.jl:29
[8] include(::String) at ./client.jl:388
[9] top-level scope at none:0
[10] include at ./boot.jl:317 [inlined]
[11] include_relative(::Module, ::String) at ./loading.jl:1038
[12] include(::Module, ::String) at ./sysimg.jl:29
[13] exec_options(::Base.JLOptions) at ./client.jl:229
[14] _start() at ./client.jl:421
Test Summary: | Pass Error Total
Grid Tests | 1 4 5
ERROR: LoadError: LoadError: Some tests did not pass: 1 passed, 0 failed, 4 errored, 0 broken.
in expression starting at /home/sturlusa/my_projects/PorousMaterials.jl/test/grid_test.jl:11
in expression starting at /home/sturlusa/my_projects/PorousMaterials.jl/test/runtests.jl:16
Yeah sorry, here's the output. It seems the functions aren't being exported?
i think you might be pulling src from a different folder?
they are defined here:
https://github.com/SimonEnsemble/PorousMaterials.jl/blob/flood_fill_fix/src/PorousMaterials.jl
and travis CI tests run. Can you confirm .julia/dev
is empty and your LOAD_PATH
isn't finding a different src?
Yeah it's a problem on my end. Tests run fine :+1:
The algo to identify segments in the master branch now fails in this simple case in Fig. 1. The reason is that I need to keep track of the which face of the unit cell (e.g.
(1, 0, 0)
) is traversed when one segment is connected to another. In identifying a simple cycle, I then need to walk through that cycle and keep track of which unit cell I'm in. If I arrived back in the home unit cell, that's not accessible. If I arrive in a different unit cell, all segments in that cycle are declared as an accessible channel. Also, if there are any segments connected to this group of segments involved in the cycle, those obviously must be accessible too. So I look for those too.Tests on LTA and SOD look good.
LightGraphs.jl
doesn't support edges having properties and being considered as unique acc. to their properties. So I instead made an artificial vertex that includes info about the direction traversed.So
2 --> 1
with direction(1, 0, 0)
, I would introduce a new artificial vertex3
indicating the direction. and make it into2 --> 3 --> 1
. So when I walk through the cycles, by passing through these artificial vertices, you know what unit cell boundaries you are traversing.inspired by here