Skip to content

Commit d09410b

Browse files
authored
Merge pull request #41 from athola/hotfix-0.1.9
fix(build): include Python source files in wheel distribution
2 parents 8b41646 + 8181352 commit d09410b

11 files changed

Lines changed: 91 additions & 16 deletions

File tree

.pre-commit-config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,32 @@ repos:
8484
language: system
8585
pass_filenames: false
8686
always_run: true
87+
88+
- id: wheel-install-test
89+
name: wheel-installation-and-execution-test
90+
entry: >
91+
bash -lc '
92+
set -euo pipefail;
93+
mkdir -p dist;
94+
rm -f dist/simple_resume-*.whl;
95+
UV_CACHE_DIR=.uv-cache uv build --wheel --quiet;
96+
WHEEL=$(ls -t dist/simple_resume-*.whl | head -n1);
97+
if [[ -z "$WHEEL" ]]; then
98+
echo "ERROR: wheel build failed - no wheel file found";
99+
exit 1;
100+
fi;
101+
VENV_DIR=$(mktemp -d);
102+
trap "rm -rf $VENV_DIR" EXIT;
103+
python3 -m venv "$VENV_DIR";
104+
source "$VENV_DIR/bin/activate";
105+
pip install -q "$WHEEL";
106+
if ! simple-resume --version >/dev/null 2>&1; then
107+
echo "ERROR: simple-resume command failed after installation";
108+
exit 1;
109+
fi;
110+
VERSION=$(simple-resume --version 2>&1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+");
111+
echo "Package installs and executes correctly (v$VERSION)"
112+
'
113+
language: system
114+
pass_filenames: false
115+
always_run: true

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
This file documents all notable project changes. Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [0.1.9] - 2026-01-07
6+
7+
### Fixed
8+
9+
- Package wheel now includes all Python source files, fixing installation failure (#40)
10+
- Updated `pyproject.toml` build configuration to properly package source code in wheels
11+
12+
### Added
13+
14+
- Pre-commit hook `wheel-install-test` to verify package installation and execution
15+
- Configurable font sizes: `description_font_size`, `date_font_size`, `sidebar_font_size`
16+
517
## [0.1.8] - 2026-01-03
618

719
### Added

pyproject.toml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ markers = [
3030

3131
[project]
3232
name = "simple-resume"
33-
version = "0.1.8"
33+
version = "0.1.9"
3434
description = "Generate PDF resumes from YAML data using HTML templates"
3535
authors = [
3636
{name = "Alex Thola", email = "alexthola@gmail.com"}
@@ -70,20 +70,16 @@ palette-snapshot = "simple_resume.shell.cli.palette:snapshot"
7070
palette-list = "simple_resume.shell.cli.palette:palette_list"
7171
generate-random-palette-demo = "simple_resume.shell.cli.random_palette_demo:main"
7272

73-
[tool.hatch.build]
74-
include = [
75-
"src/simple_resume/shell/assets/templates/**",
76-
"src/simple_resume/shell/assets/static/**",
77-
]
78-
7973
[tool.hatch.build.targets.sdist]
8074
include = ["src"] # Only include content from src
81-
sources = ["src"] # Map src/ to the root of the package
8275

8376
[tool.hatch.build.targets.wheel]
84-
# wheel builder applies gitignore without the src/ prefix
85-
ignore-vcs = true
8677
packages = ["src/simple_resume"]
78+
include = [
79+
"src/simple_resume/**/*.py",
80+
"src/simple_resume/shell/assets/templates/**",
81+
"src/simple_resume/shell/assets/static/**",
82+
]
8783

8884
[dependency-groups]
8985
dev = [

src/simple_resume/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
)
9191

9292
# Version
93-
__version__ = "0.1.8"
93+
__version__ = "0.1.9"
9494

9595
# Public API exports - organized by functionality
9696
__all__ = [

src/simple_resume/core/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ def apply_config_defaults(config: dict[str, Any]) -> None:
172172
# Font Settings
173173
# ==========================================================================
174174
config.setdefault("bold_font_weight", 600)
175+
config.setdefault("description_font_size", 8.5)
176+
config.setdefault("date_font_size", 9)
177+
config.setdefault("sidebar_font_size", 8.5)
175178

176179

177180
def validate_dimensions(config: dict[str, Any], filename_prefix: str) -> None:

src/simple_resume/shell/assets/static/css/common.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ li:before {
175175
.page {
176176
width: var(--page-width);
177177
min-height: var(--page-height);
178-
font-size: 8.5pt;
178+
font-size: var(--description-font-size, 8.5pt);
179179
line-height: 1;
180180
font-family: 'Avenir 35', 'Helvetica Neue', Arial, sans-serif;
181181
background: linear-gradient(
@@ -216,6 +216,7 @@ li:before {
216216
padding-right: var(--sidebar-padding-right);
217217
color: var(--sidebar-text-color);
218218
background-color: var(--sidebar-color);
219+
font-size: var(--sidebar-font-size, 8.5pt);
219220
overflow: visible;
220221
position: relative;
221222
z-index: 10;
@@ -306,7 +307,7 @@ li:before {
306307
}
307308

308309
.contact-text {
309-
font-size: 8.5pt;
310+
font-size: var(--sidebar-font-size, 8.5pt);
310311
word-break: break-word;
311312
overflow-wrap: break-word;
312313
hyphens: auto;
@@ -370,11 +371,11 @@ li:before {
370371
}
371372

372373
.date1 {
373-
font-size: 9pt;
374+
font-size: var(--date-font-size, 9pt);
374375
}
375376

376377
.date2 {
377-
font-size: 8pt;
378+
font-size: calc(var(--date-font-size, 9pt) - 1pt);
378379
color: var(--date2-color);
379380
}
380381

src/simple_resume/shell/assets/static/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@
217217
"contact_text_padding_left": {"$ref": "#/$defs/dimension", "default": 2},
218218

219219
"bold_font_weight": {"type": "integer", "default": 600},
220+
"description_font_size": {"$ref": "#/$defs/dimension", "default": 8.5},
221+
"date_font_size": {"$ref": "#/$defs/dimension", "default": 9},
222+
"sidebar_font_size": {"$ref": "#/$defs/dimension", "default": 8.5},
220223

221224
"theme_color": {"$ref": "#/$defs/hexColor", "default": "#0395DE"},
222225
"sidebar_color": {"$ref": "#/$defs/hexColor", "default": "#F6F6F6"},

src/simple_resume/shell/assets/templates/html/resume_base.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@
398398
--entry-margin-bottom: {{ resume_config.get("entry_margin_bottom", 4) }}mm;
399399
--tech-stack-margin-bottom: {{ resume_config.get("tech_stack_margin_bottom", 2) }}mm;
400400

401+
/* Font sizes */
402+
--description-font-size: {{ resume_config.get("description_font_size", 8.5) }}pt;
403+
--date-font-size: {{ resume_config.get("date_font_size", 9) }}pt;
404+
--sidebar-font-size: {{ resume_config.get("sidebar_font_size", 8.5) }}pt;
405+
401406
/* Contact icon styling */
402407
--contact-icon-size: {{ resume_config.get("contact_icon_size", 5) }}mm;
403408
--contact-icon-margin-top: {{ resume_config.get("contact_icon_margin_top", 0.5) }}mm;

tests/unit/core/test_config.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ def test_font_settings_default(self, story: Scenario) -> None:
197197
apply_config_defaults(config)
198198

199199
assert config["bold_font_weight"] == 600
200+
assert config["description_font_size"] == 8.5
201+
assert config["date_font_size"] == 9
202+
assert config["sidebar_font_size"] == 8.5
200203

201204
def test_existing_values_not_overwritten(self, story: Scenario) -> None:
202205
"""Verify that existing config values are not overwritten."""
@@ -209,6 +212,9 @@ def test_existing_values_not_overwritten(self, story: Scenario) -> None:
209212
"padding": 10,
210213
"section_heading_margin_top": 8,
211214
"frame_padding": 20,
215+
"description_font_size": 10,
216+
"date_font_size": 11,
217+
"sidebar_font_size": 9,
212218
}
213219
apply_config_defaults(config)
214220

@@ -220,6 +226,11 @@ def test_existing_values_not_overwritten(self, story: Scenario) -> None:
220226
assert config["section_heading_margin_top"] == 8
221227
assert config["frame_padding"] == 20
222228

229+
# Font size values should be preserved
230+
assert config["description_font_size"] == 10
231+
assert config["date_font_size"] == 11
232+
assert config["sidebar_font_size"] == 9
233+
223234
# Derived values should use the custom padding
224235
assert config["sidebar_padding_left"] == 8 # 10 - 2
225236
assert config["sidebar_padding_bottom"] == 10
@@ -283,6 +294,9 @@ class TestNormalizationCompleteness:
283294

284295
EXPECTED_FONT_KEYS = {
285296
"bold_font_weight",
297+
"description_font_size",
298+
"date_font_size",
299+
"sidebar_font_size",
286300
}
287301

288302
@pytest.fixture

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)