- A modern, elegant approach to working with EON
We provide a conda environment, which is only partially supported for reproducible usage, since it depends on local compilers.
micromamba create -f environment.yml
micromamba activate eongitThis leads to the most robust installation approach:
meson setup bbdir --prefix=$CONDA_PREFIX
meson install -C bbdirThe server is accessed through python -m eon.server.
Note that all older documentation calls to eon should now be python -m
eon.server. The eonclient binary is automatically made available in the
activated environment.
This is the preferred method.
cd client
# in conda, add --prefix=$CONDA_PREFIX
meson setup bbdir --buildtype=debug -Dbuild_tests=true
meson test -C bbdirWe find that, rather than build each executable by hand or even register each one by hand, we can leverage the array iteration features of the meson language.
if get_option('build_tests')
_args += ['-DEONTEST'] # Unused
_deps += [ gtest_dep ]
test_array = [#
['Improved Dimer', 'impldim_run', 'ImpDimerTest.cpp', '/gtests/data/saddle_search'],
]
foreach test : test_array
test(test.get(0),
executable(test.get(1),
sources : ['gtests/'+test.get(2)],
dependencies : [ eon_deps, gtest_dep, gmock_dep ],
link_with : eclib,
cpp_args : eon_extra_args
),
workdir : meson.source_root() + test.get(3)
)
endforeach
endifIncluded is the eonc.rb helper in tools/gprdimer/, which can be used with any of the gtests/data/systems and a suitable configuration file.
Do run pre-commit before actually submitting pull requests!
pipx run pre-commit run --all-filesFor best results, consider installing the git hook as well.
pipx run pre-commit installWe have both Catch2 unit tests, and also ApprovalTests. For adding new
approval tests, first build them with meson compile, run them to approve, and
then re-run to make sure things pass with meson test.