Skip to content

Remove pytables as a dependency - #340

Merged
lucas-diedrich merged 12 commits into
mainfrom
dep-pytables-optional-1
Aug 27, 2025
Merged

Remove pytables as a dependency#340
lucas-diedrich merged 12 commits into
mainfrom
dep-pytables-optional-1

Conversation

@lucas-diedrich

Copy link
Copy Markdown
Collaborator

pytables is only required by a single utility (hdf file reader of AlphapeptPGReader), but it significantly increases the complexity of the installation + testing functionalities.

If users try to import hdf files, they get a very clear error message from pandas

ImportError: Missing optional dependency 'pytables'.  Use pip or conda to install pytables.

Therefore, this PR removes pytables as dependency of alphabase, and skips the respective integration tests in an environment in which the package is not installed. This only affects alphapept .hdf output files. A note was added to the alphapept reader that makes users aware that they need to install the tables package in order to be able to read .hdf files.

@lucas-diedrich

Copy link
Copy Markdown
Collaborator Author

Comment thread tests/integration/conftest.py
Comment thread pyproject.toml
Comment thread alphabase/pg_reader/alphapept_pg_reader.py Outdated
Comment thread requirements/requirements.txt
Comment thread requirements/requirements_hdf_loose.txt
@lucas-diedrich lucas-diedrich added the bug Something isn't working label Aug 27, 2025

@mschwoer mschwoer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

*hits approve button harder*

Comment thread README.md Outdated
Comment thread alphabase/pg_reader/alphapept_pg_reader.py Outdated
@lucas-diedrich
lucas-diedrich merged commit 8e46399 into main Aug 27, 2025
3 checks passed
@lucas-diedrich
lucas-diedrich deleted the dep-pytables-optional-1 branch August 27, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants