Skip to content

Commit ef7c5eb

Browse files
authored
Merge pull request #15 from tanem/docs/poll-wording-and-test-guidance
Drop stale "polls" wording, fix __version__ drift, add pre-release testing guidance
2 parents c7143f0 + 8d849e5 commit ef7c5eb

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,25 @@ Dependencies are kept current by [Renovate](https://docs.renovatebot.com/) (conf
6767

6868
Don't hand-bump these versions — let Renovate's PRs flow through.
6969

70+
## Testing changes before a release
71+
72+
For code or behaviour changes, test the **built artifact** directly on the Windows host — no publish needed, and it exercises the exact bytes a user installs:
73+
74+
```bash
75+
uv build # produces dist/*.whl
76+
uv tool install "./dist/mt5_pnl_exporter-<ver>-py3-none-any.whl[mt5]"
77+
mt5-pnl-exporter export # runs the installed tool
78+
```
79+
80+
This is the right loop for code changes — see [Smoke-test a real export](#smoke-test-a-real-export) for the full procedure.
81+
82+
**TestPyPI is not the place to test code changes.** Two limits make it awkward:
83+
84+
- **Versions are immutable.** Each upload needs a unique version, and the workflow's `skip-existing: true` means a repeat `workflow_dispatch` at the same version is silently skipped — a new build would not replace the old one. You'd have to bump to a pre-release version (`1.1.0.dev1`, `1.1.0rc1`, …) on every iteration.
85+
- **It doesn't mirror dependencies.** Installing from TestPyPI needs `--extra-index-url https://pypi.org/simple/` so `typer`, `pydantic`, `MetaTrader5`, etc. resolve from real PyPI.
86+
87+
Use TestPyPI only to rehearse the **publish mechanics** (the OIDC handshake, the rendered page, metadata) when you change packaging or `release.yml` itself — via the `workflow_dispatch` run described under [Releasing](#releasing).
88+
7089
## Releasing
7190

7291
Releases publish to PyPI via [Trusted Publishing](https://docs.pypi.org/trusted-publishers/) — there is no stored API token. The publish workflow is [`.github/workflows/release.yml`](.github/workflows/release.yml).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "mt5-pnl-exporter"
33
version = "1.0.0"
4-
description = "MT5 P&L exporter — polls deal history on the Windows host where MT5 runs and writes a typed, encrypted snapshot."
4+
description = "MT5 P&L exporter — exports deal history on the Windows host where MT5 runs and writes a typed, encrypted snapshot."
55
readme = "README.md"
66
authors = [
77
{ name = "Tane Morgan", email = "464864+tanem@users.noreply.github.com" }

src/mt5_pnl_exporter/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
"""mt5-pnl-exporter — polls MT5 deal history, writes snapshot.json."""
1+
"""mt5-pnl-exporter — exports MT5 deal history, writes a typed, encrypted snapshot."""
22

3-
__version__ = "0.1.0"
3+
from importlib.metadata import version
4+
5+
__version__ = version("mt5-pnl-exporter")

0 commit comments

Comments
 (0)