mirror of
https://github.com/lancedb/lancedb.git
synced 2026-07-13 16:00:43 +00:00
docs: contributing guide (#1970)
* Adds basic contributing guides. * Simplifies Python development with a Makefile.
This commit is contained in:
32
python/Makefile
Normal file
32
python/Makefile
Normal file
@@ -0,0 +1,32 @@
|
||||
PIP_EXTRA_INDEX_URL ?= https://pypi.fury.io/lancedb/
|
||||
|
||||
help: ## Show this help.
|
||||
@sed -ne '/@sed/!s/## //p' $(MAKEFILE_LIST)
|
||||
|
||||
.PHONY: develop
|
||||
develop: ## Install the package in development mode.
|
||||
PIP_EXTRA_INDEX_URL=$(PIP_EXTRA_INDEX_URL) maturin develop --extras tests,dev,embeddings
|
||||
|
||||
.PHONY: format
|
||||
format: ## Format the code.
|
||||
cargo fmt
|
||||
ruff format python
|
||||
|
||||
.PHONY: check
|
||||
check: ## Check formatting and lints.
|
||||
cargo fmt --check
|
||||
ruff format --check python
|
||||
cargo clippy
|
||||
ruff check python
|
||||
|
||||
.PHONY: fix
|
||||
fix: ## Fix python lints
|
||||
ruff check python --fix
|
||||
|
||||
.PHONY: doctest
|
||||
doctest: ## Run documentation tests.
|
||||
pytest --doctest-modules python/lancedb
|
||||
|
||||
.PHONY: test
|
||||
test: ## Run tests.
|
||||
pytest python/tests -vv --durations=10 -m "not slow"
|
||||
Reference in New Issue
Block a user