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] ExcelReader - Use openpyxl to read xlsx and xlrd for xls #400

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

PrimozGodec
Copy link
Contributor

@PrimozGodec PrimozGodec commented Mar 21, 2024

Issue
  • Tests started to fail since xlrd cannot read xlsx files on newer Pythons. It is also documented in the library that it supports only historic xls files. While writing tests for the historical version of xls, I noticed that the version of xlrd pinned in requirements doesn't work with Pandas anymore, so data cannot be loaded from xls.
  • With the newest scipy (1.12.0) mtx loading started to fail since they implemented the module.
Description of changes
  • Use Openpyxl to get info on xlsx and xlrd for gen info for xls. Adding openpyxl to requirements. It is already an Orange3 requirement. Updating the version of xlrd to work with Pandas
  • It seems that mtx file opened as "rb" failed. Instead of opening it manually, pass the filename to the module, and it will open itself.
Includes
  • Code changes
  • Tests
  • Documentation

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.59%. Comparing base (40341cd) to head (68edf7a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #400      +/-   ##
==========================================
+ Coverage   80.56%   80.59%   +0.03%     
==========================================
  Files          21       21              
  Lines        5474     5479       +5     
==========================================
+ Hits         4410     4416       +6     
+ Misses       1064     1063       -1     
Files Coverage Δ
orangecontrib/single_cell/widgets/load_data.py 93.12% <100.00%> (+0.24%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40341cd...68edf7a. Read the comment docs.

@VesnaT VesnaT merged commit 43f70d9 into master Mar 21, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants