diff --git a/basicrta/gibbs.py b/basicrta/gibbs.py index d306160..6a807f7 100644 --- a/basicrta/gibbs.py +++ b/basicrta/gibbs.py @@ -112,7 +112,7 @@ class Gibbs(object): EXAMPLE ------- >>> from basicrta.gibbs import Gibbs - >>> from basicrta.tests.data import times + >>> from basicrta.tests.datafiles import times >>> g = Gibbs(times=times, residue='W313', cutoff=7.0) >>> g.run() >>> g.process_gibbs() diff --git a/basicrta/tests/data/times.npy b/basicrta/tests/data/times.npy new file mode 100644 index 0000000..390fda8 Binary files /dev/null and b/basicrta/tests/data/times.npy differ diff --git a/basicrta/tests/datafiles.py b/basicrta/tests/datafiles.py new file mode 100644 index 0000000..4f80dfa --- /dev/null +++ b/basicrta/tests/datafiles.py @@ -0,0 +1,33 @@ +# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- +# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 +# +# Basicrta +# Copyright (c) 2024 Ricky Sexton +# +# Released under the GNU Public Licence, v3 or any higher version +# +# Please cite your use of basicrta in published work: +# + +""" +Location of data files for the basicrta unit tests +==================================================== + + from basicrta.tests.datafiles import * + +""" + +__all__ = [ + "times" # set of residence times collected from W313 of b2ar +] + +from importlib import resources +import numpy as np +import basicrta.tests.data + +_data_ref = resources.files('basicrta.tests.data') + +times = np.load((_data_ref / 'times.npy').as_posix()) +# This should be the last line: clean up namespace +del resources +