Skip to content

chore: init_db.py in English without pip auto-install - #61

Merged
PPeitsch merged 1 commit into
mainfrom
chore/init-db-english
Oct 4, 2026
Merged

PPeitsch merged 1 commit into
mainfrom
chore/init-db-english

Conversation

@PPeitsch

@PPeitsch PPeitsch commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Description

Closes the last two partial findings of the code review:

  • M4: init_db.py was in Spanish while the UI and docs are in English, and it ran pip install on its own when a package was missing. Now every prompt and message is in English (y/n), and a missing dependency prints the list plus pip install -r requirements.txt and exits with code 1. The fallback .env (when there is neither .env nor .env.example) had stale holiday settings from before feat: holiday provider for any country (Nager.Date) #51 and a fixed SECRET_KEY; it now gets HOLIDAY_COUNTRY=AR and a random key, and the script asks for the holiday country when configuring.
  • M2: the tests still used the legacy Employee.query.get(); they use db.session.get() now. No LegacyAPIWarning is left in the suite.

Type of Change

  • Refactoring
  • Test coverage

Testing

  • install_missing_packages tests replaced by a test that main() exits and points to requirements.txt.
  • pytest -W error::sqlalchemy.exc.LegacyAPIWarning (254 passed), black, isort, mypy clean.
  • Ran init_db.py end to end on a scratch copy without .env: SQLite, migrations, login user, sample data; the generated .env has the new keys.

Screenshots

Not applicable: CLI script.

Checklist

  • I have read the contributing guidelines
  • I have followed the project's code style (Black, isort, PEP 8)
  • My code generates no new warnings

@PPeitsch
PPeitsch merged commit 37a4dab into main Oct 4, 2026
2 checks passed
@PPeitsch
PPeitsch deleted the chore/init-db-english branch October 4, 2026 18:29
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PPeitsch PPeitsch mentioned this pull request Oct 4, 2026
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.

1 participant