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.downloads in favor of Dataset.download() #1030

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

dkrako
Copy link
Contributor

@dkrako dkrako commented Mar 13, 2025

⚠️ Deprecation

utils.downloads is deprecated. please use Dataset.downloads() instead.
utils.downloads will be removed in pymovements v0.26.0

Description

Deprecate utils.downloads in favor of Dataset.downloads()

The following warnings are printed:

DeprecationWarning: Call to deprecated function (or staticmethod) download_and_extract_archive. (Please use Dataset.downloads() instead. This module will be removed in v0.26.0.) -- Deprecated since version v0.21.0.
DeprecationWarning: Call to deprecated function (or staticmethod) download_file. (Please use Dataset.downloads() instead. This module will be removed in v0.26.0.) -- Deprecated since version v0.21.0.

partly resolves #999

blocked by #1028

Implemented changes

  • moved utils/downloads.py to dataset/_utils/downloads.py and adjusted to new location
  • use dataset._utils.downloads in dataset.dataset_download
  • created deprecated function in utils/downloads.py
  • moved tests/unit/utils/downloads_test.py to tests/unit/dataset/_utils/_downloads_test.py
  • add test that functions are correctly deprecated
  • add test that functions are removed in planned version

Copy link

codecov bot commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (592ff7b) to head (022a86e).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1030   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           78        82    +4     
  Lines         3561      3618   +57     
  Branches       629       645   +16     
=========================================
+ Hits          3561      3618   +57     

☔ 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 March 13, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprecate utils modules that are not intended for end-users
1 participant