From a38758cc2c12914c07b3f0fa72cb26f96b73e6f2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:43:40 +0000 Subject: [PATCH 1/2] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 24.10.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...26.1.0) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.14.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.4...v0.14.14) - [github.com/abravalheri/validate-pyproject: v0.23 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.23...v0.25) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.1) - [github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.36.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.30.0...0.36.1) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 30ca2e8..0d111e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,14 +20,14 @@ repos: # - tags # - slideshow # - -- - - repo: https://github.com/psf/black - rev: 24.10.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black - id: black-jupyter - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v5.0.0" + rev: "v6.0.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -50,14 +50,14 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.8.4" + rev: "v0.14.14" hooks: - id: ruff args: ["--fix", "--show-fixes"] - id: ruff-format - repo: https://github.com/abravalheri/validate-pyproject - rev: "v0.23" + rev: "v0.25" hooks: - id: validate-pyproject additional_dependencies: ["validate-pyproject-schema-store[all]"] @@ -70,13 +70,13 @@ repos: args: [--prose-wrap=always] - repo: https://github.com/codespell-project/codespell - rev: "v2.3.0" + rev: "v2.4.1" hooks: - id: codespell args: ["-L", "precessing"] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: "0.30.0" + rev: "0.36.1" hooks: - id: check-dependabot - id: check-github-workflows From ad340062dfedca5d987230d0d223e9fb15e1731f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:43:54 +0000 Subject: [PATCH 2/2] style: pre-commit fixes --- .../module1/4-algorithms-prompting-with-olmo.ipynb | 12 ++++-------- AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb | 6 ++---- .../module2/2-astrophysics-prompting-with-olmo.ipynb | 12 ++++-------- Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb | 6 ++---- demos/olmo-rag/index.ipynb | 6 ++---- resources/download_data.py | 1 - 6 files changed, 14 insertions(+), 29 deletions(-) diff --git a/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb b/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb index 16764d4..238bcb2 100644 --- a/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb +++ b/AI_Postdoc_Workshop/module1/4-algorithms-prompting-with-olmo.ipynb @@ -175,12 +175,10 @@ "source": [ "# Test the prompt you want to send to OLMo.\n", "question = \"What is the best method for multiplying large numbers?\"\n", - "input_content = textwrap.dedent(\n", - " f\"\"\"\\\n", + "input_content = textwrap.dedent(f\"\"\"\\\n", " You are an algorithms expert. Please answer the following question on algorithms.\n", " Question: {question}\n", - "\"\"\"\n", - ")\n", + "\"\"\")\n", "input_messages = [\n", " {\n", " \"role\": \"user\",\n", @@ -271,13 +269,11 @@ "metadata": {}, "outputs": [], "source": [ - "input_prompt_template = textwrap.dedent(\n", - " \"\"\"\\\n", + "input_prompt_template = textwrap.dedent(\"\"\"\\\n", "{instruction}\n", "\n", "Question: {question}\n", - "\"\"\"\n", - ")" + "\"\"\")" ] }, { diff --git a/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb b/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb index 294c22c..5eaf661 100644 --- a/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb +++ b/AI_Postdoc_Workshop/module2/2-olmo-chat-rag.ipynb @@ -342,15 +342,13 @@ "metadata": {}, "outputs": [], "source": [ - "input_prompt_template = textwrap.dedent(\n", - " \"\"\"\\\n", + "input_prompt_template = textwrap.dedent(\"\"\"\\\n", "You are an algorithms expert. Please answer the question on algorithms based on the following context:\n", "\n", "{context}\n", "\n", "Question: {question}\n", - "\"\"\"\n", - ")" + "\"\"\")" ] }, { diff --git a/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb b/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb index 797bdf2..2ddb5ef 100644 --- a/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb +++ b/Archive/SciPy2024/module2/2-astrophysics-prompting-with-olmo.ipynb @@ -204,12 +204,10 @@ "source": [ "# Test the prompt you want to send to OLMo.\n", "question = \"What is dark matter?\"\n", - "input_content = textwrap.dedent(\n", - " f\"\"\"\\\n", + "input_content = textwrap.dedent(f\"\"\"\\\n", " You are an astrophysics expert. Please answer the following question on astrophysics.\n", " Question: {question}\n", - "\"\"\"\n", - ")\n", + "\"\"\")\n", "input_messages = [\n", " {\n", " \"role\": \"user\",\n", @@ -330,13 +328,11 @@ "metadata": {}, "outputs": [], "source": [ - "input_prompt_template = textwrap.dedent(\n", - " \"\"\"\\\n", + "input_prompt_template = textwrap.dedent(\"\"\"\\\n", "{instruction}\n", "\n", "Question: {question}\n", - "\"\"\"\n", - ")" + "\"\"\")" ] }, { diff --git a/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb b/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb index 6fde82d..072853c 100644 --- a/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb +++ b/Archive/SciPy2024/module3/1-olmo-chat-rag.ipynb @@ -364,15 +364,13 @@ "metadata": {}, "outputs": [], "source": [ - "input_prompt_template = textwrap.dedent(\n", - " \"\"\"\\\n", + "input_prompt_template = textwrap.dedent(\"\"\"\\\n", "You are an astrophysics expert. Please answer the question on astrophysics based on the following context:\n", "\n", "{context}\n", "\n", "Question: {question}\n", - "\"\"\"\n", - ")" + "\"\"\")" ] }, { diff --git a/demos/olmo-rag/index.ipynb b/demos/olmo-rag/index.ipynb index 6a51657..943f583 100644 --- a/demos/olmo-rag/index.ipynb +++ b/demos/olmo-rag/index.ipynb @@ -806,15 +806,13 @@ "metadata": {}, "outputs": [], "source": [ - "input_prompt_template = textwrap.dedent(\n", - " \"\"\"\\\n", + "input_prompt_template = textwrap.dedent(\"\"\"\\\n", "You are an astrophysics expert. Please answer the question on astrophysics based on the following context:\n", "\n", "{context}\n", "\n", "Question: {question}\n", - "\"\"\"\n", - ")" + "\"\"\")" ] }, { diff --git a/resources/download_data.py b/resources/download_data.py index 0fdc122..415e0eb 100644 --- a/resources/download_data.py +++ b/resources/download_data.py @@ -1,5 +1,4 @@ import ssec_tutorials - if __name__ == "__main__": ssec_tutorials.download_all_tutorial_data()