[ase-users] Major updates to testing: pytest, dockers

Ask Hjorth Larsen asklarsen at gmail.com
Fri Jan 17 02:55:27 CET 2020


Am Fr., 17. Jan. 2020 um 02:51 Uhr schrieb Jakob Schiøtz <schiotz at fysik.dtu.dk>:
>
>
>
>
> > On 17 Jan 2020, at 06.21, Ask Hjorth Larsen via ase-users <ase-users at listserv.fysik.dtu.dk> wrote:
> >
> > Dear all,
> >
> > We are porting the ASE test suite to pytest.  Running the tests will
> > now require pytest >= 3.3.2 and optionally pytest-xdist >= 1.22.1.
> > They can be installed via pip.
> >
>
> Dear Niflheim users,
>
> We will build a module for pytest on Niflheim real soon now, so you do not have to pip-install stuff (which will cause trouble if you switch between different Python modules). Soon you will be able to do
>
> module load pytest/foss-2018b-Python-3.6.6
> or
> module load pytest/intel-2018b-Python-3.6.6
>
> (if you use the recommended 2018b toolchains)
>
>
> Ask: Is the optional pytest-xdist important?  Installing it on Niflheim requires making an extra package, which is not hard but needs to be done.

It's for running the tests in parallel.  To me (or other developers)
it's important because you want a short feedback loop.  To normal
users... mostly no.

Best regards
Ask

>
> Best regards
>
> Jakob
>
>
> > pytest provides some really nice and handy features like fixtures and
> > test parametrization, making it much easier to write properly
> > structured tests - which is exactly what we need right now.  So:
> >
> > * Use something like pip install --user pytest pytest-xdist
> > * The 'ase test' tool will behave roughly as before, but output looks different
> > * ase test --pytest <remaining args...>' can now be used to forward
> > options directly to pytest
> > * pytest can also run on its own, independently of (some of) the test
> > suite code
> >
> > The other big change is that the test pipelines now use custom docker
> > images.  In particular we want docker images with calculators
> > installed in order to run the calculator tests under controlled
> > environments.  This will be a major step towards normalizing the
> > behaviour and configuration of calculators.  The final step towards
> > achieving this goal is to write better tests.
> >
> > Please report if there is any trouble.  There isn't supposed to be any
> > trouble, but we all know how that works.
> >
> > Best regards
> > Ask
> > _______________________________________________
> > ase-users mailing list
> > ase-users at listserv.fysik.dtu.dk
> > https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>



More information about the ase-users mailing list