Skip to content
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

fix: return DatasetDefinition copy by DatasetLibrary.get() #1023

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dkrako
Copy link
Contributor

@dkrako dkrako commented Mar 12, 2025

Description

#914 exposed a bug in resample(): the experiment of the dataset definition is not just updated in the GazeDataFrame itself, but also in the DatasetLibrary. This really shouldn't happen.

See the corresponding discussion.

#914 will be merged with the adjusted docstring, but this PR needs to revert the change to the docstring again.

Implemented changes

Insert a description of the changes implemented in the pull request.

  • [ ]
  • Change 2
  • Change 3

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change is or requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Sorry, something went wrong.

Copy link

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (87487d0) to head (9d101b9).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1023   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           79        79           
  Lines         3588      3586    -2     
  Branches       645       645           
=========================================
- Hits          3588      3586    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dkrako
Copy link
Contributor Author

dkrako commented Mar 12, 2025

I just don't get it...

How can test_returned_definition_is_copy fail if I clearly use deepcopy() in DatasetLibrary.get()?

@dkrako
Copy link
Contributor Author

dkrako commented Mar 17, 2025

Ah now I think I know why this happened. The returned definition was the class not an instance. #914 has changed this accordingly which is good. The same class is always the same, regardless of using deepcopy.

Hope the tests will pas now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant