Skip to content

Update to numpy v2 #317

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

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

Conversation

nick-youngblut
Copy link

This pull request introduces several significant updates to modernize the pyensembl project. Key changes include migrating the build system to pyproject.toml, improving the development workflow, and updating the codebase for compatibility with modern Python and NumPy versions. Additionally, the documentation has been expanded to include development and testing instructions.

Build and Dependency Management:

  • Replaced setup.py with pyproject.toml for build system configuration, specifying dependencies, optional development dependencies, and package metadata. ([[1]](https://github.com/openvax/pyensembl/pull/317/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R1-R50), [[2]](https://github.com/openvax/pyensembl/pull/317/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L1-L74))

Development Workflow Improvements:

  • Updated the GitHub Actions workflow to install dependencies in editable mode with development extras (pip install -e ".[dev]") and replaced the test execution command with pytest for better coverage reporting. ([[1]](https://github.com/openvax/pyensembl/pull/317/files#diff-1db27d93186e46d3b441ece35801b244db8ee144ff1405ca27a163bfe878957fL31-R31), [[2]](https://github.com/openvax/pyensembl/pull/317/files#diff-1db27d93186e46d3b441ece35801b244db8ee144ff1405ca27a163bfe878957fL52-R50))
  • Removed the obsolete test.sh script in favor of direct pytest commands. ([test.shL1](https://github.com/openvax/pyensembl/pull/317/files#diff-3722d9ba8feb2d3feac8ce71a209a638d4b404e1c53f937188761181594023e2L1))

Documentation Enhancements:

  • Updated README.md to include a new "Development and Testing" section with detailed instructions on installing the project in development mode, running tests, and generating coverage reports. ([README.mdR142-R195](https://github.com/openvax/pyensembl/pull/317/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R142-R195))
  • Improved the visual structure of the README.md by adding a proper title and header formatting. ([README.mdL7-R8](https://github.com/openvax/pyensembl/pull/317/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L7-R8))

Codebase Modernization:

  • Added a compatibility shim for numpy.typeDict to address its removal in recent NumPy versions. ([pyensembl/__init__.pyR13-R22](https://github.com/openvax/pyensembl/pull/317/files#diff-f73de41d4b9038f9a2c385bce083cc495653ba85a40666398cae6ab5e6892a20R13-R22))
  • Updated logging configuration to use importlib.resources for compatibility with Python 3.9+ and fallback support for older versions. ([[1]](https://github.com/openvax/pyensembl/pull/317/files#diff-c3dc15650bad87614d5861ce25700b34aeeb863ac948461a2cbdba096198534bL43-R46), [[2]](https://github.com/openvax/pyensembl/pull/317/files#diff-c3dc15650bad87614d5861ce25700b34aeeb863ac948461a2cbdba096198534bL52-R57))

Notes

  • Currently using gtfparse @ git+https://github.com/nick-youngblut/gtfparse.git@pyarrow_update in the pyproject.toml

nick-youngblut and others added 5 commits May 27, 2025 10:51
…umpy-2-compatibility

Ensure compatibility with NumPy 2
- Added optional development dependencies in `pyproject.toml`: `pytest`, `pytest-cov`, `flake8`, and `coveralls`.
- Updated `README.md` to include installation instructions for development and detailed testing commands.
- Removed `test.sh` script in favor of direct `pytest` commands in the workflow.
- Updated GitHub Actions workflow to install dependencies in editable mode and run tests directly.
- Removed upper version constraint for `gtfparse`.
- Added `pyarrow` with a minimum version of 16.0.0.
- Added `pandas` with a minimum version of 2.0.0.
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.

1 participant