mirror of
https://github.com/microsoft/autogen.git
synced 2025-07-04 15:41:15 +00:00

* Fix definition of workspace package, remove uv pin * add --all-packages * pin docs uv versions for older project structure * try old version to verify CI * Use workflow target * change syntax * change check * try with var in matrix * add all packages to workspace * remove project table
25 lines
582 B
Python
25 lines
582 B
Python
import os
|
|
import shutil
|
|
from pathlib import Path
|
|
import tomli_w
|
|
import tomllib
|
|
|
|
source_dir = os.getcwd()
|
|
target_dir = "{{ cookiecutter.__final_destination }}"
|
|
|
|
shutil.move(source_dir, target_dir)
|
|
|
|
THIS_FILE_DIR = Path(__file__).parent
|
|
|
|
# Add the package to the workspace def
|
|
|
|
workspace_def_path = THIS_FILE_DIR / ".." / ".." / ".." / "pyproject.toml"
|
|
|
|
with workspace_def_path.open("rb") as f:
|
|
config = tomllib.load(f)
|
|
|
|
config["tool"]["uv"]["sources"]["{{ cookiecutter.package_name }}"] = {"workspace": True}
|
|
|
|
with workspace_def_path.open("wb") as f:
|
|
tomli_w.dump(config, f)
|