forked from pinecone-io/pinecone-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.PHONY: image develop tests tag-and-push docs version package upload upload-spruce license
mkfile_path := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
PYPI_USERNAME ?= __token__
image:
MODULE=pinecone ../scripts/build.sh ./
develop:
poetry install -E grpc
tests:
@echo "Installing dependencies..."
poetry install
@echo "Running tests..."
poetry run pytest --cov=pinecone --timeout=120 tests/unit
version:
poetry version
package:
poetry build
upload:
poetry publish --verbose --username ${PYPI_USERNAME} --password ${PYPI_PASSWORD}
upload-spruce:
# Configure Poetry for publishing to testpypi
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry publish --verbose -r test-pypi --username ${PYPI_USERNAME} --password ${PYPI_PASSWORD}
license:
# Add license header using https://github.com/google/addlicense.
# If the license header already exists in a file, re-running this command has no effect.
pushd ${mkfile_path}/pinecone && \
docker run --rm -it -v ${mkfile_path}/pinecone:/src ghcr.io/google/addlicense:latest -f ./license_header.txt *.py */*.py */*/*.py */*/*/*.py */*/*/*/*.py */*/*/*/*/*.py */*/*/*/*/*/*.py; \
popd
set-production:
echo "production" > pinecone/__environment__
set-development:
echo "" > pinecone/__environment__