-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
68 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
# Finch | ||
# finch-tensor | ||
|
||
This is the beginnings of a sparse tensor library for Python, backed by the | ||
[Finch.jl](https://github.com/willow-ahrens/Finch.jl) tensor compiler. | ||
|
||
## Installation | ||
|
||
Finch is available on PyPi, and can be installed with pip: | ||
`finch-tensor` is available on PyPi, and can be installed with pip: | ||
```bash | ||
pip install finch | ||
pip install finch-tensor | ||
``` | ||
|
||
## Contributing | ||
|
||
### Packaging | ||
### Local setup | ||
|
||
Finch uses [poetry](https://python-poetry.org/) for packaging. | ||
`conda` can be used for creating a local development setup: | ||
|
||
```bash | ||
git clone https://github.com/willow-ahrens/finch-tensor.git | ||
cd finch-tensor/ | ||
conda create --name finch-tensor-dev python=3.9 | ||
conda activate finch-tensor-dev | ||
pip install . | ||
``` | ||
|
||
### Testing | ||
|
||
Finch uses [pytest](https://docs.pytest.org/en/latest/) for testing. To run the | ||
`finch-tensor` uses [pytest](https://docs.pytest.org/en/latest/) for testing. To run the | ||
tests: | ||
|
||
```bash | ||
poetry run pytest | ||
pytest tests | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import pytest | ||
from src import finch | ||
import finch | ||
|
||
@pytest.fixture | ||
def x(): | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,46 @@ | ||
[tool.poetry] | ||
[build-system] | ||
requires = ["setuptools>=64", "setuptools_scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "finch-tensor" | ||
version = "0.1.3" | ||
dynamic = ["version"] | ||
description = "" | ||
authors = ["Willow Ahrens <[email protected]>"] | ||
maintainers = [{ name = "Willow Ahrens", email = "[email protected]" }] | ||
readme = "README.md" | ||
packages = [{include = "finch", from = "src"}] | ||
license = { file = "LICENSE" } | ||
requires-python = ">=3.8" | ||
dependencies = ["juliapkg>=0.1.10", "juliacall>=0.9.15"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
juliapkg = "^0.1.10" | ||
juliacall = "^0.9.15" | ||
[project.optional-dependencies] | ||
tests = ["pytest>=3.5", "sparse>=0.15.1"] | ||
|
||
[project.urls] | ||
Source = "https://github.com/willow-ahrens/finch-tensor" | ||
Repository = "https://github.com/willow-ahrens/finch-tensor.git" | ||
|
||
[tool.poetry.group.test.dependencies] | ||
pytest = "^7.4.4" | ||
[tool.setuptools.packages.find] | ||
where = ["."] | ||
include = ["finch", "finch.*"] | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
[tool.setuptools_scm] | ||
version_file = "finch/_version.py" | ||
|
||
[tool.ruff] | ||
select = ["F", "E", "W", "I", "B", "UP", "YTT", "BLE", "C4", "T10", "ISC", "ICN", "PIE", "PYI", "RSE", "RET", "SIM", "PGH", "FLY", "NPY", "PERF"] | ||
exclude = ["finch/_version.py"] | ||
line-length = 120 | ||
|
||
[tool.ruff.format] | ||
quote-style = "double" | ||
docstring-code-format = true | ||
|
||
[tool.ruff.lint.isort] | ||
section-order = [ | ||
"future", | ||
"standard-library", | ||
"first-party", | ||
"third-party", | ||
"numpy", | ||
"local-folder", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[pytest] | ||
addopts = --cov-report term-missing --cov-report html --cov-report=xml --cov-report=term --cov sparse --cov-config .coveragerc --junitxml=junit/test-results.xml | ||
filterwarnings = | ||
ignore::PendingDeprecationWarning | ||
testpaths = | ||
finch | ||
junit_family=xunit2 |
This file was deleted.
Oops, something went wrong.