From 2a4bd0e40db748e77871065940e2b762d1681e08 Mon Sep 17 00:00:00 2001 From: Andrey Maslennikov Date: Mon, 9 Sep 2024 10:40:17 +0200 Subject: [PATCH 1/2] Add missing k8s package into package dependencies. 1. Without it, "kubernetes" package is missing after installation. 2. Added a test to make sure requirements.txt and pyproject.tom are aligned for dependencies list. --- pyproject.toml | 1 + tests/test_package.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/test_package.py diff --git a/pyproject.toml b/pyproject.toml index 64d8b2cc1..4d9d2d917 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ dependencies = [ "pandas==2.2.1", "tbparse==0.0.8", "toml==0.10.2", + "kubernetes==30.1.0", ] [build-system] diff --git a/tests/test_package.py b/tests/test_package.py new file mode 100644 index 000000000..2b9135b0e --- /dev/null +++ b/tests/test_package.py @@ -0,0 +1,12 @@ +import toml + + +def test_requirements(): + """ + Test that the requirements in the requirements.txt file are the same as the requirements in the pyproject.toml file. + """ + with open("requirements.txt", "r") as f: + requirements_txt = sorted(f.read().splitlines()) + with open("pyproject.toml", "r") as f: + requirements_toml = sorted(toml.load(f)["project"]["dependencies"]) + assert requirements_txt == requirements_toml From 134d974c7c3d5efa588376b5fd339bc40dde7d6f Mon Sep 17 00:00:00 2001 From: Andrey Maslennikov Date: Mon, 9 Sep 2024 10:44:34 +0200 Subject: [PATCH 2/2] Add copyright --- tests/test_package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_package.py b/tests/test_package.py index 2b9135b0e..eeb0344e8 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -1,3 +1,19 @@ +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import toml