Skip to content

Conversation

@PPeitsch
Copy link
Owner

Description

This pull request addresses the inconsistency in the application's default data by standardizing all initial absence codes to English. It improves the out-of-the-box user experience and enhances code quality.

Key changes include:

  • The data initialization script (init_data.py) now seeds the database with a universal set of English-language absence codes (e.g., "Sick Leave", "Vacation") instead of the previous Spanish examples.
  • The initialization script has been refactored to improve readability by extracting the default codes into a module-level constant.
  • The redundant and unused ABSENCE_CODES list has been removed from config.py, establishing the database as the single source of truth.

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation update
  • UI/UX improvement
  • Code style update
  • Test coverage
  • Configuration change

Testing

The changes were verified manually through the following steps:

  1. Deleted the local database to simulate a fresh installation.
  2. Ran the database initialization script: python init_db.py.
  3. Launched the application.
  4. Navigated to the Settings -> Absence Codes page and confirmed that the new, standardized English codes were correctly populated.
  5. Navigated to the Manual Entry page and verified that the "Type" dropdown also contained the new English codes.

Screenshots

A screenshot of the "Existing Absence Codes" table on the Settings page would be appropriate here to show the new default values.

Checklist

  • I have followed the project's code style (Black, isort, PEP 8)
  • My code generates no new warnings
  • I have added tests for new functionality
  • All tests pass locally
  • I have updated the documentation where necessary
  • I have run pre-commit hooks before submitting

Fixes #32

@PPeitsch PPeitsch merged commit fe6bc40 into main Nov 18, 2025
1 check passed
@PPeitsch PPeitsch deleted the feature/standardize-absence-codes branch November 18, 2025 03:54
@PPeitsch PPeitsch linked an issue Nov 18, 2025 that may be closed by this pull request
1 task
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
app/utils/init_data.py 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
app/config/config.py 100.00% <ø> (ø)
app/utils/init_data.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚡ [Feature]: Standardize day types to English and improve initial data

2 participants