Skip to content

Conversation

SAKURA-CAT
Copy link
Member

@SAKURA-CAT SAKURA-CAT commented Jun 19, 2025

Description

@SAKURA-CAT SAKURA-CAT requested review from Zeyi-Lin and Copilot June 19, 2025 07:58
@SAKURA-CAT SAKURA-CAT self-assigned this Jun 19, 2025
@SAKURA-CAT SAKURA-CAT added 🐛 bug Something isn't working 💪 enhancement New feature or request labels Jun 19, 2025
@SAKURA-CAT SAKURA-CAT marked this pull request as ready for review June 19, 2025 07:58
Copy link

@Copilot 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 pull request addresses missing type definition issues noted in #1102 and consolidates the authentication logic by moving it from swanlab.api to swanlab.core_python.

  • Changed multiple import paths to use swanlab.core_python.auth instead of swanlab.api.auth.
  • Updated type annotations and function references in both production and test files.
  • Removed outdated API authentication modules.

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tutils/setup.py Updated import and type annotations for authentication.
test/unit/core_python/test_client.py Updated authentication import references.
test/unit/core_python/auth/test_api_key.py Updated authentication function calls and type hints.
swanlab/data/utils.py Replaced swanlab.api authentication calls with core_python.auth calls.
swanlab/data/sdk.py Updated authentication function usage for client initialization.
swanlab/data/callbacker/cloud.py Changed authentication call to use core_python.auth.
swanlab/core_python/client/init.py Updated type annotations to use auth.LoginInfo and authentication calls.
swanlab/core_python/auth/providers/api_key.py Refactored authentication provider with updated header comments.
swanlab/core_python/auth/init.py Added new module for centralized authentication export.
swanlab/cli/commands/sync/init.py Updated authentication function calls in CLI sync command.
swanlab/cli/commands/auth/login.py Updated authentication function call for CLI login.
swanlab/api/openapi/main.py Updated authentication call to use core_python.auth.
swanlab/api/openapi/base.py Updated authentication call in session refresh logic.
swanlab/api/info.py Removed outdated API authentication file.
swanlab/api/auth/init.py Removed obsolete authentication exports.
swanlab/api/init.py Removed deprecated API module for authentication.
Comments suppressed due to low confidence (1)

swanlab/core_python/auth/providers/api_key.py:3

  • The file header indicates '@file: session.py', which does not match the actual file name 'api_key.py'. Consider updating the header to accurately reflect the file name.
@file: session.py

@SAKURA-CAT SAKURA-CAT merged commit e13bb5e into main Jun 19, 2025
5 checks passed
@SAKURA-CAT SAKURA-CAT deleted the fix/core-python branch June 19, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 💪 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants