-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance fixes #6
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 338 343 +5
=========================================
+ Hits 338 343 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We define a small fixture in test_utils
, maybe we want to move that out to the fixtures/data.py
file?
def __attrs_post_init__(self): | ||
"""Maintain point mappings between node and points after initialization.""" | ||
super().__setattr__("points", self._convert_points(None, self.points)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could possibly use converters, but may be problematic since we use an instance method self._convert_points
to do the conversion
Attributes can have a converter function specified, which will be called with the attribute’s passed-in value to get a new value to use.
@pytest.fixture | ||
def hdf5_file(tmp_path): | ||
"""Define hdf5 fixture.""" | ||
path = str(tmp_path / "test.h5") | ||
with h5py.File(path, "w") as f: | ||
f.create_dataset("ds1", data=np.array([0, 1, 2])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we want all of our fixtures in the fixtures directory?
No description provided.