Skip to content

Conversation

@sean2077
Copy link
Owner

Overview

This PR modernizes the jsonpath-python project with significant improvements to infrastructure, features, and bug fixes.

Major Changes

🏗️ Infrastructure Modernization

  • Migrate from setup.py to pyproject.toml with uv package manager
  • Add GitHub Actions CI/CD workflows (testing, linting, automated releases)
  • Configure semantic-release for automated versioning and changelog generation
  • Add pre-commit hooks with ruff for code quality
  • Reorganize test structure (test/tests/)

✨ New Features

  • Update Function ([FEAT] Update Function #12): Add JSONPath.update() method to modify JSON data using JSONPath expressions
    • Support both static values and callback functions
    • Handle complex paths including filters, slices, and recursive descent
  • Enhanced Filter Support (Contains and =~ operators for filtering #13): Add in operator and regex matching (=~) in filter expressions

🐛 Bug Fixes

📚 Documentation

  • Add "Why jsonpath-python?" section to README
  • Document update function usage
  • Clarify feature comparisons with other libraries
  • Update examples and improve clarity

Breaking Changes

None - This is backward compatible.

Testing

  • All existing tests pass
  • Added comprehensive test coverage for new update function
  • Added test cases for bug fixes

@sean2077 sean2077 requested a review from Copilot November 23, 2025 14:24
@sean2077 sean2077 self-assigned this Nov 23, 2025
@sean2077 sean2077 merged commit 4f07baf into main Nov 23, 2025
18 checks passed
Copilot finished reviewing on behalf of sean2077 November 23, 2025 14:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the jsonpath-python project with a comprehensive infrastructure overhaul and important feature additions. The changes migrate from legacy setup.py to modern pyproject.toml, introduce a new update() method for modifying JSON data, and fix multiple reported bugs in path handling, filtering, and sorting operations.

Key Changes

  • Infrastructure: Migration to pyproject.toml with uv package manager, addition of CI/CD workflows, and test directory reorganization
  • New Feature: JSONPath.update() method for in-place JSON modification with support for both static values and callback functions
  • Bug Fixes: Fixed path output format, filter expression handling with bracket notation and quoted keys, field extractor null filtering, and mixed-type sorting errors

Reviewed changes

Copilot reviewed 18 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
uv.lock Dependency lockfile with multiple package versions (contains future-dated version references that need verification)
pyproject.toml Modern Python project configuration with build system, dependencies, and development tools
tests/test_update.py Comprehensive test suite for the new update() functionality
tests/test_issues.py Test cases validating bug fixes for issues #9, #10, #13, #15, #16, #17
tests/test_jsonpath.py Simplified existing test structure
tests/conftest.py Updated test fixtures with corrected path format expectations
tests/data/*.json Test data files relocated to tests directory
jsonpath/init.py Simplified module interface with clean imports
jsonpath/jsonpath.py Core implementation with update() method, path format changes, and bug fixes
setup.py Removed in favor of pyproject.toml

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant