onesecondtrader 0.6.0__py3-none-any.whl → 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,9 @@ The Trading Infrastructure Toolkit for Python.
4
4
  Research, simulate, and deploy algorithmic trading strategies — all in one place.
5
5
  """
6
6
 
7
- # Core infrastructure
8
- from .monitoring import logger
7
+ from .monitoring.console import logger
9
8
 
10
9
 
11
10
  __all__ = [
12
- # Core infrastructure
13
11
  "logger",
14
12
  ]
File without changes
@@ -1,12 +1,10 @@
1
- """Logging configuration for the OneSecondTrader package.
1
+ """Console logging utilities for OneSecondTrader.
2
2
 
3
- This module sets up the default logging configuration and provides
4
- a logger instance for use throughout the package.
3
+ Simple console logging configuration for terminal output.
5
4
  """
6
5
 
7
6
  import logging
8
7
 
9
-
10
8
  logging.basicConfig(
11
9
  level=logging.DEBUG,
12
10
  format="%(asctime)s - %(levelname)s - %(threadName)s - %(message)s",
@@ -0,0 +1,248 @@
1
+ Metadata-Version: 2.3
2
+ Name: onesecondtrader
3
+ Version: 0.7.0
4
+ Summary: The Trading Infrastructure Toolkit for Python. Research, simulate, and deploy algorithmic trading strategies — all in one place.
5
+ Author: Nils P. Kujath
6
+ Author-email: 63961429+NilsKujath@users.noreply.github.com
7
+ Requires-Python: >=3.11
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Requires-Dist: pandas (>=2.3.1,<3.0.0)
13
+ Description-Content-Type: text/markdown
14
+
15
+ # OneSecondTrader
16
+
17
+ [![Tests](https://github.com/nilskujath/onesecondtrader/actions/workflows/release.yml/badge.svg)](https://github.com/nilskujath/onesecondtrader/actions/workflows/release.yml)
18
+ [![Docs](https://img.shields.io/badge/docs-onesecondtrader.com-blue)](https://www.onesecondtrader.com)
19
+ [![PyPI](https://img.shields.io/pypi/v/onesecondtrader)](https://pypi.org/project/onesecondtrader/)
20
+ [![License](https://img.shields.io/github/license/nilskujath/onesecondtrader)](https://github.com/nilskujath/onesecondtrader/blob/master/LICENSE)
21
+
22
+
23
+ For documentation, please visit [onesecondtrader.com](https://www.onesecondtrader.com).
24
+
25
+
26
+
27
+
28
+ ## For Developers: Continuous Integration & Delivery (CI/CD) Pipeline
29
+
30
+ This project's continuous integration & continuous delivery (CI/CD) pipeline consists of two distinct workflows:
31
+ **local pre-commit hooks** that run on `git commit` to ensure code quality,
32
+ and **GitHub Actions** that run on `git push origin master` to automate releases.
33
+
34
+ In order for the pipeline to work, the following configuration is required:
35
+
36
+ * version field in `pyproject.toml` must be set to appropriate version
37
+ ```toml
38
+ [tool.poetry]
39
+ name = "onesecondtrader"
40
+ version = "0.1.0" # Updated automatically by bump_version.py
41
+ ```
42
+ * `mkdocs.yml` must have `mkdocstrings-python` plugin configured
43
+ ```yaml
44
+ plugins:
45
+ - mkdocstrings:
46
+ handlers:
47
+ python:
48
+ options:
49
+ docstring_style: google
50
+ ```
51
+
52
+ ### Local Pre-Commit Workflow
53
+
54
+ To ensure that only good quality code is commited to the repository, a series of pre-commit hooks are executed before each commit.
55
+ These hooks include code quality checks, testing, security scans, and automated API reference generation.
56
+ This workflow is orchestrated by the `pre-commit` package, which is configured in the `.pre-commit-config.yaml` file.
57
+ If any of these checks fail, the commit is blocked and the developer must fix the issues before retrying.
58
+
59
+ Prior to usage, the pre-commit hooks must be installed by running:
60
+ ```bash
61
+ poetry run pre-commit install
62
+ poetry run pre-commit install --hook-type commit-msg
63
+ poetry run pre-commit run --all-files # Optional: Test installation
64
+ ```
65
+
66
+ This project follows [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages.
67
+ This standardized format enables automated semantic versioning and changelog generation.
68
+ The commit messages must have the following format:
69
+
70
+ ```
71
+ <type>: <description>
72
+
73
+ [optional body]
74
+
75
+ [optional footer(s)]
76
+ ```
77
+
78
+ The commit message must start with a type, followed by a colon and a space, and then a description. The type must be one of the following:
79
+
80
+ - **feat**: New features that add functionality
81
+ - **fix**: Bug fixes and patches
82
+ - **docs**: Documentation changes only
83
+ - **chore**: Maintenance tasks, dependency updates, build changes
84
+ - **test**: Adding or modifying tests
85
+ - **refactor**: Code changes that neither fix bugs nor add features
86
+ - **perf**: Performance improvements
87
+ - **ci**: Changes to CI/CD configuration
88
+
89
+ Examples:
90
+
91
+ ```
92
+ feat: added trade-by-trade chart generation
93
+ ```
94
+
95
+ The following diagram illustrates this pre-commit workflow:
96
+
97
+ ```mermaid
98
+ ---
99
+ config:
100
+ themeVariables:
101
+ fontSize: "11px"
102
+ ---
103
+ graph TD
104
+ A([<kbd>git commit</kbd>]) -->|Trigger Pre-commit Workflow on <kbd>commit</kbd>| PrecommitHooks
105
+
106
+ subgraph PrecommitHooks ["Local Pre-commit Hooks"]
107
+ B["<b>Code Quality Checks</b><br/>• Ruff Check & Format<br/>• MyPy Type Checking<br/>• Tests & Doctests"]
108
+ C["<b>Security Checks</b><br/>• Gitleaks Secret Detection"]
109
+ D["<b>File Validation</b><br/>• YAML/TOML/JSON Check<br/>• End-of-file Fixer<br/>• Large Files Check<br/>• Merge Conflict Check<br/>• Debug Statements Check"]
110
+ E["<b>Generate API Documentation</b> via <kbd>scripts/generate_api_docs.py</kbd><br/>• Auto-generate docs<br/>• Stage changes"]
111
+ end
112
+ B --> C --> D --> E
113
+
114
+ F([Write Commit Message])
115
+ PrecommitHooks -->|Pass| F
116
+ PrecommitHooks -.->|Fail| H
117
+
118
+ subgraph CommitMessageHook ["Commit Message Hook"]
119
+ G{Commit Message Valid?}
120
+ end
121
+ G -.->|No| H[Commit Blocked]
122
+ G -->|Yes| I[Commit Successful]
123
+
124
+ F --> CommitMessageHook
125
+
126
+ H -.->|Rework & Restage<br/>| K
127
+
128
+ K(["<kbd>git commit --amend</kbd>"])
129
+
130
+ K -.-> PrecommitHooks
131
+
132
+ L(["<kbd>git pull --rebase origin master</kbd>"])
133
+
134
+ L -.->|Rebase & Resolve Conflicts| M
135
+
136
+ M([<kbd>git add <...></kbd>])
137
+
138
+ M -.-> A
139
+
140
+ I -.~.-> J([<kbd>git push</kbd>])
141
+ ```
142
+
143
+
144
+ ### GitHub Actions Workflow
145
+
146
+ Once a commit is pushed to the remote `master` branch, the GitHub Actions workflow `.github/workflows/release.yml` is triggered.
147
+ Note that the GitHub Actions workflow might push commits to the remote repository.
148
+ This means your local branch will be behind the remote branch.
149
+
150
+ In order for this workflow to run properly, two secrets need to be configured (`Settings > Secrets and variables > Actions`):
151
+
152
+ - `GH_PAT`: Personal Access Token with enhanced permissions (see PAT Setup below)
153
+ - `PYPI_API_TOKEN`: Generate from PyPI account settings
154
+
155
+ The default `GITHUB_TOKEN` has limited permissions and cannot trigger subsequent workflow runs or push to protected branches.
156
+ The PAT provides the necessary permissions for the automated release process.
157
+ The PAT is created as follows:
158
+
159
+ 1. Go to GitHub Settings > Developer settings > Personal access tokens > Tokens (classic)
160
+ 2. Click "Generate new token (classic)"
161
+ 3. Set expiration and select these scopes:
162
+ - `repo` (Full control of private repositories)
163
+ - `workflow` (Update GitHub Action workflows)
164
+ 4. Copy the token and add it as `GH_PAT` secret in repository settings
165
+
166
+ Note that GitHub Actions bot must have write permissions to the repository.
167
+
168
+ The following diagram illustrates this GitHub Actions workflow:
169
+
170
+ ```mermaid
171
+ ---
172
+ config:
173
+ themeVariables:
174
+ fontSize: "11px"
175
+ ---
176
+ graph TD
177
+
178
+ A0(<kdb>git commit</kbd>)
179
+
180
+ A1(<kdb>git commit --amend</kdb>)
181
+
182
+ A(<kbd>git push origin master</kbd>) -->|Trigger GitHub Actions Workflow on <kbd>push</kbd>| GitHubActions
183
+
184
+ A2(<kbd>git push origin master --force</kbd>) -->|Trigger GitHub Actions Workflow on <kbd>push</kbd>| GitHubActions
185
+
186
+ A0 -.->|Trigger Pre-commit Workflow & Commit| A
187
+ A1 -.->|Trigger Pre-commit Workflow & Commit| A2
188
+
189
+ subgraph GitHubActions ["GitHub Actions Environment Setup"]
190
+ B["<b>Checkout Repository</b><br/>Retrieve the full repository history on the latest Ubuntu runner"]
191
+ C["<b>Setup Python Environment</b><br/>Configure the required Python version and install Poetry"]
192
+ D["<b>Install Dependencies</b><br/>Install all project dependencies, including development ones"]
193
+ B --> C --> D
194
+ end
195
+
196
+ GitHubActions -.->|Failure<br/>Rework & Restage| A3
197
+ A3(<kdb>git commit --amend</kdb>)
198
+
199
+ GitHubActions -->|Environment Setup Complete| QualityChecks
200
+
201
+ subgraph QualityChecks ["CI Quality Validation"]
202
+ F["<b>Ruff Linting</b><br/>Validate code style and enforce formatting rules"]
203
+ G["<b>MyPy Type Checking</b><br/>Static type analysis"]
204
+ H["<b>Test Suite</b><br/>Run all automated tests"]
205
+ F --> G --> H
206
+ end
207
+
208
+ QualityChecks -.->|Failure<br/>Rework & Restage| A3
209
+
210
+ QualityChecks -->|CI Quality Checks Passed| GitConfig
211
+
212
+ subgraph GitConfig ["Git Configuration"]
213
+ J["<b>Configure Git Identity</b><br/>Set the automated commit author for CI operations"]
214
+ K["<b>Setup Authentication</b><br/>Enable secure access to the repository with release permissions (requires <kbd>GH_PAT</kbd>)"]
215
+ J --> K
216
+ end
217
+
218
+ GitConfig -->|Git Configured| VersionAnalysis
219
+
220
+ subgraph VersionAnalysis ["Semantic Version Analysis"]
221
+ N["<b>Execute bump_version.py</b><br/>Analyze commits since last tag to decide on version bump and bump level"]
222
+ P{Version Bump Required?}
223
+ N --> P
224
+ end
225
+
226
+ VersionAnalysis -->|No Version Change<br/>Skip Release Process| DocDeployment
227
+ VersionAnalysis -->|Version Bump Required| ReleaseProcess
228
+
229
+
230
+ subgraph ReleaseProcess ["Release & Publishing"]
231
+ R["<b>Update Version & Changelog</b><br/>Write new version and regenerate release notes."]
232
+ S["<b>Commit & Push</b><br/>Commit updated files and push to the default branch."]
233
+ T["<b>Publish to PyPI</b><br/>Build and upload distributions in one step."]
234
+ U["<b>Create GitHub Release</b><br/>Publish tag and attach changelog."]
235
+ R --> S --> T --> U
236
+ end
237
+
238
+
239
+ ReleaseProcess -->|Release Complete| DocDeployment
240
+
241
+ subgraph DocDeployment ["Documentation Deployment"]
242
+ X["<b>Generate API Documentation</b><br/>Automatically build API docs and update navigation"]
243
+ Y["<b>Install Package for Docs</b><br/>Prepare project for import-based documentation"]
244
+ Z["<b>Deploy to GitHub Pages</b><br/>Publish updated documentation site"]
245
+ X --> Y --> Z
246
+ end
247
+ ```
248
+
@@ -0,0 +1,7 @@
1
+ onesecondtrader/__init__.py,sha256=TNqlT20sH46-J7F6giBxwWYG1-wFZZt7toDbZeQK6KQ,210
2
+ onesecondtrader/monitoring/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ onesecondtrader/monitoring/console.py,sha256=9_WrLnfG_IanqBX3FJQOy7ZYdceoTAXb5BXFYJTUq0o,298
4
+ onesecondtrader-0.7.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
5
+ onesecondtrader-0.7.0.dist-info/METADATA,sha256=WXbgynzRnwqWMZerSQidFXiEtw5rZCWEiEw4XCjQn7E,9518
6
+ onesecondtrader-0.7.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
7
+ onesecondtrader-0.7.0.dist-info/RECORD,,
@@ -1,24 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: onesecondtrader
3
- Version: 0.6.0
4
- Summary: The Trading Infrastructure Toolkit for Python. Research, simulate, and deploy algorithmic trading strategies — all in one place.
5
- Author: Nils P. Kujath
6
- Author-email: 63961429+NilsKujath@users.noreply.github.com
7
- Requires-Python: >=3.11
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.11
10
- Classifier: Programming Language :: Python :: 3.12
11
- Classifier: Programming Language :: Python :: 3.13
12
- Requires-Dist: pandas (>=2.3.1,<3.0.0)
13
- Description-Content-Type: text/markdown
14
-
15
- # OneSecondTrader
16
-
17
- [![Tests](https://github.com/nilskujath/onesecondtrader/actions/workflows/release.yml/badge.svg)](https://github.com/nilskujath/onesecondtrader/actions/workflows/release.yml)
18
- [![Docs](https://img.shields.io/badge/docs-onesecondtrader.com-blue)](https://www.onesecondtrader.com)
19
- [![PyPI](https://img.shields.io/pypi/v/onesecondtrader)](https://pypi.org/project/onesecondtrader/)
20
- [![License](https://img.shields.io/github/license/nilskujath/onesecondtrader)](https://github.com/nilskujath/onesecondtrader/blob/master/LICENSE)
21
-
22
-
23
- For documentation, please visit [onesecondtrader.com](https://www.onesecondtrader.com).
24
-
@@ -1,6 +0,0 @@
1
- onesecondtrader/__init__.py,sha256=EKXVvlpWyePQfeBc8V61sDpBfyh5aONvkBmgonzc930,250
2
- onesecondtrader/monitoring.py,sha256=TGm53SD_TA4Xa57Go91BGHV3SEIA6MflwSO63r9Jt6g,366
3
- onesecondtrader-0.6.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
4
- onesecondtrader-0.6.0.dist-info/METADATA,sha256=RN3j_ySqSFRTgvxqdsiGG-Z3oGERZaMg1DoPFE5Xy40,1220
5
- onesecondtrader-0.6.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
6
- onesecondtrader-0.6.0.dist-info/RECORD,,