From 6931778ca418d4d44ad5cf613301289680278bb2 Mon Sep 17 00:00:00 2001 From: Jeff Raubitschek Date: Wed, 17 Aug 2022 15:09:05 -0700 Subject: [PATCH 1/2] Require sdk-team to approve API changes --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ae9ec6be68a..46e01737747 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,4 @@ # GraphQL changes need extra scrutiny /wandb/sdk/internal/internal_api.py @wandb/sdk-team +# Changing interfaces need extra scrutiny +/tests/unit_tests/test_library_public.py @wandb/sdk-team From caf9d96354ddc3792b8a503e858e7369f871965f Mon Sep 17 00:00:00 2001 From: Jeff Raubitschek Date: Wed, 17 Aug 2022 15:48:02 -0700 Subject: [PATCH 2/2] add wandb_init param check --- tests/unit_tests/test_library_public.py | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/unit_tests/test_library_public.py b/tests/unit_tests/test_library_public.py index 84fccddf296..fe3e400bd96 100644 --- a/tests/unit_tests/test_library_public.py +++ b/tests/unit_tests/test_library_public.py @@ -8,6 +8,8 @@ - deprecate ones that were public but we want to remove """ +import inspect + import wandb SYMBOLS_ROOT_DATATYPES = { @@ -259,3 +261,37 @@ def test_library_config(): symbol_public_set - SYMBOLS_CONFIG - SYMBOLS_CONFIG_OTHER - SYMBOLS_TYPING ) assert symbol_unknown == set() + + +SYMBOLS_WANDB_INIT = { + "force", + "settings", + "project", + "tensorboard", + "config", + "allow_val_change", + "id", + "monitor_gym", + "magic", + "group", + "resume", + "dir", + "anonymous", + "mode", + "config_exclude_keys", + "tags", + "name", + "entity", + "sync_tensorboard", + "config_include_keys", + "save_code", + "notes", + "job_type", + "reinit", +} + + +def test_library_init(): + init_params = set(inspect.signature(wandb.init).parameters) + print("init_params", init_params) + assert init_params == SYMBOLS_WANDB_INIT