Skip to content

fix: rename notebook to load#189

Merged
jpopesculian merged 1 commit into
mainfrom
jpop/rename2load
May 29, 2026
Merged

fix: rename notebook to load#189
jpopesculian merged 1 commit into
mainfrom
jpop/rename2load

Conversation

@jpopesculian
Copy link
Copy Markdown
Contributor

@jpopesculian jpopesculian commented Apr 24, 2026

Summary by CodeRabbit

Release Notes

  • Breaking Changes
    • The notebook() function has been renamed to load(). Functionality remains unchanged; update your code to use the new function name.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

📝 Walkthrough

Walkthrough

The PR renames the public wrapper function from notebook to load in the notebook module and updates the corresponding re-export at the package level, making the new name available as the public API entry point while preserving all function parameters and behavior.

Changes

Public API function rename

Layer / File(s) Summary
Rename notebook wrapper to load
python/aqora/notebook.py, python/aqora/__init__.py
The notebook function is renamed to load with parameters and behavior unchanged. The package-level re-export is updated to expose the new function name.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A hop, a skip, a name so new,
From notebook to load, we bid adieu,
The wrapper stays strong, tried and true,
Just wearing a fresher, sleeker shoe!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: renaming the public API function from 'notebook' to 'load' across the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jpop/rename2load

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 and usage tips.

Copy link
Copy Markdown

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

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: 9a6087e502

ℹ️ 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 python/aqora/notebook.py
@@ -96,7 +96,7 @@ def _load_module(owner: str, slug: str, filename: str, path: Path) -> ModuleType
return module


def notebook(
def load(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve notebook alias for backward compatibility

Renaming the public function from notebook to load removes an existing API entry point and will break callers that upgraded from the previous release and still do from aqora_cli.notebook import notebook (or import notebook from aqora_cli). In those environments, imports now fail immediately, so this should keep a notebook = load alias (optionally deprecated) rather than hard-renaming the symbol in a fix commit.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 `@python/aqora_cli/__init__.py`:
- Line 4: Add an explicit __all__ export list to this package init to match
other modules: update python/aqora_cli/__init__.py (which currently imports load
from .notebook) to declare __all__ = ["load"] (and include any additional public
names you intend to export). Ensure the exported symbol name matches the
imported function name load so the package exposes the public API consistently
with modules like pyarrow.py and fsspec.py.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1a3fcfad-47ac-4e73-95dc-93833018397d

📥 Commits

Reviewing files that changed from the base of the PR and between 567e19d and a688df8.

📒 Files selected for processing (2)
  • python/aqora_cli/__init__.py
  • python/aqora_cli/notebook.py

Comment thread python/aqora/__init__.py
@@ -1,7 +1,7 @@
from typing_extensions import Any, TypedDict, override

from . import _aqora_cli
from .notebook import notebook
from .notebook import load
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if __all__ is defined and whether it needs to include 'load'

# Check for __all__ definition in __init__.py
rg -n '__all__' python/aqora_cli/__init__.py -A10

# If __all__ exists, verify 'load' is included
ast-grep --pattern '__all__ = $$$'

Repository: aqora-io/cli

Length of output: 248


Add explicit __all__ definition to the module's __init__.py to properly expose the public API.

The load import is correct, but python/aqora_cli/__init__.py lacks an __all__ definition. Other modules in this package (e.g., pyarrow.py, fsspec.py) explicitly define their public API. Add __all__ to python/aqora_cli/__init__.py to include load and any other intended public exports, ensuring consistency across the package.

🤖 Prompt for 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.

In `@python/aqora_cli/__init__.py` at line 4, Add an explicit __all__ export list
to this package init to match other modules: update python/aqora_cli/__init__.py
(which currently imports load from .notebook) to declare __all__ = ["load"] (and
include any additional public names you intend to export). Ensure the exported
symbol name matches the imported function name load so the package exposes the
public API consistently with modules like pyarrow.py and fsspec.py.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
python/aqora/notebook.py (1)

99-118: ⚡ Quick win

Renaming public entry point — no internal aqora.notebook(...) references found; alias only matters for external callers.

  • No lingering call sites/imports for the old aqora.notebook(...) name in this repo; remaining risk is external API consumers relying on the old public symbol.
  • Consider a deprecated alias to avoid breaking documented/packaged usage.
♻️ Optional backward-compatible alias
 def load(
     workspace: str,
     *,
     filename: str | None = None,
     aqora_url: str | None = None,
     aqora_auth: bool = True,
     force_download: bool = False,
 ) -> ModuleType | Coroutine[Any, Any, ModuleType]:
     ...
     return coro
+
+
+# Deprecated alias; remove after the deprecation window.
+notebook = load
🤖 Prompt for 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.

In `@python/aqora/notebook.py` around lines 99 - 118, Add a deprecated alias for
the old public entrypoint name so external callers using aqora.notebook(...)
won't break: create a top-level symbol named notebook that references the
existing load function (Module: load) and emit a deprecation warning when
notebook is called (use warnings.warn with DeprecationWarning) recommending
aqora.load; keep notebook as a thin wrapper that forwards all args to load so
internal behavior is unchanged.
🤖 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.

Nitpick comments:
In `@python/aqora/notebook.py`:
- Around line 99-118: Add a deprecated alias for the old public entrypoint name
so external callers using aqora.notebook(...) won't break: create a top-level
symbol named notebook that references the existing load function (Module: load)
and emit a deprecation warning when notebook is called (use warnings.warn with
DeprecationWarning) recommending aqora.load; keep notebook as a thin wrapper
that forwards all args to load so internal behavior is unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46c2a5d8-9e0f-4f0c-b30e-e4b81f8478d0

📥 Commits

Reviewing files that changed from the base of the PR and between a688df8 and c2d803b.

📒 Files selected for processing (2)
  • python/aqora/__init__.py
  • python/aqora/notebook.py

@jpopesculian jpopesculian merged commit dcee55e into main May 29, 2026
15 checks passed
@jpopesculian jpopesculian deleted the jpop/rename2load branch May 29, 2026 13:55
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.

1 participant