From 34774ccb6d300a4bca8b5316407ab9735b4a5f9a Mon Sep 17 00:00:00 2001 From: Zanie Date: Wed, 27 Dec 2023 11:04:41 -0600 Subject: [PATCH 1/4] Add jupyter notebooks to ecosystem checks --- python/ruff-ecosystem/ruff_ecosystem/defaults.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/python/ruff-ecosystem/ruff_ecosystem/defaults.py b/python/ruff-ecosystem/ruff_ecosystem/defaults.py index 7c3aaa0214a63..ea6a7c64f688e 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/defaults.py +++ b/python/ruff-ecosystem/ruff_ecosystem/defaults.py @@ -9,6 +9,8 @@ Repository, ) +JUPYTER_NOTEBOOK_SELECT = "A,E703,F704,B015,B018,D100" + # TODO(zanieb): Consider exporting this as JSON and loading from there instead DEFAULT_TARGETS = [ Project(repo=Repository(owner="DisnakeDev", name="disnake", ref="master")), @@ -93,4 +95,15 @@ repo=Repository(owner="zulip", name="zulip", ref="main"), check_options=CheckOptions(select="ALL"), ), + # Jupyter Notebooks + Project( + repo=Repository(owner="huggingface", name="notebooks", ref="main"), + check_options=CheckOptions(select=JUPYTER_NOTEBOOK_SELECT), + config_overrides={"include": ["*.ipynb"]}, + ), + Project( + repo=Repository(owner="openai", name="openai-cookbook", ref="main"), + check_options=CheckOptions(select=JUPYTER_NOTEBOOK_SELECT), + config_overrides={"include": ["*.ipynb"]}, + ), ] From fa7b9cb828755f7a07fbab8d63b920e630bf2e29 Mon Sep 17 00:00:00 2001 From: Zanie Date: Fri, 29 Dec 2023 11:05:22 -0600 Subject: [PATCH 2/4] Use fixed fork of `huggingface/notebooks` --- python/ruff-ecosystem/ruff_ecosystem/defaults.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/ruff-ecosystem/ruff_ecosystem/defaults.py b/python/ruff-ecosystem/ruff_ecosystem/defaults.py index ea6a7c64f688e..ee98b2d56c12f 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/defaults.py +++ b/python/ruff-ecosystem/ruff_ecosystem/defaults.py @@ -97,7 +97,12 @@ ), # Jupyter Notebooks Project( - repo=Repository(owner="huggingface", name="notebooks", ref="main"), + # fork of `huggingface` without syntax errors in notebooks + repo=Repository( + owner="zanieb", + name="notebooks", + ref="68cd6fa1a2831c5189f85257c13d691cb76292db", + ), check_options=CheckOptions(select=JUPYTER_NOTEBOOK_SELECT), config_overrides={"include": ["*.ipynb"]}, ), From 56cf7f9b8dbd3b2658b5d938ec296df8dc0f6b66 Mon Sep 17 00:00:00 2001 From: Zanie Date: Fri, 29 Dec 2023 11:17:24 -0600 Subject: [PATCH 3/4] Rename fork --- python/ruff-ecosystem/ruff_ecosystem/defaults.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ruff-ecosystem/ruff_ecosystem/defaults.py b/python/ruff-ecosystem/ruff_ecosystem/defaults.py index ee98b2d56c12f..91d322b1a73c1 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/defaults.py +++ b/python/ruff-ecosystem/ruff_ecosystem/defaults.py @@ -100,7 +100,7 @@ # fork of `huggingface` without syntax errors in notebooks repo=Repository( owner="zanieb", - name="notebooks", + name="huggingface-notebooks", ref="68cd6fa1a2831c5189f85257c13d691cb76292db", ), check_options=CheckOptions(select=JUPYTER_NOTEBOOK_SELECT), From 37a7152b28d873c009d44945df5dcd84fcdcd964 Mon Sep 17 00:00:00 2001 From: Zanie Date: Fri, 29 Dec 2023 14:26:16 -0600 Subject: [PATCH 4/4] Use branch instead of commit --- python/ruff-ecosystem/ruff_ecosystem/defaults.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ruff-ecosystem/ruff_ecosystem/defaults.py b/python/ruff-ecosystem/ruff_ecosystem/defaults.py index 91d322b1a73c1..285f2eb76d581 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/defaults.py +++ b/python/ruff-ecosystem/ruff_ecosystem/defaults.py @@ -101,7 +101,7 @@ repo=Repository( owner="zanieb", name="huggingface-notebooks", - ref="68cd6fa1a2831c5189f85257c13d691cb76292db", + ref="zb/fix-syntax", ), check_options=CheckOptions(select=JUPYTER_NOTEBOOK_SELECT), config_overrides={"include": ["*.ipynb"]},