This is the beginnings of a sparse tensor library for Python, backed by the Finch.jl tensor compiler.
The source code for finch-tensor is available on GitHub at https://github.com/finch-tensor/finch-tensor
finch-tensor is available on PyPi, and can be installed with pip:
pip install finch-tensorFinch uses poetry for packaging.
To install for development, clone the repository and run:
poetry install --with testto install the current project and dev dependencies.
The develop.py script can be used to set up a local copy of Finch.jl for development.
Usage:
develop.py [--restore] [--path <path>]
Options:
--restore Restore the original juliapkg.json file.
--path Path to the local copy of Finch.jl [default: ../Finch.jl].
The "Publish" GitHub Action is a manual workflow for publishing Python packages to PyPI using Poetry. It handles the version management based on the pyproject.toml file and automates tagging and creating GitHub releases.
Before initiating the "Publish" action, update the package's version number in pyproject.toml. Follow semantic versioning guidelines for this update.
The action is triggered manually. Once the version in pyproject.toml is updated, manually start the "Publish" action from the GitHub repository's Actions tab.
On successful execution, the action publishes the package to PyPI and tags the release in the GitHub repository. If the version number is not updated, the action fails to publish to PyPI, and no tagging or release is done. In case of failure, correct the version number and rerun the action.
- Ensure the version number in
pyproject.tomlis updated before triggering the action. - Regularly check action logs for successful completion or to identify issues.
To add pre-commit hooks, run:
poetry run pre-commit installFinch uses pytest for testing. To run the tests:
poetry run pytest