Skip to content

Conversation

Newcoderorigin
Copy link
Owner

Summary

  • pin the supported numeric stack via constraints.txt, a root requirements.txt include, and a minimal pyproject build definition
  • add scripts/setup_env.ps1 to rebuild .venv, install against the constraints, and emit a STACK_OK version report
  • extend toptek.core.utils with logging configuration, numeric stack verification, deterministic seeding, and run_stack.json emission; wire main.py and config defaults to the new telemetry and document the workflow with tests

Testing

  • ruff check .
  • mypy --disable-error-code import-untyped toptek/core/utils.py toptek/main.py tests/test_utils_stack.py
  • pytest -q (fails: pandas/numpy/sklearn unavailable in execution environment)
  • bandit -q toptek/core/utils.py toptek/main.py (command not found in execution environment)

https://chatgpt.com/codex/tasks/task_e_68e0a95a63848329be8889df4c352ddd

Copy link

@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.

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 66 to +78
monkeypatch.setattr("toptek.main.build_features", fake_build_features)
monkeypatch.setattr("toptek.main.model.train_classifier", fake_train_classifier)
monkeypatch.setattr("toptek.main.data.sample_dataframe", lambda: _sample_dataframe(140))
monkeypatch.setattr(
"toptek.main.data.sample_dataframe", lambda: _sample_dataframe(140)
)

args = argparse.Namespace(cli="train", model="logistic", symbol="ES", timeframe="5m", lookback="90d", start=None)
args = argparse.Namespace(
cli="train",
model="logistic",
symbol="ES",
timeframe="5m",
lookback="90d",
start=None,

Choose a reason for hiding this comment

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

P1 Badge Update CLI integration test for numeric lookback

The CLI now casts args.lookback to int and forwards it to data.sample_dataframe(lookback), but the integration test still stubs sample_dataframe with a zero‑argument lambda and builds the namespace with lookback="90d". When run_cli executes, the stub will raise TypeError (unexpected positional argument) or ValueError when int("90d") is evaluated, so the test suite cannot run. The stub needs to accept the new positional argument and the test should pass an integer lookback to match the updated CLI contract.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant