Skip to content

docs: add PyJanitor interoperability example - #179

Merged
JohnnyWilson16 merged 2 commits into
FreshCode-Org:mainfrom
WilliamK112:agent/pyjanitor-interop
Aug 14, 2026
Merged

docs: add PyJanitor interoperability example#179
JohnnyWilson16 merged 2 commits into
FreshCode-Org:mainfrom
WilliamK112:agent/pyjanitor-interop

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a runnable PyJanitor interoperability example using one small inline DataFrame.

  • Demonstrates PyJanitor-first and FreshData-first workflows.
  • Explains the responsibility boundary: explicit reshaping/transforms in PyJanitor, evidence-based repair and audit reporting in FreshData.
  • Keeps PyJanitor optional and documents the verified pyjanitor<0.32 compatibility line for FreshData 2.0's pandas range.
  • Links the example from both example indexes and records it under Unreleased.

Closes #9

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor / Style / Performance improvement

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Type checks (mypy) and linter checks (ruff) pass locally

Validation

  • python examples/10_pyjanitor_interop.py (pandas 2.2.3, PyJanitor 0.31.0)
  • ruff check .
  • mkdocs build --strict
  • mypy examples/10_pyjanitor_interop.py
  • pytest -m "not online and not large": 4,050 passed, 6 skipped, 12 deselected; 93.17% coverage. One timing-sensitive benchmark missed its throughput baseline while the machine was loaded, then passed its immediate isolated rerun in 0.11s.

The full existing mypy src/freshdata run reports two errors in unchanged src/freshdata/enterprise/interface.py; the new example type-checks cleanly.

AI assistance

I used Codex to help implement and validate this change. I reviewed the resulting diff and take responsibility for it.

Summary by CodeRabbit

  • New Features

    • Added an interoperability example demonstrating FreshData and PyJanitor in either workflow order.
    • Included sample cleaning, enrichment, and audit-report output.
  • Documentation

    • Added setup and execution guidance for the interoperability example.
    • Documented PyJanitor as an optional dependency and noted compatibility requirements.
    • Updated the examples index and unreleased changelog with the new example.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc47caf8-888a-4028-83d4-64d28fd3f3e9

📥 Commits

Reviewing files that changed from the base of the PR and between 371ec1d and 9c2f6f4.

📒 Files selected for processing (1)
  • examples/10_pyjanitor_interop.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/10_pyjanitor_interop.py

📝 Walkthrough

Walkthrough

Adds a runnable PyJanitor interoperability example. The example demonstrates both FreshData/PyJanitor orderings, prints cleaned frames and reports, and documents the optional dependency and execution commands.

Changes

PyJanitor interoperability

Layer / File(s) Summary
Interoperability workflows
examples/10_pyjanitor_interop.py
Adds inline sample data and functions that run PyJanitor before or after FreshData cleaning. The executable workflow prints frames and audit summaries.
Example documentation and release notes
docs/examples.md, examples/README.md, CHANGELOG.md
Adds the example to documentation indexes, describes both workflow orderings, records the optional pyjanitor<0.32 requirement, and adds an Unreleased changelog entry.

Estimated code review effort: 2 (Simple) | ~15 minutes

Mergeability Score: ⚪ Minimal · up to 9c2f6

This PR adds a localized PyJanitor interoperability example and documentation links; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant SampleData
  participant PyJanitor
  participant FreshData
  participant AuditReport
  SampleData->>PyJanitor: build and reshape columns
  PyJanitor->>FreshData: pass normalized frame
  FreshData->>AuditReport: return cleaned frame and report
  SampleData->>FreshData: pass original-label frame
  FreshData->>PyJanitor: pass cleaned frame
  PyJanitor->>AuditReport: preserve report with enriched frame
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: adding a PyJanitor interoperability example.
Description check ✅ Passed The description includes the change summary, issue reference, change type, validation details, and checklist status.
Linked Issues check ✅ Passed The PR satisfies issue [#9] by adding an inline DataFrame example, documenting tool responsibilities, and validating a strict MkDocs build.
Out of Scope Changes check ✅ Passed The changes remain within scope by documenting and adding the requested PyJanitor interoperability example and related changelog entries.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@WilliamK112
WilliamK112 marked this pull request as ready for review August 12, 2026 19:03
@strix-security

Copy link
Copy Markdown
Contributor

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

So far, Strix has reviewed 36 pull requests, surfaced 3 security issues (1 critical/high) and blocked 1 risky merge across this workspace.

@WilliamK112

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 371ec1d771

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/10_pyjanitor_interop.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/10_pyjanitor_interop.py`:
- Around line 43-48: Update the id_columns argument in freshdata_then_pyjanitor
to use the normalized identifier name customer_id instead of the
whitespace-padded label, so the explicit identifier configuration matches
FreshData’s normalized columns.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bf1c9b61-1f58-4f1f-91dc-c0ea2963ccce

📥 Commits

Reviewing files that changed from the base of the PR and between 38f24c1 and 371ec1d.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • docs/examples.md
  • examples/10_pyjanitor_interop.py
  • examples/README.md

Comment thread examples/10_pyjanitor_interop.py

@JohnnyWilson16 JohnnyWilson16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean and concise example demonstrating the interoperability orderings between PyJanitor and FreshData.

Thanks again for the continuous contributions @WilliamK112! 👍

@JohnnyWilson16
JohnnyWilson16 merged commit 1e0792f into FreshCode-Org:main Aug 14, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a pyjanitor interoperability example

2 participants