Skip to content

chore: refactor server structure#558

Merged
hittyt merged 1 commit intoalibaba:mainfrom
ninan-nn:feature/fix_server_pgk
Mar 24, 2026
Merged

chore: refactor server structure#558
hittyt merged 1 commit intoalibaba:mainfrom
ninan-nn:feature/fix_server_pgk

Conversation

@ninan-nn
Copy link
Copy Markdown
Collaborator

@ninan-nn ninan-nn commented Mar 24, 2026

Summary

  • Fixes opensandbox-server的安装位置存在问题 #556 by refactoring the server package layout to use opensandbox_server as the only published Python package.
  • Move packaged example configs into opensandbox_server/examples and load them via importlib.resources.
  • Remove the legacy src/ package layout and update server docs, Docker build paths, and tests to the new package path.

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Validation run locally:

  • ./.venv/bin/python -m pytest -q
  • Result: 671 passed
  • uv build --wheel
  • Verified the built wheel contains:
    • opensandbox_server/examples/example.config.toml
    • opensandbox_server/examples/example.config.zh.toml
    • opensandbox_server/examples/example.config.k8s.toml
    • opensandbox_server/examples/example.config.k8s.zh.toml
    • opensandbox_server/examples/example.batchsandbox-template.yaml

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Impact:

  • The legacy src Python package path is removed.
  • Direct imports such as from src... and commands such as python -m src.main no longer work.

Migration path:

  • Use opensandbox_server for all Python imports.
  • Use python -m opensandbox_server.main for local module entry.
  • Continue using opensandbox-server for the installed CLI.
  • Continue using opensandbox-server init-config ... to generate example configs.

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

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: 737894909f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ninan-nn ninan-nn force-pushed the feature/fix_server_pgk branch 2 times, most recently from b3cd2a4 to 5c2bc8c Compare March 24, 2026 10:41
@ninan-nn ninan-nn force-pushed the feature/fix_server_pgk branch from 5c2bc8c to 510aea1 Compare March 24, 2026 11:02
Copy link
Copy Markdown
Collaborator

@hittyt hittyt left a comment

Choose a reason for hiding this comment

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

LGTM

@hittyt hittyt merged commit 4985a03 into alibaba:main Mar 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opensandbox-server的安装位置存在问题

2 participants