xlsxturbo 0.7.0__tar.gz → 0.9.0__tar.gz

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.
@@ -0,0 +1,15 @@
1
+ version: 2
2
+ updates:
3
+ # Rust dependencies (Cargo.toml)
4
+ - package-ecosystem: "cargo"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ open-pull-requests-limit: 5
9
+
10
+ # GitHub Actions
11
+ - package-ecosystem: "github-actions"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "weekly"
15
+ open-pull-requests-limit: 3
@@ -13,7 +13,7 @@ jobs:
13
13
  test:
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: actions/checkout@v4
16
+ - uses: actions/checkout@v6
17
17
 
18
18
  - name: Set up Rust
19
19
  uses: dtolnay/rust-toolchain@stable
@@ -27,7 +27,7 @@ jobs:
27
27
  lint:
28
28
  runs-on: ubuntu-latest
29
29
  steps:
30
- - uses: actions/checkout@v4
30
+ - uses: actions/checkout@v6
31
31
 
32
32
  - name: Set up Rust
33
33
  uses: dtolnay/rust-toolchain@stable
@@ -17,9 +17,9 @@ jobs:
17
17
  matrix:
18
18
  target: [x86_64, aarch64]
19
19
  steps:
20
- - uses: actions/checkout@v4
20
+ - uses: actions/checkout@v6
21
21
 
22
- - uses: actions/setup-python@v5
22
+ - uses: actions/setup-python@v6
23
23
  with:
24
24
  python-version: '3.11'
25
25
 
@@ -44,9 +44,9 @@ jobs:
44
44
  matrix:
45
45
  target: [x64]
46
46
  steps:
47
- - uses: actions/checkout@v4
47
+ - uses: actions/checkout@v6
48
48
 
49
- - uses: actions/setup-python@v5
49
+ - uses: actions/setup-python@v6
50
50
  with:
51
51
  python-version: '3.11'
52
52
  architecture: ${{ matrix.target }}
@@ -70,9 +70,9 @@ jobs:
70
70
  matrix:
71
71
  target: [x86_64, aarch64]
72
72
  steps:
73
- - uses: actions/checkout@v4
73
+ - uses: actions/checkout@v6
74
74
 
75
- - uses: actions/setup-python@v5
75
+ - uses: actions/setup-python@v6
76
76
  with:
77
77
  python-version: '3.11'
78
78
 
@@ -93,7 +93,7 @@ jobs:
93
93
  sdist:
94
94
  runs-on: ubuntu-latest
95
95
  steps:
96
- - uses: actions/checkout@v4
96
+ - uses: actions/checkout@v6
97
97
 
98
98
  - name: Build sdist
99
99
  uses: PyO3/maturin-action@v1
@@ -120,7 +120,7 @@ jobs:
120
120
  id-token: write # Required for trusted publishing
121
121
  steps:
122
122
  - name: Download all wheels
123
- uses: actions/download-artifact@v4
123
+ uses: actions/download-artifact@v7
124
124
  with:
125
125
  pattern: wheels-*
126
126
  path: dist
