From 86bc4d309ed39b216e8f4d6020734ad7f20dc49d Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Mon, 19 Jan 2026 06:00:10 +0000 Subject: [PATCH] feat: Replace archived Open-XML-PowerTools with Clippit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Swap Open-XML-PowerTools (archived 5+ years) for Clippit (actively maintained) - Clippit is a maintained fork by sergey-tihon with same API surface - No breaking changes to Python API - Bump version to 0.0.5 - Fix test fixture path resolution Clippit: https://github.com/sergey-tihon/Clippit - Active development (2019-2025) - Published to NuGet - Targets .NET Standard 2.0 / .NET 8 🐾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta --- csproj/Program.cs | 3 ++- csproj/redlines.csproj | 3 +-- src/python_redlines/__about__.py | 2 +- tests/test_openxml_differ.py | 7 +++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/csproj/Program.cs b/csproj/Program.cs index 1e65780..9a73417 100644 --- a/csproj/Program.cs +++ b/csproj/Program.cs @@ -1,6 +1,7 @@ using System; using System.IO; -using OpenXmlPowerTools; +using Clippit; +using Clippit.Word; using DocumentFormat.OpenXml.Packaging; class Program diff --git a/csproj/redlines.csproj b/csproj/redlines.csproj index 8b2abdd..3ea6f1d 100644 --- a/csproj/redlines.csproj +++ b/csproj/redlines.csproj @@ -8,8 +8,7 @@ - - + diff --git a/src/python_redlines/__about__.py b/src/python_redlines/__about__.py index b83c8b5..1d20296 100644 --- a/src/python_redlines/__about__.py +++ b/src/python_redlines/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2024-present U.N. Owen # # SPDX-License-Identifier: MIT -__version__ = "0.0.4" +__version__ = "0.0.5" diff --git a/tests/test_openxml_differ.py b/tests/test_openxml_differ.py index 96ea1d9..2305bb2 100644 --- a/tests/test_openxml_differ.py +++ b/tests/test_openxml_differ.py @@ -6,18 +6,21 @@ def load_docx_bytes(file_path): + # Handle relative paths from test directory + if not os.path.isabs(file_path): + file_path = os.path.join(os.path.dirname(__file__), file_path) with open(file_path, 'rb') as file: return file.read() @pytest.fixture def original_docx(): - return load_docx_bytes('tests/fixtures/original.docx') + return load_docx_bytes('fixtures/original.docx') @pytest.fixture def modified_docx(): - return load_docx_bytes('tests/fixtures/modified.docx') + return load_docx_bytes('fixtures/modified.docx') def test_run_redlines_with_real_files(original_docx, modified_docx):