Skip to content

Add CLI Input Validation for Trading Simulation#63

Open
EiJackGH wants to merge 5 commits intomainfrom
palette-cli-validation-14252284742105605666
Open

Add CLI Input Validation for Trading Simulation#63
EiJackGH wants to merge 5 commits intomainfrom
palette-cli-validation-14252284742105605666

Conversation

@EiJackGH
Copy link
Owner

Implemented input validation for the bitcoin_trading_simulation.py CLI script.

  • Added checks for days, initial_cash, initial_price (must be positive) and volatility (must be non-negative).
  • Used Colors.FAIL to highlight error messages.
  • Exits with status code 1 on validation failure.
  • Removed tracked __pycache__ files to keep the repository clean.

PR created automatically by Jules for task 14252284742105605666 started by @EiJackGH

- Validate `days`, `initial_cash`, `initial_price`, and `volatility`
- Ensure numeric arguments are positive/non-negative
- Print clear, color-coded error messages on failure
- Remove accidentally committed `__pycache__` files

This improves the CLI UX by preventing invalid simulations and providing helpful feedback to the user.

Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules bot and others added 4 commits February 25, 2026 13:28
- Validates `days`, `initial_cash`, `initial_price`, and `volatility` arguments.
- Prints color-coded error messages to stderr instead of crashing or allowing invalid simulation.
- Exits with status code 1 on validation failure.
- Adds `test_cli_args.py` to verify validation behavior.
- Updates UX journal in `.Jules/palette.md`.

Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
- Deleted `.github/workflows/rust.yml` which was causing CI failures as this is a Python-only project.
- The `rust.yml` workflow attempted to run `cargo build`, which failed because no `Cargo.toml` exists.
- The existing `python-package.yml` workflow correctly handles testing and linting for this repository.

Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
…38057530297

Bump next to 1.5.5.1 to 1.5.5.3
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.

2 participants