Fix cargo warning about conflicting names between the cli and the oxen-py crate#399
Fix cargo warning about conflicting names between the cli and the oxen-py crate#399
Conversation
… and oxen-py produce an artifact with the same name that will be disallowed in the future
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR renames the Rust extension module from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@oxen-python/python/oxen/oxen_fs.py`:
- Line 12: Several files still import from the removed module path `..oxen`;
update the imports in the diff modules to use the new relative module `._oxen`
and import the same symbols (e.g., PyEntry) so runtime ImportError is avoided.
Specifically, open diff/diff.py, diff/text_diff.py, diff/tabular_diff.py and
diff/line_diff.py and replace any `from ..oxen import ...` lines with `from
._oxen import ...`, keeping the imported names identical to preserve existing
usage. Ensure there are no remaining references to `..oxen` across those files
and run tests to verify imports resolve.
🪄 Autofix (Beta)
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9d7fd3e0-654d-4595-82c5-5554bbc7bd35
📒 Files selected for processing (11)
crates/oxen-py/Cargo.tomlcrates/oxen-py/src/lib.rsoxen-python/python/oxen/__init__.pyoxen-python/python/oxen/auth.pyoxen-python/python/oxen/config.pyoxen-python/python/oxen/data_frame.pyoxen-python/python/oxen/df_utils.pyoxen-python/python/oxen/oxen_fs.pyoxen-python/python/oxen/remote_repo.pyoxen-python/python/oxen/user.pyoxen-python/python/oxen/workspace.py
|
|
||
| from .remote_repo import RemoteRepo | ||
| from .oxen import PyEntry | ||
| from ._oxen import PyEntry |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify if diff/diff.py still uses the old import path
rg -n "from \.\.(\.)?oxen import" oxen-python/python/oxen/
# Also check for any other files that might still use the old import pattern
rg -n "from \.oxen import" oxen-python/python/oxen/Repository: Oxen-AI/Oxen
Length of output: 452
Update imports in all diff/ files to use ._oxen module.
The change in oxen_fs.py is correct, but several files in the diff/ subdirectory still import from the old ..oxen module path:
diff/diff.py(lines 39-40)diff/text_diff.py(line 1)diff/tabular_diff.py(line 1)diff/line_diff.py(line 1)
These imports will fail at runtime with ImportError since the old .oxen module no longer exists. Update them all to use ._oxen.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@oxen-python/python/oxen/oxen_fs.py` at line 12, Several files still import
from the removed module path `..oxen`; update the imports in the diff modules to
use the new relative module `._oxen` and import the same symbols (e.g., PyEntry)
so runtime ImportError is avoided. Specifically, open diff/diff.py,
diff/text_diff.py, diff/tabular_diff.py and diff/line_diff.py and replace any
`from ..oxen import ...` lines with `from ._oxen import ...`, keeping the
imported names identical to preserve existing usage. Ensure there are no
remaining references to `..oxen` across those files and run tests to verify
imports resolve.
Use a unique python name to avoid the warning from Cargo that the cli and oxen-py produce an artifact with the same name that will be disallowed in the future.
This doesn't change anything from a Python user's perspective. They will still do
import oxen, as the python module is namedoxen.