Skip to content

Commit 4459469

Browse files
initial scaffolding for the initial port (PR 1 of N) (#4)
* initial scaffolding for project * rm unnecessary `.gitignore` lines --------- Co-authored-by: Ryan Williams <ryan.williams@tiledb.com>
1 parent acb3afc commit 4459469

File tree

6 files changed

+164
-0
lines changed

6 files changed

+164
-0
lines changed

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
__pycache__/
2+
3+
# Distribution / packaging
4+
.Python
5+
build/
6+
dist/
7+
*.egg-info/
8+
9+
# Unit test / coverage reports
10+
.coverage
11+
.coverage.*
12+
.cache
13+
coverage.xml
14+
.pytest_cache/
15+
16+
# Jupyter Notebook
17+
.ipynb_checkpoints
18+
19+
# Environments
20+
.env
21+
.venv
22+
env/
23+
venv/
24+
ENV/
25+
env.bak/
26+
venv.bak/
27+
28+
# mypy
29+
.mypy_cache/
30+
.dmypy.json
31+
dmypy.json

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: "24.8.0"
4+
hooks:
5+
- id: black
6+
exclude: 'apis/'
7+
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: v0.6.5
10+
hooks:
11+
- id: ruff
12+
name: "ruff for tiledbsoma_ml"
13+
args: ["--config=pyproject.toml"]
14+
exclude: 'apis/'
15+
16+
- repo: https://github.com/pre-commit/mirrors-mypy
17+
rev: v1.11.2
18+
hooks:
19+
- id: mypy
20+
pass_filenames: false
21+
args: ["--config-file=pyproject.toml", "src"]
22+
additional_dependencies:
23+
- attrs
24+
- numpy
25+
- pandas-stubs>=2
26+
exclude: 'apis/'

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# Change Log
3+
4+
All notable changes to this project will be documented in this file.
5+
6+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
7+
and this project adheres to [Semantic Versioning](http://semver.org/).
8+
9+
## [Unreleased] - yyyy-mm-dd
10+
11+
Port and enhance contribution from the Chan Zuckerberg Initiative Foundation
12+
[CELLxGENE](https://cellxgene.cziscience.com/) project.
13+
14+
This is not a one-for-one migration of the contributed code. Substantial changes have
15+
been made to the package utility (e.g., multi-GPU support), improve API usability, etc.
16+
17+
### Added
18+
19+
### Changed
20+
21+
### Fixed

pyproject.toml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[build-system]
2+
requires = ["setuptools >= 61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "tiledbsoma-ml"
7+
dynamic = ["version"]
8+
dependencies = [
9+
"attrs>=22.2",
10+
"tiledbsoma>=1.9.0",
11+
"torch>=2.0",
12+
"torchdata<=0.9",
13+
"numpy",
14+
"numba",
15+
"pandas",
16+
"pyarrow",
17+
"scipy"
18+
]
19+
requires-python = ">= 3.9"
20+
description = "Machine learning tools for use with tiledbsoma"
21+
readme = "README.md"
22+
authors = [
23+
{name = "TileDB, Inc.", email = "help@tiledb.io"},
24+
{name = "The Chan Zuckerberg Initiative Foundation", email = "soma@chanzuckerberg.com" },
25+
]
26+
maintainers = [
27+
{name = "TileDB, Inc.", email="help@tiledb.io"},
28+
]
29+
30+
classifiers = [
31+
"Development Status :: 3 - Alpha",
32+
"Intended Audience :: Developers",
33+
"Intended Audience :: Information Technology",
34+
"Intended Audience :: Science/Research",
35+
"License :: OSI Approved :: MIT License",
36+
"Topic :: Scientific/Engineering :: Bio-Informatics",
37+
"Operating System :: Unix",
38+
"Operating System :: POSIX :: Linux",
39+
"Operating System :: MacOS :: MacOS X",
40+
"Operating System :: Microsoft :: Windows",
41+
"Programming Language :: Python",
42+
"Programming Language :: Python :: 3.9",
43+
"Programming Language :: Python :: 3.10",
44+
"Programming Language :: Python :: 3.11",
45+
"Programming Language :: Python :: 3.12",
46+
]
47+
48+
[project.urls]
49+
Repository = "https://github.com/TileDB-Inc/TileDB-SOMA-ML.git"
50+
Issues = "https://github.com/TileDB-Inc/TileDB-SOMA-ML/issues"
51+
Changelog = "https://github.com/TileDB-Inc/TileDB-SOMA-ML/blob/main/CHANGELOG.md"
52+
53+
[tool.setuptools.dynamic]
54+
version = {attr = "tiledbsoma_ml.__version__"}
55+
56+
[tool.setuptools.package-data]
57+
"tiledbsoma_ml" = ["py.typed"]
58+
59+
[tool.setuptools_scm]
60+
root = "../../.."
61+
62+
[tool.mypy]
63+
show_error_codes = true
64+
ignore_missing_imports = true
65+
warn_unreachable = true
66+
strict = true
67+
python_version = 3.9
68+
plugins = "numpy.typing.mypy_plugin"
69+
70+
[tool.ruff]
71+
lint.select = ["E", "F", "B", "I"]
72+
lint.ignore = ["E501"] # line too long
73+
lint.extend-select = ["I001"] # unsorted-imports
74+
fix = true
75+
target-version = "py39"
76+
line-length = 120

src/tiledbsoma_ml/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2021-2024 The Chan Zuckerberg Initiative Foundation
2+
# Copyright (c) 2021-2024 TileDB, Inc.
3+
#
4+
# Licensed under the MIT License.
5+
6+
"""An API to support machine learning applications built on SOMA."""
7+
8+
__version__ = "0.1.0-dev"

src/tiledbsoma_ml/py.typed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Marker file to indicate that this package contains Python typing information,
2+
# and that mypy can use it to typecheck client code.

0 commit comments

Comments
 (0)