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

depr: Deprecate utils.parsing in favor of gaze.from_asc() #976

Merged
merged 15 commits into from
Mar 6, 2025
Merged

Conversation

dkrako
Copy link
Contributor

@dkrako dkrako commented Feb 26, 2025

⚠️ Deprecation

utils.parsing is deprecated. please use gaze.from_asc() instead.
utils.parsing will be removed in pymovements v0.26.0

Description

Deprecate utils.parsing in favor of gaze.from_asc()

The following warning is printed:

DeprecationWarning: Call to deprecated function (or staticmethod) parse_eyelink. (Please use gaze.from_asc() instead of utils.parsing. This module will be removed in v0.26.0.) -- Deprecated since version v0.21.0.

Fixes #973

Should be merged before #945

Implemented changes

  • added deprecated as a dependency for @deprecated decorator
  • moved utils/parsing.py to gaze/_utils/parsing.py and adjusted to new location
  • use gaze._utils.parsing in gaze.io
  • created depracted function in utils/parsing.py
  • moved tests/unit/utils/parsing_test.py to tests/unit/gaze/_utils/parsing_test.py
  • add test that function is correctly deprecated
  • add test that function is removed in planned version

@dkrako dkrako marked this pull request as draft February 26, 2025 10:37
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (38c78f8) to head (05428a2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #976   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           78        79    +1     
  Lines         3557      3567   +10     
  Branches       622       622           
=========================================
+ Hits          3557      3567   +10     

☔ 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 dkrako marked this pull request as ready for review February 26, 2025 12:21
@dkrako
Copy link
Contributor Author

dkrako commented Feb 26, 2025

finally

@dkrako
Copy link
Contributor Author

dkrako commented Feb 26, 2025

let's merge this after releasing v0.20.0

@dkrako
Copy link
Contributor Author

dkrako commented Mar 5, 2025

this is now ready for being merged

@dkrako
Copy link
Contributor Author

dkrako commented Mar 6, 2025

Why was #989 merged before this?

@dkrako dkrako enabled auto-merge (squash) March 6, 2025 09:55
@dkrako dkrako added the urgent resolve as soon as possible label Mar 6, 2025
@SiQube
Copy link
Member

SiQube commented Mar 6, 2025

whoops -- #954 was the pain point 🙈

@dkrako
Copy link
Contributor Author

dkrako commented Mar 6, 2025

#954 could wait

@SiQube
Copy link
Member

SiQube commented Mar 6, 2025

very true -- I just forgot about this PR. I think the "easiest" way would be to revert #989, merge #976, and then adjust #989 in a new PR.... sorry

@dkrako
Copy link
Contributor Author

dkrako commented Mar 6, 2025

I try to resolve the conflicts in this PR

@SiQube
Copy link
Member

SiQube commented Mar 6, 2025

see #993

@SiQube
Copy link
Member

SiQube commented Mar 6, 2025

okay -- if you decide to revert and remerge, lmk and I'll fix #989

@dkrako
Copy link
Contributor Author

dkrako commented Mar 6, 2025

shit happens, we're all doing errors here and now. luckily there weren't many changes in #989.

please review the merge commit against the changes in #989

Copy link
Member

@SiQube SiQube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple of feedback questions:

  1. comment below
  2. why gaze/_utils instead of gaze/utils?

@dkrako
Copy link
Contributor Author

dkrako commented Mar 6, 2025

just a couple of feedback questions:

1. comment below

2. why `gaze/_utils` instead of `gaze/utils`?

I wanted to make sure that users understand that this is a private utils module that is not intended for the end-user.

Copy link
Member

@SiQube SiQube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay reasonable, I have to preference and let make pytest happy :-)

@dkrako dkrako merged commit 62cdbbe into main Mar 6, 2025
25 checks passed
@dkrako dkrako deleted the depr/parsing branch March 6, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation urgent resolve as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprecate utils.parsing and move functionality to private gaze._utils.parsing
2 participants