@@ -0,0 +1,191 @@
1
+ # Build & Release Guide
2
+
3
+ ## Prerequisites
4
+
5
+ - Rust toolchain (stable): https://rustup.rs/
6
+ - Python 3.8+
7
+ - maturin: `pip install maturin`
8
+
9
+ ## Local Development
10
+
11
+ ### Setup
12
+
13
+ ```bash
14
+ # Clone and enter directory
15
+ git clone https://github.com/tstone-1/xlsxturbo.git
16
+ cd xlsxturbo
17
+
18
+ # Install in development mode
19
+ pip install -e ".[dev]"
20
+ # Or with maturin:
21
+ maturin develop --release
22
+ ```
23
+
24
+ ### Running Tests
25
+
26
+ ```bash
27
+ # Rust unit tests
28
+ cargo test
29
+
30
+ # Python integration tests
31
+ python tests/test_features.py
32
+
33
+ # Or with pytest
34
+ pytest tests/
35
+ ```
36
+
37
+ ### Code Quality Checks
38
+
39
+ ```bash
40
+ # Format check (must pass before commit)
41
+ cargo fmt --check
42
+
43
+ # Linter (must pass with no warnings)
44
+ cargo clippy -- -D warnings
45
+
46
+ # Format code (if check fails)
47
+ cargo fmt
48
+ ```
49
+
50
+ ## Pre-Push Checklist
51
+
52
+ Before pushing to main or creating a PR, verify all checks pass locally:
53
+
54
+ ```bash
55
+ # 1. Format check
56
+ cargo fmt --check
57
+
58
+ # 2. Linter (no warnings)
59
+ cargo clippy -- -D warnings
60
+
61
+ # 3. Rust tests
62
+ cargo test
63
+
64
+ # 4. Build release
65
+ maturin develop --release
66
+
67
+ # 5. Python tests
68
+ python tests/test_features.py
69
+ ```
70
+
71
+ All 5 steps must succeed before pushing.
72
+
73
+ ## Release Process
74
+
75
+ ### 1. Update Version
76
+
77
+ Update version in both files (must match):
78
+
79
+ - `Cargo.toml`: `version = "X.Y.Z"`
80
+ - `pyproject.toml`: `version = "X.Y.Z"`
81
+
82
+ Follow SemVer:
83
+ - MAJOR: Breaking API changes
84
+ - MINOR: New features (backward compatible)
85
+ - PATCH: Bug fixes (backward compatible)
86
+
87
+ ### 2. Update CHANGELOG.md
88
+
89
+ Add entry for new version with:
90
+ - Date
91
+ - Summary of changes
92
+ - Breaking changes (if any)
93
+
94
+ ### 3. Commit Version Bump
95
+
96
+ ```bash
97
+ git add Cargo.toml pyproject.toml CHANGELOG.md
98
+ git commit -m "chore: bump version to X.Y.Z"
99
+ git push origin main
100
+ ```
101
+
102
+ ### 4. Check Dependabot PRs
103
+
104
+ Before releasing, review open Dependabot PRs:
105
+
106
+ 1. Go to: https://github.com/tstone-1/xlsxturbo/pulls
107
+ 2. Check for open Dependabot PRs (dependency updates)
108
+ 3. For each PR, decide:
109
+ - **Merge** if CI passes and update is safe
110
+ - **Close** if update causes issues or is not needed yet
111
+ - **Defer** to next release (document why)
112
+
113
+ Don't release with unreviewed dependency PRs piling up.
114
+
115
+ ### 5. Verify CI Passes
116
+
117
+ **IMPORTANT:** Before creating a release tag, verify GitHub Actions succeed.
118
+
119
+ 1. Go to: https://github.com/tstone-1/xlsxturbo/actions
120
+ 2. Check the latest push to `main`
121
+ 3. Verify both workflows show green checkmarks:
122
+ - **CI / test (push)** - Rust tests pass
123
+ - **CI / lint (push)** - Format and clippy pass
124
+
125
+ Do NOT proceed if CI is failing.
126
+
127
+ ### 6. Create Release Tag
128
+
129
+ ```bash
130
+ git tag vX.Y.Z
131
+ git push origin vX.Y.Z
132
+ ```
133
+
134
+ ### 7. Verify Release Workflow
135
+
136
+ After pushing the tag:
137
+
138
+ 1. Go to: https://github.com/tstone-1/xlsxturbo/actions
139
+ 2. Watch the **Release** workflow
140
+ 3. Verify all jobs succeed:
141
+ - **linux** (x86_64, aarch64)
142
+ - **windows** (x64)
143
+ - **macos** (x86_64, aarch64)
144
+ - **sdist**
145
+ - **Publish to PyPI**
146
+
147
+ ### 8. Verify PyPI Publication
148
+
149
+ 1. Go to: https://pypi.org/project/xlsxturbo/
150
+ 2. Verify new version appears
151
+ 3. Test installation: `pip install xlsxturbo==X.Y.Z`
152
+
153
+ ## Troubleshooting
154
+
155
+ ### CI Lint Fails
156
+
157
+ ```bash
158
+ # Check what needs formatting
159
+ cargo fmt --check
160
+
161
+ # Auto-fix formatting
162
+ cargo fmt
163
+
164
+ # Check clippy warnings
165
+ cargo clippy -- -D warnings
166
+ ```
167
+
168
+ ### Release Workflow Fails
169
+
170
+ 1. Check which job failed in GitHub Actions
171
+ 2. Common issues:
172
+ - **Build fails**: Check Cargo.toml dependencies
173
+ - **PyPI publish fails**: Check PyPI trusted publisher settings
174
+ - **Wheel build fails**: Check maturin configuration
175
+
176
+ ### Maturin Develop Doesn't Update
177
+
178
+ If changes aren't reflected after `maturin develop`:
179
+
180
+ ```bash
181
+ # Uninstall and reinstall
182
+ pip uninstall xlsxturbo -y
183
+ pip install .
184
+ ```
185
+
186
+ ## GitHub Actions Summary
187
+
188
+ | Workflow | Trigger | Jobs |
189
+ |----------|---------|------|
190
+ | CI | Push/PR to main | `test` (cargo test), `lint` (fmt + clippy) |
191
+ | Release | Push tag `v*` | Build wheels (linux/win/mac) + PyPI publish |
@@ -5,13 +5,63 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.9.0] - 2026-01-15
9
+
10
+ ### Added
11
+ - **Conditional formatting** - Visual formatting based on cell values
12
+ - `2_color_scale`: Gradient from min_color to max_color
13
+ - `3_color_scale`: Three-color gradient with min/mid/max colors
14
+ - `data_bar`: In-cell bar chart with customizable color, direction, solid fill
15
+ - `icon_set`: Traffic lights, arrows, flags (3/4/5 icons), with reverse and icons_only options
16
+ - Supports column name patterns: `'price_*': {'type': 'data_bar', ...}`
17
+ - Available in both `df_to_xlsx()` and `dfs_to_xlsx()` with per-sheet overrides
18
+ - Example: `conditional_formats={'score': {'type': '2_color_scale', 'min_color': '#FF0000', 'max_color': '#00FF00'}}`
19
+ - **Formula columns** - Add calculated columns with Excel formulas
20
+ - Use `{row}` placeholder for row numbers (1-based)
21
+ - Columns appear after data columns
22
+ - Order preserved (first formula = first new column)
23
+ - Available in both `df_to_xlsx()` and `dfs_to_xlsx()` with per-sheet overrides
24
+ - Example: `formula_columns={'Total': '=A{row}+B{row}', 'Percentage': '=C{row}/D{row}*100'}`
25
+ - **Merged cells** - Merge cell ranges for headers, titles, and grouped labels
26
+ - Uses Excel notation for ranges (e.g., 'A1:D1')
27
+ - Optional formatting with HeaderFormat options (bold, colors, etc.)
28
+ - Available in both `df_to_xlsx()` and `dfs_to_xlsx()` with per-sheet overrides
29
+ - Example: `merged_ranges=[('A1:C1', 'Title'), ('A2:C2', 'Subtitle', {'bold': True})]`
30
+ - **Hyperlinks** - Add clickable links to cells
31
+ - Uses Excel notation for cell reference (e.g., 'A1', 'B5')
32
+ - Optional display text (defaults to URL if not provided)
33
+ - Available in both `df_to_xlsx()` and `dfs_to_xlsx()` with per-sheet overrides
34
+ - Example: `hyperlinks=[('A2', 'https://example.com'), ('B2', 'https://google.com', 'Google')]`
35
+
36
+ ## [0.8.0] - 2026-01-15
37
+
38
+ ### Added
39
+ - **Date order parameter** - `date_order` for `csv_to_xlsx()` to handle ambiguous dates
40
+ - `"auto"` (default): ISO first, then European (DMY), then US (MDY)
41
+ - `"mdy"` or `"us"`: US format where 01-02-2024 = January 2nd
42
+ - `"dmy"` or `"eu"`: European format where 01-02-2024 = February 1st
43
+ - Also available in CLI: `--date-order us`
44
+ - **BUILD.md** - Developer guide for building, testing, and releasing
45
+
46
+ ### Fixed
47
+ - **Pattern matching order** - `column_formats` patterns now match in definition order (first match wins). Previously, HashMap iteration order was non-deterministic.
48
+ - **Empty DataFrame with table_style** - No longer crashes; tables are skipped when DataFrame has no data rows
49
+ - **Hex color validation** - Colors like `#FF` now raise descriptive error instead of silently misparsing
50
+ - **Invalid table_style validation** - Unknown styles now raise error instead of silently defaulting to Medium9
51
+ - **CLI division by zero** - Instant conversions now show "instant rows/sec" instead of "inf"
52
+
53
+ ### Changed
54
+ - Uses `indexmap` crate to preserve pattern insertion order
55
+ - Updated `pyo3` 0.23 → 0.27, `rust_xlsxwriter` 0.79 → 0.92
56
+ - Added Dependabot for automated dependency updates
57
+
8
58
  ## [0.7.0] - 2025-12-28
