Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b972cff
Add MANIFEST.in to include test configuration and fixtures
cak Nov 13, 2026
aeb16e9
Bump version to 1.2.0 and update dependency group for mypy and ruff
cak Nov 13, 2026
236fd9d
Add `elf doctor` command for local configuration diagnostics
cak Nov 13, 2026
f2cca99
update deps
cak Nov 13, 2026
d68be35
Add GitHub Actions workflow for quality checks
cak Nov 13, 2026
e41bf34
Add comprehensive tests for caching, submissions, and event handling
cak Nov 13, 2026
2c08f70
Refactor answer submission logic and enhance caching mechanisms for i…
cak Nov 13, 2026
b0af010
Refactor HTTP client management and user agent validation for improve…
cak Nov 13, 2026
1f2c734
Enhance caching mechanism with session token support and implement at…
cak Nov 13, 2026
d22224a
Refactor CLI commands to improve year and day handling, enhance outpu…
cak Nov 13, 2026
c893b3c
Refactor session handling in puzzle input and answer submission funct…
cak Nov 13, 2026
be9eeec
Add doctor command for local configuration checks and enhance reporting
cak Nov 13, 2026
df6a567
Add event handling functions for Advent of Code, including day count …
cak Nov 13, 2026
d7de7b9
Refactor guess handling to support session tokens and improve error m…
cak Nov 13, 2026
7f5f69c
Refactor timer function to simplify message formatting and improve re…
cak Nov 13, 2026
2d1ece4
Refactor input fetching to improve cache handling and error management
cak Nov 13, 2026
537c0eb
Enhance leaderboard fetching with improved caching and error handling
cak Nov 13, 2026
9128ea6
Refactor cached low message formatting for improved readability
cak Nov 13, 2026
30eaabb
Refactor models to use built-in dict type and enhance SubmissionResul…
cak Nov 13, 2026
898efd4
Refactor open_page function to validate event day using a dedicated f…
cak Nov 13, 2026
d77f3fc
Refactor get_status and related functions for improved readability an…
cak Nov 13, 2026
58c3516
Refactor read_guesses function for improved error handling and add _p…
cak Nov 13, 2026
bc0f661
Add fixture to block external network access during tests
cak Nov 13, 2026
97996d1
Fix parameter order and default values for get_private_leaderboard in…
cak Nov 13, 2026
e054038
Add tzdata dependency for Windows platform and update changelog URL i…
cak Nov 15, 2026
7305b6f
Add initial changelog for version 1.2.0 with notable user-facing changes
cak Nov 15, 2026
216440f
Include CHANGELOG.md in MANIFEST.in for package distribution
cak Nov 15, 2026
7fa201e
Add enhance member timestamp handling, address issue #5
cak Nov 15, 2026
a1ebd8d
Refactor output format handling for leaderboard and status commands, …
cak Nov 15, 2026
c297666
Update get_private_leaderboard to support CSV output format
cak Nov 15, 2026
bcc0948
Add CSV output format to OutputFormat enum
cak Nov 15, 2026
3a4af5e
Add CSV output tests and enhance model output format validation
cak Nov 15, 2026
6db8eb3
Update README to include CSV format support for leaderboard and enhan…
cak Nov 15, 2026
583c47b
Add command to create interactive Python solution files and enhance t…
cak Nov 15, 2026
93ebf46
Add tests for template creation, CSV output handling, and model compa…
cak Nov 15, 2026
11f80df
Update CHANGELOG to include new features for interactive Python puzzl…
cak Nov 15, 2026
fee8dc2
Include day_template.py in MANIFEST.in for packaging
cak Nov 15, 2026
1953721
Update package data to include template files in pyproject.toml
cak Nov 15, 2026
91f177c
Update README to include interactive puzzle file creation instruction…
cak Nov 15, 2026
1f9449c
Add validation step for distribution packages in CI workflow
cak Nov 15, 2026
c61b4c6
Refactor output message in new command test to use Path for file crea…
cak Nov 15, 2026
a8f730f
Add GitHub Actions workflow for publishing to PyPI
cak Nov 15, 2026
72188d0
Update default user agent URL in aoc_client.py
cak Nov 15, 2026
63182d2
Update User-Agent URL and fix links in README for new repository
cak Nov 15, 2026
0048e51
Update project URLs in pyproject.toml to reflect new repository owner…
cak Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish

on:
release:
types: [published]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3

- name: Build distributions
run: uv build --no-sources

- name: Validate distributions
run: uvx --from twine twine check dist/*

- name: Upload distributions
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: distributions
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false

- name: Download distributions
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: distributions
path: dist/

- name: Publish to PyPI
run: uv publish
69 changes: 69 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Quality

on:
push:
pull_request:

permissions:
contents: read

jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"
- os: ubuntu-latest
python-version: "3.13"
- os: ubuntu-latest
python-version: "3.14"
- os: macos-latest
python-version: "3.14"
- os: windows-latest
python-version: "3.14"

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install uv and Python
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
python-version: ${{ matrix.python-version }}

- name: Install project
run: uv sync --locked --group dev

- name: Test
run: uv run pytest -q

- name: Smoke-test diagnostics
run: uv run elf doctor

- name: Lint
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
run: uv run ruff check elf tests

- name: Check formatting
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
run: uv run ruff format --check elf tests

- name: Type check
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
run: uv run mypy

- name: Build distributions
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
run: uv build

- name: Validate distributions
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
run: |
uvx --from twine twine check dist/*
uvx check-wheel-contents dist/*.whl
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Changelog

Notable user-facing changes to elf are documented here.

## 1.2.0 — 2026-11-15

### Added

- Calendar-aware defaults for archived, active, and reduced-length Advent of Code events.
- Persistent private-leaderboard caching with the required 15-minute refresh interval.
- `elf doctor` for offline configuration, version, clock, and cache diagnostics.
- `elf new YEAR DAY` for safe creation of interactive Python puzzle files with `# %%` cells.
- First-star leaderboard timestamps and deterministic one-row-per-member CSV exports.
- Account-scoped input and submission caches, atomic writes, private permissions, and safe legacy-cache migration.
- Cross-process protection for leaderboard refreshes, guess history, and answer submission.
- Exact server-provided submission cooldown deadlines, exposed as `SubmissionResult.retry_at`.
- Ruff, mypy, network-blocked tests, and Linux, macOS, and Windows CI coverage.

### Changed

- Default commands select the latest relevant puzzle outside December while explicit year and day arguments remain authoritative.
- Internally created HTTP clients now have explicit ownership and are closed reliably; injected clients remain caller-owned.
- JSON and user-provided text are emitted without Rich markup interpretation.
- Existing four-column guess histories are upgraded safely on their next write.

### Fixed

- Cache sharing between different Advent of Code accounts.
- Partial cache files and lost rows during interrupted or concurrent writes.
- Duplicate concurrent submissions and submissions to a locally known completed part.
- Authentication-page handling, malformed cache handling, historical calendar parsing, and several HTTP error messages.
- Windows startup failures on systems without an operating-system timezone database.

### Compatibility

- The documented top-level Python API remains compatible.
- Existing inputs and guess histories are preserved; legacy files remain available for manual recovery.
- `SubmissionResult.retry_at` is an additive optional field and is `None` outside cooldown responses.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include CHANGELOG.md
include elf/templates/day_template.py
include tests/conftest.py
recursive-include tests/fixtures *.html
Loading
Loading