forked from pinecone-io/pinecone-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (39 loc) · 1.65 KB
/
Makefile
File metadata and controls
51 lines (39 loc) · 1.65 KB
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
44
45
46
47
48
49
50
51
.PHONY: image develop tests tag-and-push docs version package upload license
mkfile_path := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
PYPI_USERNAME ?= __token__
image:
MODULE=pinecone ../scripts/build.sh ./
develop:
pip3 install -e .[grpc]
tests:
# skipping flake8 for now
pip3 install --upgrade --quiet tox && TOX_SKIP_ENV='flake|docs' tox
docs:
echo skipping temporarily...
# pip3 install --upgrade --quiet tox && tox -e docs
version:
python3 setup.py --version
package:
pip3 install -U wheel && python3 setup.py sdist bdist_wheel
upload:
pip3 install --upgrade --quiet twine && \
twine upload \
--verbose \
--non-interactive \
--username ${PYPI_USERNAME} \
--password ${PYPI_PASSWORD} \
dist/*
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__
gen-openapi:
docker run --rm -v "${mkfile_path}:/local" openapitools/openapi-generator-cli:v5.2.0 generate --input-spec /local/specs/pinecone_api.json --config /local/codegen-src/openapi-generator-args.python.json --generator-name python --template-dir /local/codegen-src/templates --output /local/openapi-gen
cp -r ${mkfile_path}/openapi-gen/pinecone/core/client/ ${mkfile_path}/pinecone/core/client/
rm -r ${mkfile_path}/openapi-gen