Skip to content

Commit a5a4f06

Browse files
committed
fixed missing data in tests
1 parent 90c63d8 commit a5a4f06

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

basicrta/gibbs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Gibbs(object):
112112
EXAMPLE
113113
-------
114114
>>> from basicrta.gibbs import Gibbs
115-
>>> from basicrta.tests.data import times
115+
>>> from basicrta.tests.datafiles import times
116116
>>> g = Gibbs(times=times, residue='W313', cutoff=7.0)
117117
>>> g.run()
118118
>>> g.process_gibbs()

basicrta/tests/data/times.npy

3.41 MB
Binary file not shown.

basicrta/tests/datafiles.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
2+
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
3+
#
4+
# Basicrta
5+
# Copyright (c) 2024 Ricky Sexton
6+
#
7+
# Released under the GNU Public Licence, v3 or any higher version
8+
#
9+
# Please cite your use of basicrta in published work:
10+
#
11+
12+
"""
13+
Location of data files for the basicrta unit tests
14+
====================================================
15+
16+
from basicrta.tests.datafiles import *
17+
18+
"""
19+
20+
__all__ = [
21+
"times" # set of residence times collected from W313 of b2ar
22+
]
23+
24+
from importlib import resources
25+
import numpy as np
26+
import basicrta.tests.data
27+
28+
_data_ref = resources.files('basicrta.tests.data')
29+
30+
times = np.load((_data_ref / 'times.npy').as_posix())
31+
# This should be the last line: clean up namespace
32+
del resources
33+

0 commit comments

Comments
 (0)