Skip to content

docs: add docstrings to create_repo function#682

Open
singhvishalkr wants to merge 1 commit intoDagsHub:mainfrom
singhvishalkr:docs/create-repo-docstrings
Open

docs: add docstrings to create_repo function#682
singhvishalkr wants to merge 1 commit intoDagsHub:mainfrom
singhvishalkr:docs/create-repo-docstrings

Conversation

@singhvishalkr
Copy link
Copy Markdown

Description

Adds comprehensive docstrings to the create_repo function, documenting parameters, return values, and usage.

Closes #222

How to test

from dagshub.upload import create_repo
help(create_repo)

Verify the docstring is displayed correctly.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

📝 Walkthrough

Walkthrough

Updated the docstring of the create_repo function in dagshub/upload/wrapper.py to clarify semantics around authenticated user ownership, organization parameters, default values, and conditional template behavior. Added explicit error documentation, usage examples, and references to external documentation. No runtime logic modifications.

Changes

Cohort / File(s) Summary
Documentation Enhancement
dagshub/upload/wrapper.py
Enhanced create_repo docstring with clarified parameter descriptions, documented default values (gitignores defaults to "Python", template switches from "none" to "custom" when customizations provided), explicit Raises section, usage examples, and notes referencing project templates documentation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A docstring so clear, now refined with care,
Parameters sparkle with defaults laid bare,
Examples and notes point the way,
No logic to twist, just clarity's sway! ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding docstrings to the create_repo function.
Description check ✅ Passed The description is directly related to the changeset, explaining that comprehensive docstrings were added to the create_repo function and providing testing instructions.
Linked Issues check ✅ Passed The pull request successfully addresses issue #222 by adding comprehensive docstrings to the create_repo function with parameter descriptions, return values, and usage examples.
Out of Scope Changes check ✅ Passed All changes are in-scope: only the create_repo docstring was modified with no unrelated or out-of-scope changes present.

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

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

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)
dagshub/upload/wrapper.py (1)

116-119: Clarify the exact “empty repo” call pattern.

Consider explicitly stating that template="none" alone is not enough with current defaults (gitignores="Python"), and users must also pass empty gitignores/license/readme to keep it empty.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a08f0b9-08e3-4cfe-8812-885d5c3bbb31

📥 Commits

Reviewing files that changed from the base of the PR and between af5fe5d and a155f51.

📒 Files selected for processing (1)
  • dagshub/upload/wrapper.py
📜 Review details
🔇 Additional comments (1)
dagshub/upload/wrapper.py (1)

92-138: Great docstring expansion and behavior alignment.

This is a strong documentation upgrade: parameter semantics, template behavior, failure modes, and usage examples are clear and match the implementation.

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.

Docstrings for the create_repo function

1 participant