Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 25, 2024
1 parent b0b1e85 commit 18ec8d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/pymovements/reading_measures/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ def process_dataset(self, dataset, aoi_dict, save_path) -> int:

return 0

Check warning on line 93 in src/pymovements/reading_measures/frame.py

View check run for this annotation

Codecov / codecov/patch

src/pymovements/reading_measures/frame.py#L93

Added line #L93 was not covered by tests

def compute_reading_measures(self, fixations_df: pd.DataFrame,
aoi_df: pd.DataFrame) -> pd.DataFrame:
def compute_reading_measures(
self, fixations_df: pd.DataFrame,
aoi_df: pd.DataFrame,
) -> pd.DataFrame:
"""
Computes reading measures from fixation sequences.
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/reading_measures/reading_measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


import polars as pl
import pytest

Expand Down Expand Up @@ -82,7 +80,8 @@ def test_reading_measures_processing(

# Check that the resulting DataFrame has the expected columns
assert set(result_frame.columns) == set(
expected_columns), 'The result DataFrame does not contain the expected columns.'
expected_columns,
), 'The result DataFrame does not contain the expected columns.'

# Example of validating a specific property (e.g., checking that FFD is computed correctly)
assert result_frame['FFD'].sum() > 0, 'FFD should be greater than zero for valid fixation data.'
Expand All @@ -95,4 +94,5 @@ def test_reading_measures_processing(
# Optionally, read back the saved file and verify its contents if necessary
saved_df = pl.read_csv(str(expected_file))
assert set(saved_df.columns) == set(
expected_columns), 'The saved CSV file does not have the expected columns.'
expected_columns,
), 'The saved CSV file does not have the expected columns.'

0 comments on commit 18ec8d0

Please sign in to comment.