How vincent-stragier/nombres_vers_lettres works
Project type and purpose
• This is an open-source Python library and CLI tool (“nombres_vers_lettres”) whose sole purpose is to convert numeric strings into their French‐language textual representations (cardinal, ordinal, currency).
• The README makes it clear that it installs as a package, exposes a public API (make_letters) and two console entry points (nombres_vers_lettres and nvl).
File structure
• Top level:
• Configuration & metadata: .flake8, setup.py/pyproject.toml/setup.cfg, requirements*.txt, CI workflows under .github/workflows.
• Source code under src/nombres_vers_lettres/
• Unit tests under tests/
• src/nombres_vers_lettres/ contains:
• __main__.py – CLI entry point
• make_letters.py – main conversion logic (parsing, partitioning, assembling text)
• constants.py – language codes, currency codes, rules data
• tests/fr_test.py – verifies correctness against known French representations.
README for additional insights
• Describes:
• Public API (the make_letters function with parameters such as mode, language, gender, plural, post_1990_orthographe)
• CLI usage (arguments, flags mapped one‐to‐one to API parameters)
• Development workflow: pre-commit, pytest, coverage, and CI publishing.