Skip to content

Conversation

@adrianhasse
Copy link
Contributor

  • adjust variable names from datetime / date to timestamp
  • use pandas.Timestamp not datetime.datetime
  • introduce devcontainer

@adrianhasse adrianhasse linked an issue Jul 15, 2025 that may be closed by this pull request
@adrianhasse adrianhasse requested a review from Copilot July 15, 2025 21:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR standardizes all date/time handling by removing datetime in favor of pd.Timestamp and introducing a development container setup.

  • Renamed parameters, variables, and attributes from date/datetime to timestamp and unified on pd.Timestamp.
  • Removed all datetime.datetime imports and updated docstrings to reflect the new naming.
  • Added a .devcontainer configuration for a consistent development environment.

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_strategy.py Updated generate_orders signature to accept current_timestamp.
tests/test_integration.py Renamed current_date parameter to current_timestamp.
tests/test_entities.py Removed datetime import and switched to timestamp fields.
tests/test_broker.py Changed all datetime usages to timestamp and updated tests.
tests/conftest.py Renamed fixture index from date to timestamp.
kissbt/strategy.py Adjusted method signature and docs to use current_timestamp.
kissbt/entities.py Renamed datetime fields in OpenPosition/ClosedPosition.
kissbt/engine.py Group by timestamp instead of date and call generate_orders.
kissbt/broker.py Replaced datetime parameters with timestamp throughout.
kissbt/analyzer.py Changed minute unit key from 'M' to 'T' and plot to timestamp.
.devcontainer/devcontainer.json Added devcontainer setup for Python 3.13 environment.
Comments suppressed due to low confidence (2)

kissbt/broker.py:180

  • In the _update_closed_positions docstring, specify the type as pd.Timestamp (e.g., timestamp (pd.Timestamp)) to maintain consistency and clarity.
            timestamp (timestamp): Timestamp of the closing/reduction

kissbt/broker.py:226

  • In the _update_open_positions docstring, use the fully qualified pd.Timestamp type instead of Timestamp for clarity.
            timestamp (Timestamp): The timestamp when the position was opened or

@adrianhasse adrianhasse merged commit a004944 into main Jul 16, 2025
4 checks passed
@adrianhasse adrianhasse deleted the refector/unify_timestamp_type_and_name branch July 18, 2025 11:49
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.

Refactor: unify on pandas.Timestamp & rename to …_timestamp

2 participants