Skip to content

Commit

Permalink
Remove setup.cfg (#87)
Browse files Browse the repository at this point in the history
* add contents of setup.cfg to pyproject.toml

* add lockfiles

* remove setup.cfg and MANIFEST

* remove relative import

* revert hatchling backend
  • Loading branch information
berombau authored Jan 23, 2025
1 parent 20e5ac9 commit 7a554b0
Show file tree
Hide file tree
Showing 6 changed files with 18,611 additions and 145 deletions.
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

12,709 changes: 12,709 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

145 changes: 143 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,120 @@
requires = ["setuptools>=42.0.0", "wheel"]
build-backend = "setuptools.build_meta"

# pyproject.toml file content
[project]
name = "harpy-analysis"
version = "0.0.2"
description = "single-cell spatial proteomics analysis that makes you happy"
readme = "README.md"
requires-python = ">=3.10,<3.13"
license = { file = "LICENSE" }
authors = [
{ name = "dambi" }
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Framework :: napari",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Testing"
]
dependencies = [
"spatialdata>=0.2.6",
"xarray>=2024.10.0",
"ome-zarr>=0.9.0",
"scanpy>=1.9.1",
"voronoi-diagram-for-polygons>=0.1.6",
"rasterio>=1.3.2",
"seaborn>=0.12.2",
"leidenalg>=0.9.1",
"geopandas>=1.0.1",
"omegaconf==2.3.0",
"nptyping",
"magicgui",
"pyrootutils",
"universal_pathlib",
"datasets",
"crick",
"spatialdata_io>=0.1.6",
]

# TODO: change to dependency-groups once pip has support https://github.com/pypa/pip/issues/12963
[project.optional-dependencies]
plugin = [
"napari>=0.4.18",
"hydra-core>=1.2.0",
"hydra-colorlog>=1.2.0",
"napari-spatialdata>=0.2.6",
"squidpy>=1.5.0",
"cellpose>=2.2.3",
"pytest-qt"
]
testing = [
"hydra-core>=1.2.0",
"hydra-colorlog>=1.2.0",
"cellpose>=2.2.3",
"squidpy>=1.5.0",
"datasets",
"jax>=0.4.6",
"jaxlib>=0.4.6",
"basicpy>=1.0.0",
"opencv-python",
"pytest",
"pytest-cov",
"tox",
"nbconvert"
]
cli = [
"hydra-core>=1.2.0",
"hydra-colorlog>=1.2.0",
"submitit>=1.4.5",
"hydra-submitit-launcher>=1.2.0"
]
docs = [
"sphinx>=4.5",
"sphinx-book-theme>=1.0.0",
"sphinx_rtd_theme",
"myst-nb",
"sphinxcontrib-bibtex>=1.0.0",
"sphinx-autodoc-typehints",
"sphinx-design",
"ipython>=8.6.0",
"sphinx-copybutton"
]
clustering = [
"scikit-learn>=1.3.1",
"datasets",
"textalloc",
"joypy",
"bokeh",
"spatialdata-plot>=0.2.0"
]
instanseg = [
# TODO: wait for 0.0.7 release that drops AICSImageIO dependency
# "instanseg-torch>=0.0.7"
"instanseg-torch @ git+https://github.com/instanseg/instanseg"
]

[project.urls]
"Bug Tracker" = "https://github.com/saeyslab/harpy/issues"
"Documentation" = "https://github.com/saeyslab/harpy#README.md"
"Source Code" = "https://github.com/saeyslab/harpy"
"User Support" = "https://github.com/saeyslab/harpy/issues"

[project.scripts]
harpy = "harpy.single:main"

[project.entry-points."napari.manifest"]
harpy = "harpy:napari.yaml"

[tool.coverage.run]
omit = ["src/harpy/_tests/*", "experiments/*", "src/harpy/widgets/*", "docs/*" ]

Expand Down Expand Up @@ -51,6 +164,13 @@ ignore = [
]
extend-include = ["*.ipynb"]

[tool.hatch.build.targets.wheel]
packages = ["src/harpy"]

[tool.hatch]
# TODO: remove once instanseg-torch is released
metadata.allow-direct-references = true

[tool.ruff.pydocstyle]
convention = "numpy"

Expand All @@ -60,6 +180,27 @@ convention = "numpy"
"*/__init__.py" = ["F401"]
"**/test_data/*" = ["ALL"]


[tool.pytest.ini_options]
testpaths = ['src/harpy/_tests']

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["osx-arm64", "linux-64"]

[tool.pixi.dependencies]
# add some dependencies, which will fetch them from conda instead of pypi
# needed to avoid gdal build step when installing rasterio
rasterio = ">=1.3.2"
# bioio = "*"
# numba = "*"

[tool.pixi.environments]
# add environments given features of dependency-groups
plugin = ["plugin"]
testing = ["testing"]
cli = ["cli"]
docs = ["docs"]
clustering = ["clustering"]
# TODO fix "instanseg-torch==0.0.6 depends on bioio>=1.1.0,<1.2.dev0 and numpy==2.2.2,
# we can conclude that instanseg-torch==0.0.6 cannot be used"
# instanseg = ["instanseg"]
132 changes: 0 additions & 132 deletions setup.cfg

This file was deleted.

12 changes: 6 additions & 6 deletions src/harpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
except ImportError:
pass

from . import ( # noqa: E402
from harpy import ( # noqa: E402
datasets,
io,
utils,
)
from . import image as im # noqa: E402
from . import plot as pl # noqa: E402
from . import points as pt # noqa: E402
from . import shape as sh # noqa: E402
from . import table as tb # noqa: E402
from harpy import image as im # noqa: E402
from harpy import plot as pl # noqa: E402
from harpy import points as pt # noqa: E402
from harpy import shape as sh # noqa: E402
from harpy import table as tb # noqa: E402
Loading

0 comments on commit 7a554b0

Please sign in to comment.