v1.3.5
Phase 1 — Bug fixes & cleanup:
- models.py: Hardcoded model IDs (were random on every import), removed import random, removed placeholder comments, added type hints and all
- parse_input.py: Fixed raise UnicodeDecodeError(message) crash → raise ValueError(...), fixed print((tuple)) → warnings.warn(f-string), renamed answer, question → back, front for clarity, added type hints and
docstrings - generate_deck.py: Fixed absolute import → relative import, added type hints and docstrings
- cli.py: Renamed input → input_file (no longer shadows builtin), added type hints
- init.py: Added version = "1.3.4"
Phase 2 — New features:
- --version flag
- --reverse flag (swap front/back)
- --dry-run / --preview (preview cards without writing)
- --tags (comma-separated Anki tags)
- -i / --extra-input (merge additional input files, repeatable)
- Dynamic card_model choices from MODELS dict
- Input file validation via click.Path(exists=True)
Phase 3 — Test infrastructure:
- Moved test data to tests/test_data/
- Created tests/conftest.py with shared fixtures
Phase 4 — New tests (50 total, up from ~15):
- test_parse_input.py: Added TestDetectEncoding, TestFillQuestionAnswerDict, TestGetCardDetails, TestEdgeCases
- test_generate_deck.py: Added TestWritePackage
- test_cli.py: Complete rewrite with CliRunner — 13 tests covering all options
- test_models.py: Added TestModelsDict (5 tests for MODELS/EXTRA_FIELDS dicts)
Phase 5-6 — Config & docs:
- noxfile.py: Python 3.12 + 3.13
- pyproject.toml: Added license, repository, keywords, classifiers, pytest config
- TODOs.md: Marked items as done
- README.md: Updated CLI help output