From 805de806a8ec3b7aa439185f7791f3a8dbd24415 Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Wed, 26 Oct 2022 16:26:32 -0700 Subject: [PATCH] chore: cleanup bazel rules and dependencies (#3149) --- BUILD.bazel | 9 +- Makefile | 4 +- WORKSPACE | 150 ++--------------- bazel/BUILD | 6 + bazel/deps.bzl | 153 +++++++++++++++++ bazel/utils.bzl | 38 +++++ examples/custom_model_runner/BUILD | 18 ++ grpc-client/README.md | 2 +- grpc-client/python/BUILD.bazel | 13 -- grpc-client/python/requirement.in | 10 -- grpc-client/python/requirements.lock.txt | 205 ----------------------- requirements/BUILD | 1 + requirements/dev-requirements.txt | 2 + requirements/tests-requirements.txt | 30 ++-- 14 files changed, 253 insertions(+), 388 deletions(-) create mode 100644 bazel/BUILD create mode 100644 bazel/deps.bzl create mode 100644 bazel/utils.bzl create mode 100644 examples/custom_model_runner/BUILD delete mode 100644 grpc-client/python/BUILD.bazel delete mode 100644 grpc-client/python/requirement.in delete mode 100644 grpc-client/python/requirements.lock.txt create mode 100644 requirements/BUILD diff --git a/BUILD.bazel b/BUILD.bazel index a99008ab1a8..3a9ab9537e2 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,14 +1,17 @@ package(default_visibility = ["//visibility:public"]) load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") +load("@rules_proto//proto:defs.bzl", "proto_library") + +filegroup( + name = "pyproject", + srcs = ["pyproject.toml"], +) buildifier( name = "buildifier", ) -# Create a generated proto library -load("@rules_proto//proto:defs.bzl", "proto_library") - proto_library( name = "service_v1alpha1_proto", srcs = ["src/bentoml/grpc/v1alpha1/service.proto"], diff --git a/Makefile b/Makefile index bf70344b52f..937ce381ea2 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,8 @@ clean: ## Clean all generated files @find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete # Docs -watch-docs: install-docs-deps ## Build and watch documentation - sphinx-autobuild docs/source docs/build/html --watch $(GIT_ROOT)/bentoml --ignore "bazel-*" +watch-docs: ## Build and watch documentation + sphinx-autobuild docs/source docs/build/html --watch $(GIT_ROOT)/src/bentoml --ignore "bazel-*" spellcheck-docs: ## Spell check documentation sphinx-build -b spelling ./docs/source ./docs/build || (echo "Error running spellchecker.. You may need to run 'make install-spellchecker-deps'"; exit 1) diff --git a/WORKSPACE b/WORKSPACE index 2f66ccc4028..d1682eaf6f9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,33 +1,9 @@ -workspace(name = "bentoml") +# TODO: Migrate to bzlmod once 6.0.0 is released. +workspace(name = "com_github_bentoml_bentoml") -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("//bazel:deps.bzl", "internal_deps") -# install buildifier -http_archive( - name = "com_github_bazelbuild_buildtools", - sha256 = "ae34c344514e08c23e90da0e2d6cb700fcd28e80c02e23e4d5715dddcb42f7b3", - strip_prefix = "buildtools-4.2.2", - urls = [ - "https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.2.tar.gz", - ], -) - -# setup rules_proto and rules_proto_grpc -http_archive( - name = "rules_proto", - sha256 = "e017528fd1c91c5a33f15493e3a398181a9e821a804eb7ff5acdd1d2d6c2b18d", - strip_prefix = "rules_proto-4.0.0-3.20.0", - urls = [ - "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.20.0.tar.gz", - ], -) - -http_archive( - name = "rules_proto_grpc", - sha256 = "507e38c8d95c7efa4f3b1c0595a8e8f139c885cb41a76cab7e20e4e67ae87731", - strip_prefix = "rules_proto_grpc-4.1.1", - urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.1.1.tar.gz"], -) +internal_deps() load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains") @@ -51,36 +27,13 @@ load("@rules_proto_grpc//go:repositories.bzl", rules_proto_grpc_go_repos = "go_r rules_proto_grpc_go_repos() -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") +load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies") go_rules_dependencies() -go_register_toolchains(version = "1.19") - -# grpc/grpc dependencies -# Currently c3714eced8c51db9092e0adc2a1dfb715655c795 address -# some build issues with upb for C++. -# TODO: Update this to v1.50.0 when 1.50.0 is out. -http_archive( - name = "com_github_grpc_grpc", - strip_prefix = "grpc-c3714eced8c51db9092e0adc2a1dfb715655c795", - urls = [ - "https://github.com/grpc/grpc/archive/c3714eced8c51db9092e0adc2a1dfb715655c795.tar.gz", - ], -) +load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") -# Override the abseil-cpp version defined in grpc_deps(), which doesn't work on latest macOS -# Fixes https://github.com/bazelbuild/bazel/issues/15168 -# This section is excerpted from https://github.com/bazelbuild/bazel/blob/master/distdir_deps.bzl -http_archive( - name = "com_google_absl", - sha256 = "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4", - strip_prefix = "abseil-cpp-20211102.0", - urls = [ - "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", - "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", - ], -) +protobuf_deps() # Projects using gRPC as an external dependency must call both grpc_deps() and # grpc_extra_deps(). @@ -92,80 +45,10 @@ load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") grpc_extra_deps() -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") - -protobuf_deps() - -http_archive( - name = "com_google_googleapis", - sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0", - strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92", - urls = [ - "https://mirror.bazel.build/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz", - "https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz", - ], -) - -http_archive( - name = "upb", - sha256 = "03b642a535656560cd95cab3b26e8c53ce37e472307dce5bb7e47c9953bbca0f", - strip_prefix = "upb-e5f26018368b11aab672e8e8bb76513f3620c579", - urls = [ - "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/e5f26018368b11aab672e8e8bb76513f3620c579.tar.gz", - "https://github.com/protocolbuffers/upb/archive/e5f26018368b11aab672e8e8bb76513f3620c579.tar.gz", - ], -) - -http_archive( - name = "bazel_gazelle", - sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", - ], -) - load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") gazelle_dependencies() -# load python rules here -# Using commit f0efec5cf8c0ae16483ee677a09ec70737a01bf5 -http_archive( - name = "rules_python", - strip_prefix = "rules_python-f0efec5cf8c0ae16483ee677a09ec70737a01bf5", - url = "https://github.com/bazelbuild/rules_python/archive/f0efec5cf8c0ae16483ee677a09ec70737a01bf5.zip", -) - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "bentoml_requirements", - requirements_lock = "//grpc-client/python:requirements.lock.txt", -) - -# Load the starlark macro which will define your dependencies. -load("@bentoml_requirements//:requirements.bzl", "install_deps") - -# Call it to define repos for your requirements. -install_deps() - -# io_grpc_grpc_java is for java_grpc_library and related dependencies. -# Using commit 0cda133c52ed937f9b0a19bcbfc36bf2892c7aa8 -http_archive( - name = "io_grpc_grpc_java", - sha256 = "35189faf484096c9eb2928c43b39f2457d1ca39046704ba8c65a69482f8ceed5", - strip_prefix = "grpc-java-0cda133c52ed937f9b0a19bcbfc36bf2892c7aa8", - urls = ["https://github.com/grpc/grpc-java/archive/0cda133c52ed937f9b0a19bcbfc36bf2892c7aa8.tar.gz"], -) - -http_archive( - name = "rules_jvm_external", - sha256 = "c21ce8b8c4ccac87c809c317def87644cdc3a9dd650c74f41698d761c95175f3", - strip_prefix = "rules_jvm_external-1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a", - url = "https://github.com/bazelbuild/rules_jvm_external/archive/1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a.zip", -) - load("@rules_jvm_external//:defs.bzl", "maven_install") load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS", "grpc_java_repositories") @@ -195,21 +78,6 @@ compat_repositories() grpc_java_repositories() -# loading kotlin rules -# first to load grpc/grpc-kotlin -http_archive( - name = "com_github_grpc_grpc_kotlin", - sha256 = "b1ec1caa5d81f4fa4dca0662f8112711c82d7db6ba89c928ca7baa4de50afbb2", - strip_prefix = "grpc-kotlin-a1659c1b3fb665e01a6854224c7fdcafc8e54d56", - urls = ["https://github.com/grpc/grpc-kotlin/archive/a1659c1b3fb665e01a6854224c7fdcafc8e54d56.tar.gz"], -) - -http_archive( - name = "io_bazel_rules_kotlin", - sha256 = "a57591404423a52bd6b18ebba7979e8cd2243534736c5c94d35c89718ea38f94", - urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.6.0/rules_kotlin_release.tgz"], -) - load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories") kotlin_repositories() @@ -222,3 +90,7 @@ kt_register_toolchains() # TODO: Currently fails at detecting compiled gRPC swift library # Since CgRPC is deprecated, seems like no rules are being maintained # for the newer swift implementation. + +# TODO: rules_python for editable install? +# What we can do is to build the wheel, the install it to pip_parse +# This will ensure hermeticity. diff --git a/bazel/BUILD b/bazel/BUILD new file mode 100644 index 00000000000..528ca026b28 --- /dev/null +++ b/bazel/BUILD @@ -0,0 +1,6 @@ +package(default_visibility = ["//:__subpackages__"]) + +exports_files([ + "deps.bzl", + "utils.bzl", +]) diff --git a/bazel/deps.bzl b/bazel/deps.bzl new file mode 100644 index 00000000000..365f4ab7a45 --- /dev/null +++ b/bazel/deps.bzl @@ -0,0 +1,153 @@ +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +def internal_deps(): + maybe( + http_archive, + name = "bazel_skylib", + sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + ], + ) + + maybe( + http_archive, + name = "io_bazel_rules_go", + sha256 = "099a9fb96a376ccbbb7d291ed4ecbdfd42f6bc822ab77ae6f1b5cb9e914e94fa", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip", + ], + ) + maybe( + http_archive, + name = "bazel_gazelle", + sha256 = "efbbba6ac1a4fd342d5122cbdfdb82aeb2cf2862e35022c752eaddffada7c3f3", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz", + ], + ) + + maybe( + http_archive, + name = "rules_proto", + sha256 = "e017528fd1c91c5a33f15493e3a398181a9e821a804eb7ff5acdd1d2d6c2b18d", + strip_prefix = "rules_proto-4.0.0-3.20.0", + urls = [ + "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.20.0.tar.gz", + ], + ) + + maybe( + http_archive, + name = "rules_proto_grpc", + sha256 = "507e38c8d95c7efa4f3b1c0595a8e8f139c885cb41a76cab7e20e4e67ae87731", + strip_prefix = "rules_proto_grpc-4.1.1", + urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.1.1.tar.gz"], + ) + + # grpc/grpc dependencies + # Currently c3714eced8c51db9092e0adc2a1dfb715655c795 address + # some build issues with upb for C++. + # TODO: Update this to v1.50.0 when 1.50.0 is out. + maybe( + http_archive, + name = "com_github_grpc_grpc", + strip_prefix = "grpc-c3714eced8c51db9092e0adc2a1dfb715655c795", + sha256 = "3ad2b790589ca55928128513955562c4d397722afbe9b426e63a964ee59cb02a", + urls = [ + "https://github.com/grpc/grpc/archive/c3714eced8c51db9092e0adc2a1dfb715655c795.tar.gz", + ], + ) + + # Override the abseil-cpp version defined in grpc_deps(), which doesn't work on latest macOS + # Fixes https://github.com/bazelbuild/bazel/issues/15168 + # This section is excerpted from https://github.com/bazelbuild/bazel/blob/master/distdir_deps.bzl + maybe( + http_archive, + name = "com_google_absl", + sha256 = "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4", + strip_prefix = "abseil-cpp-20211102.0", + urls = [ + "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", + "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", + ], + ) + + maybe( + http_archive, + name = "com_google_googleapis", + sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0", + strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92", + urls = [ + "https://mirror.bazel.build/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz", + "https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz", + ], + ) + + maybe( + http_archive, + name = "upb", + sha256 = "03b642a535656560cd95cab3b26e8c53ce37e472307dce5bb7e47c9953bbca0f", + strip_prefix = "upb-e5f26018368b11aab672e8e8bb76513f3620c579", + urls = [ + "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/e5f26018368b11aab672e8e8bb76513f3620c579.tar.gz", + "https://github.com/protocolbuffers/upb/archive/e5f26018368b11aab672e8e8bb76513f3620c579.tar.gz", + ], + ) + + # install buildifier + maybe( + http_archive, + name = "com_github_bazelbuild_buildtools", + sha256 = "ae34c344514e08c23e90da0e2d6cb700fcd28e80c02e23e4d5715dddcb42f7b3", + strip_prefix = "buildtools-4.2.2", + urls = [ + "https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.2.tar.gz", + ], + ) + + # python rules + maybe( + http_archive, + name = "rules_python", + sha256 = "8c8fe44ef0a9afc256d1e75ad5f448bb59b81aba149b8958f02f7b3a98f5d9b4", + strip_prefix = "rules_python-0.13.0", + url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.13.0.tar.gz", + ) + + # io_grpc_grpc_java is for java_grpc_library and related dependencies. + # Using commit 0cda133c52ed937f9b0a19bcbfc36bf2892c7aa8 + maybe( + http_archive, + name = "io_grpc_grpc_java", + sha256 = "35189faf484096c9eb2928c43b39f2457d1ca39046704ba8c65a69482f8ceed5", + strip_prefix = "grpc-java-0cda133c52ed937f9b0a19bcbfc36bf2892c7aa8", + urls = ["https://github.com/grpc/grpc-java/archive/0cda133c52ed937f9b0a19bcbfc36bf2892c7aa8.tar.gz"], + ) + maybe( + http_archive, + name = "rules_jvm_external", + sha256 = "c21ce8b8c4ccac87c809c317def87644cdc3a9dd650c74f41698d761c95175f3", + strip_prefix = "rules_jvm_external-1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a", + url = "https://github.com/bazelbuild/rules_jvm_external/archive/1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a.zip", + ) + + # loading kotlin rules + # first to load grpc/grpc-kotlin + maybe( + http_archive, + name = "com_github_grpc_grpc_kotlin", + sha256 = "b1ec1caa5d81f4fa4dca0662f8112711c82d7db6ba89c928ca7baa4de50afbb2", + strip_prefix = "grpc-kotlin-a1659c1b3fb665e01a6854224c7fdcafc8e54d56", + urls = ["https://github.com/grpc/grpc-kotlin/archive/a1659c1b3fb665e01a6854224c7fdcafc8e54d56.tar.gz"], + ) + maybe( + http_archive, + name = "io_bazel_rules_kotlin", + sha256 = "a57591404423a52bd6b18ebba7979e8cd2243534736c5c94d35c89718ea38f94", + urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.6.0/rules_kotlin_release.tgz"], + ) diff --git a/bazel/utils.bzl b/bazel/utils.bzl new file mode 100644 index 00000000000..4148e6493a0 --- /dev/null +++ b/bazel/utils.bzl @@ -0,0 +1,38 @@ +load("@bazel_skylib//rules:write_file.bzl", "write_file") + +def run_shell(name, under_workspace = False, srcs = [], content = [], data = [], **kwargs): + """ + Create a run_shell macro. + We will create a shell wrapper, and then return a target + that can be used to run the shell wrapper. The shell wrapper + will run under $BUILD__DIRECTORY. + Args: + name: Name of the rule set. + srcs: List of source files to be used by the rules. + content: List of rules to be applied. + data: List of data files to be used by the rules. + under_workspace: Whether to run the shell wrapper under the BUILD_WORKSPACE_DIRECTORY. By default, + the shell wrapper will run under the BUILD_WORKING_DIRECTORY. + **kwargs: Arbitrary keyword arguments. + """ + file_name = "_{}_wrapper".format(name) + shell_file = "{}.sh".format(file_name) + if under_workspace: + workspace = "$BUILD_WORKSPACE_DIRECTORY" + else: + workspace = "$BUILD_WORKING_DIRECTORY" + + write_file( + name = file_name, + out = shell_file, + content = [ + "#!/usr/bin/env bash\n", + "cd {}\n".format(workspace), + ] + content, + ) + native.sh_binary( + name = name, + srcs = [shell_file] + srcs, + data = data, + **kwargs + ) diff --git a/examples/custom_model_runner/BUILD b/examples/custom_model_runner/BUILD new file mode 100644 index 00000000000..fe0e8551a1b --- /dev/null +++ b/examples/custom_model_runner/BUILD @@ -0,0 +1,18 @@ +package(default_visibility = ["//visibility:private"]) + +load("//bazel:utils.bzl", "run_shell") + +run_shell( + name = "download_mnist_data", + content = [ + " | ".join([ + "wget -qO- https://github.com/myleott/mnist_png/raw/master/mnist_png.tar.gz", + "tar xz", + ]), + ], +) + +run_shell( + name = "train", + content = ["python train.py $@"], +) diff --git a/grpc-client/README.md b/grpc-client/README.md index e06f53897b0..d75efbc98e1 100644 --- a/grpc-client/README.md +++ b/grpc-client/README.md @@ -28,7 +28,7 @@ The following table contains command to run clients: | Language | Command | | ------------------ | --------------------------------------- | -| [Python](./python) | `bazel run //grpc-client/python:client` | +| [Python](./python) | `python client.py` | | [C++](./cpp) | `bazel run //grpc-client/cpp:client` | | [Go](./go) | `bazel run //grpc-client/go:client` | | [Java](./java) | `bazel run //grpc-client/java:client` | diff --git a/grpc-client/python/BUILD.bazel b/grpc-client/python/BUILD.bazel deleted file mode 100644 index 48e45e5ee08..00000000000 --- a/grpc-client/python/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@rules_python//python:defs.bzl", "py_binary") -load("@bentoml_requirements//:requirements.bzl", "requirement") - -py_binary( - name = "client", - srcs = ["client.py"], - python_version = "PY3", - deps = [ - requirement("grpcio"), - requirement("bentoml"), - requirement("protobuf"), - ], -) diff --git a/grpc-client/python/requirement.in b/grpc-client/python/requirement.in deleted file mode 100644 index 755a12b25d4..00000000000 --- a/grpc-client/python/requirement.in +++ /dev/null @@ -1,10 +0,0 @@ -# We will have to manually generate the lock files -# TODO: bazel rules :) -git+https://github.com/bentoml/bentoml.git@9ac664f27b6d5801a2f0ad46d3fe32f943e6be8f -setuptools==65.3.0 -protobuf==3.19.4 -# Lowest version that support 3.10 -grpcio==1.48.1 -grpcio-health-checking==1.48.1 -grpcio-reflection==1.48.1 -opentelemetry-instrumentation-grpc==0.33b0 diff --git a/grpc-client/python/requirements.lock.txt b/grpc-client/python/requirements.lock.txt deleted file mode 100644 index 0ed175e9741..00000000000 --- a/grpc-client/python/requirements.lock.txt +++ /dev/null @@ -1,205 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile --output-file=python/requirements.lock.txt python/requirement.in -# -aiohttp==3.8.3 - # via bentoml -aiosignal==1.2.0 - # via aiohttp -anyio==3.6.1 - # via - # starlette - # watchfiles -appdirs==1.4.4 - # via fs -asgiref==3.5.2 - # via opentelemetry-instrumentation-asgi -async-timeout==4.0.2 - # via aiohttp -attrs==22.1.0 - # via - # aiohttp - # bentoml - # cattrs -bentoml @ git+https://github.com/bentoml/bentoml.git@9ac664f27b6d5801a2f0ad46d3fe32f943e6be8f - # via -r python/requirement.in -build==0.8.0 - # via pip-tools -cattrs==22.1.0 - # via bentoml -certifi==2022.9.14 - # via requests -charset-normalizer==2.1.1 - # via - # aiohttp - # requests -circus==0.17.1 - # via bentoml -click==8.1.3 - # via - # bentoml - # pip-tools - # uvicorn -cloudpickle==2.2.0 - # via bentoml -commonmark==0.9.1 - # via rich -contextlib2==21.6.0 - # via schema -deepmerge==1.0.1 - # via bentoml -deprecated==1.2.13 - # via opentelemetry-api -exceptiongroup==1.0.0rc9 - # via cattrs -frozenlist==1.3.1 - # via - # aiohttp - # aiosignal -fs==2.4.16 - # via bentoml -grpcio==1.48.1 - # via - # -r python/requirement.in - # grpcio-health-checking - # grpcio-reflection -grpcio-health-checking==1.48.1 - # via -r python/requirement.in -grpcio-reflection==1.48.1 - # via -r python/requirement.in -h11==0.13.0 - # via uvicorn -idna==3.4 - # via - # anyio - # requests - # yarl -jinja2==3.1.2 - # via bentoml -markupsafe==2.1.1 - # via jinja2 -multidict==6.0.2 - # via - # aiohttp - # yarl -numpy==1.23.3 - # via bentoml -opentelemetry-api==1.12.0 - # via - # bentoml - # opentelemetry-instrumentation - # opentelemetry-instrumentation-aiohttp-client - # opentelemetry-instrumentation-asgi - # opentelemetry-instrumentation-grpc - # opentelemetry-sdk -opentelemetry-instrumentation==0.33b0 - # via - # bentoml - # opentelemetry-instrumentation-aiohttp-client - # opentelemetry-instrumentation-asgi - # opentelemetry-instrumentation-grpc -opentelemetry-instrumentation-aiohttp-client==0.33b0 - # via bentoml -opentelemetry-instrumentation-asgi==0.33b0 - # via bentoml -opentelemetry-instrumentation-grpc==0.33b0 - # via -r python/requirement.in -opentelemetry-sdk==1.12.0 - # via - # bentoml - # opentelemetry-instrumentation-grpc -opentelemetry-semantic-conventions==0.33b0 - # via - # bentoml - # opentelemetry-instrumentation-aiohttp-client - # opentelemetry-instrumentation-asgi - # opentelemetry-instrumentation-grpc - # opentelemetry-sdk -opentelemetry-util-http==0.33b0 - # via - # bentoml - # opentelemetry-instrumentation-aiohttp-client - # opentelemetry-instrumentation-asgi -packaging==21.3 - # via - # bentoml - # build -pathspec==0.10.1 - # via bentoml -pep517==0.13.0 - # via build -pip-tools==6.8.0 - # via bentoml -prometheus-client==0.13.1 - # via bentoml -protobuf==3.19.4 - # via - # -r python/requirement.in - # grpcio-health-checking - # grpcio-reflection -psutil==5.9.2 - # via - # bentoml - # circus -pygments==2.13.0 - # via rich -pynvml==11.4.1 - # via bentoml -pyparsing==3.0.9 - # via packaging -python-dateutil==2.8.2 - # via bentoml -python-dotenv==0.21.0 - # via bentoml -python-multipart==0.0.5 - # via bentoml -pyyaml==6.0 - # via bentoml -pyzmq==24.0.1 - # via circus -requests==2.28.1 - # via bentoml -rich==12.5.1 - # via bentoml -schema==0.7.5 - # via bentoml -simple-di==0.1.5 - # via bentoml -six==1.16.0 - # via - # fs - # grpcio - # python-dateutil - # python-multipart -sniffio==1.3.0 - # via anyio -starlette==0.20.4 - # via bentoml -tomli==2.0.1 - # via - # build - # pep517 -tornado==6.2 - # via circus -typing-extensions==4.3.0 - # via opentelemetry-sdk -urllib3==1.26.12 - # via requests -uvicorn==0.18.3 - # via bentoml -watchfiles==0.17.0 - # via bentoml -wheel==0.37.1 - # via pip-tools -wrapt==1.14.1 - # via - # deprecated - # opentelemetry-instrumentation - # opentelemetry-instrumentation-aiohttp-client - # opentelemetry-instrumentation-grpc -yarl==1.8.1 - # via aiohttp -pip==22.1.0 -setuptools==65.3.0 diff --git a/requirements/BUILD b/requirements/BUILD new file mode 100644 index 00000000000..fc2f8aa5d6b --- /dev/null +++ b/requirements/BUILD @@ -0,0 +1 @@ +exports_files(glob(["*.txt"])) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index dc6109ba877..f4a3f7b6bdf 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -1,5 +1,7 @@ # Dev dependencies -e .[all] -r tests-requirements.txt +-r docs-requirements.txt +-r frameworks-requirements.txt twine wheel diff --git a/requirements/tests-requirements.txt b/requirements/tests-requirements.txt index ae5104b34b8..8d71141cc5d 100644 --- a/requirements/tests-requirements.txt +++ b/requirements/tests-requirements.txt @@ -1,20 +1,20 @@ # Tests dependencies +pandas +pydantic +scikit-learn +yamllint==1.28.0 black[jupyter]==22.8.0 -codecov -coverage>=4.4 +codecov==2.1.12 +coverage[toml]==6.5.0 setuptools>=63 isort==5.10.1 -pydantic -pylint>=2.14.0 -pytest-cov>=3.0.0 -pytest>=6.2.0 -pytest-xdist[psutil] -pytest-asyncio -pandas -scikit-learn -imageio>=2.5.0 -pyarrow -build[virtualenv] >=0.8.0 -yamllint -protobuf>=3.5.0, <3.20,!=3.19.5 +pylint==2.15.3 +pytest-cov==4.0.0 +pytest==7.1.3 +pytest-xdist[psutil]==2.5.0 +pytest-asyncio==0.19.0 +imageio==2.22.1 +pyarrow==9.0.0 +build[virtualenv]==0.8.0 +protobuf==3.19.6 grpcio-tools>=1.41.0,<1.49.0,!=1.48.2