Skip to content

gh68 - xts create - #75

Open
zghp wants to merge 2 commits into
developfrom
feature/gh68_xts_create
Open

gh68 - xts create#75
zghp wants to merge 2 commits into
developfrom
feature/gh68_xts_create

Conversation

@zghp

@zghp zghp commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@zghp
zghp requested a review from TB-1993 August 20, 2026 08:50
@zghp zghp self-assigned this Aug 20, 2026
Copilot AI lite review requested due to automatic review settings August 20, 2026 08:50
@zghp
zghp requested a review from a team as a code owner August 20, 2026 08:50
@zghp zghp added the enhancement New feature or request label Aug 20, 2026
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


zghp seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@zghp zghp linked an issue Aug 20, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new xts create built-in command to the XTS CLI, providing an interactive wizard to generate .xts YAML workflow files and accompanying tests to validate the behavior.

Changes:

  • Introduces src/xts_core/create.py with an interactive .xts file creation wizard.
  • Wires the new create subcommand into the main CLI dispatcher (src/xts_core/xts.py).
  • Adds pytest coverage for wizard output, overwrite protection, extension validation, and CLI dispatch (test/test_xts_all_cases.py).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/test_xts_all_cases.py Adds tests covering the new xts create behavior and CLI dispatch.
src/xts_core/xts.py Registers create as a built-in subcommand and dispatches to run_create().
src/xts_core/create.py Implements the interactive wizard that writes a YAML .xts file to disk.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/xts_core/create.py
Comment on lines +1 to +6
"""Interactive creation of XTS configuration files."""

from pathlib import Path

import yaml

Comment thread src/xts_core/create.py
Comment on lines +42 to +53
def run_create(output_path: str | None = None) -> int:
"""Run the interactive XTS file creation wizard."""
print("Create an XTS configuration")
path = Path(output_path or _prompt("Output file", "example.xts")).expanduser()

if path.suffix.lower() != ".xts":
print(f"Output file must use the .xts extension: {path}")
return 1

if path.exists() and not _prompt_yes_no(f"File already exists: {path}. Overwrite it?"):
print(f"Cancelled; existing file was not changed: {path}")
return 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: xts create

2 participants