Skip to content

Commit

Permalink
fixed missing data in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rsexton2 committed Nov 29, 2024
1 parent 90c63d8 commit a5a4f06
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion basicrta/gibbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Binary file added basicrta/tests/data/times.npy
Binary file not shown.
33 changes: 33 additions & 0 deletions basicrta/tests/datafiles.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a5a4f06

Please sign in to comment.