9
59
 
10
60
  ### Added
11
61
  - **Column formatting with wildcards** - `column_formats` parameter for styling columns by pattern
12
62
  - Wildcard patterns: `prefix*`, `*suffix`, `*contains*`, or exact match
13
63
  - Format options: `bg_color`, `font_color`, `num_format`, `bold`, `italic`, `underline`, `border`
14
- - Example: `column_formats={'mcpt_*': {'bg_color': '#D6EAF8', 'num_format': '0.00000', 'border': True}}`
64
+ - Example: `column_formats={'price_*': {'bg_color': '#D6EAF8', 'num_format': '$#,##0.00', 'border': True}}`
15
65
  - Available in both `df_to_xlsx()` and `dfs_to_xlsx()`
16
66
  - Per-sheet column formats via options dict in `dfs_to_xlsx()`
17
67
 
@@ -121,6 +171,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
121
171
  - Support for custom sheet names
122
172
  - Verbose mode for progress reporting
123
173
 
174
+ [0.9.0]: https://github.com/tstone-1/xlsxturbo/releases/tag/v0.9.0
175
+ [0.8.0]: https://github.com/tstone-1/xlsxturbo/releases/tag/v0.8.0
124
176
  [0.7.0]: https://github.com/tstone-1/xlsxturbo/releases/tag/v0.7.0
125
177
  [0.6.0]: https://github.com/tstone-1/xlsxturbo/releases/tag/v0.6.0
126
178
  [0.5.0]: https://github.com/tstone-1/xlsxturbo/releases/tag/v0.5.0