num2words2 0.1.0.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. num2words2-0.1.0.dev1/.coveragerc +5 -0
  2. num2words2-0.1.0.dev1/.flake8 +14 -0
  3. num2words2-0.1.0.dev1/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
  4. num2words2-0.1.0.dev1/.github/ISSUE_TEMPLATE/feature_request.md +30 -0
  5. num2words2-0.1.0.dev1/.github/ISSUE_TEMPLATE/language_support.md +71 -0
  6. num2words2-0.1.0.dev1/.github/dependabot.yml +34 -0
  7. num2words2-0.1.0.dev1/.github/pull_request_template.md +28 -0
  8. num2words2-0.1.0.dev1/.github/workflows/ci.yml +60 -0
  9. num2words2-0.1.0.dev1/.github/workflows/codeql-analysis.yml +46 -0
  10. num2words2-0.1.0.dev1/.github/workflows/e2e-tests.yml +118 -0
  11. num2words2-0.1.0.dev1/.github/workflows/lint.yml +48 -0
  12. num2words2-0.1.0.dev1/.github/workflows/manual-publish.yml +90 -0
  13. num2words2-0.1.0.dev1/.github/workflows/manual-release.yml +88 -0
  14. num2words2-0.1.0.dev1/.github/workflows/pr-size.yml +67 -0
  15. num2words2-0.1.0.dev1/.github/workflows/publish-pypi.yml +78 -0
  16. num2words2-0.1.0.dev1/.github/workflows/python-publish.yml +83 -0
  17. num2words2-0.1.0.dev1/.github/workflows/release.yml +208 -0
  18. num2words2-0.1.0.dev1/.github/workflows/scheduled-test.yml +43 -0
  19. num2words2-0.1.0.dev1/.gitignore +25 -0
  20. num2words2-0.1.0.dev1/.pre-commit-config.yaml +58 -0
  21. num2words2-0.1.0.dev1/.pypirc.example +12 -0
  22. num2words2-0.1.0.dev1/CONTRIBUTING.md +53 -0
  23. num2words2-0.1.0.dev1/COPYING +145 -0
  24. num2words2-0.1.0.dev1/ISSUE_TEMPLATE.md +13 -0
  25. num2words2-0.1.0.dev1/LOCAL_TESTING.md +281 -0
  26. num2words2-0.1.0.dev1/MANIFEST.in +4 -0
  27. num2words2-0.1.0.dev1/MIGRATION_GUIDE.md +398 -0
  28. num2words2-0.1.0.dev1/Makefile +133 -0
  29. num2words2-0.1.0.dev1/PKG-INFO +244 -0
  30. num2words2-0.1.0.dev1/PULL_REQUEST_TEMPLATE.md +20 -0
  31. num2words2-0.1.0.dev1/README.rst +207 -0
  32. num2words2-0.1.0.dev1/README_num2words2.md +317 -0
  33. num2words2-0.1.0.dev1/SKILL.md +522 -0
  34. num2words2-0.1.0.dev1/backward_translate_e2e_tests.py +302 -0
  35. num2words2-0.1.0.dev1/bin/num2words +98 -0
  36. num2words2-0.1.0.dev1/bin/num2words2 +98 -0
  37. num2words2-0.1.0.dev1/docker-compose.yml +7 -0
  38. num2words2-0.1.0.dev1/fix_test_expectations.py +180 -0
  39. num2words2-0.1.0.dev1/generate_e2e_tests.py +238 -0
  40. num2words2-0.1.0.dev1/generate_tests_with_ai.py +244 -0
  41. num2words2-0.1.0.dev1/migration/migrate_to_num2words2.py +209 -0
  42. num2words2-0.1.0.dev1/num2words2/README.md +69 -0
  43. num2words2-0.1.0.dev1/num2words2/__init__.py +196 -0
  44. num2words2-0.1.0.dev1/num2words2/_version.py +3 -0
  45. num2words2-0.1.0.dev1/num2words2/base.py +377 -0
  46. num2words2-0.1.0.dev1/num2words2/compat.py +29 -0
  47. num2words2-0.1.0.dev1/num2words2/currency.py +60 -0
  48. num2words2-0.1.0.dev1/num2words2/lang_AF.py +202 -0
  49. num2words2-0.1.0.dev1/num2words2/lang_AM.py +193 -0
  50. num2words2-0.1.0.dev1/num2words2/lang_AR.py +435 -0
  51. num2words2-0.1.0.dev1/num2words2/lang_AS.py +119 -0
  52. num2words2-0.1.0.dev1/num2words2/lang_AZ.py +208 -0
  53. num2words2-0.1.0.dev1/num2words2/lang_BA.py +119 -0
  54. num2words2-0.1.0.dev1/num2words2/lang_BE.py +356 -0
  55. num2words2-0.1.0.dev1/num2words2/lang_BG.py +393 -0
  56. num2words2-0.1.0.dev1/num2words2/lang_BN.py +242 -0
  57. num2words2-0.1.0.dev1/num2words2/lang_BO.py +122 -0
  58. num2words2-0.1.0.dev1/num2words2/lang_BR.py +135 -0
  59. num2words2-0.1.0.dev1/num2words2/lang_BS.py +189 -0
  60. num2words2-0.1.0.dev1/num2words2/lang_CA.py +476 -0
  61. num2words2-0.1.0.dev1/num2words2/lang_CE.py +546 -0
  62. num2words2-0.1.0.dev1/num2words2/lang_CS.py +260 -0
  63. num2words2-0.1.0.dev1/num2words2/lang_CY.py +574 -0
  64. num2words2-0.1.0.dev1/num2words2/lang_DA.py +170 -0
  65. num2words2-0.1.0.dev1/num2words2/lang_DE.py +180 -0
  66. num2words2-0.1.0.dev1/num2words2/lang_EL.py +338 -0
  67. num2words2-0.1.0.dev1/num2words2/lang_EN.py +118 -0
  68. num2words2-0.1.0.dev1/num2words2/lang_EN_IN.py +26 -0
  69. num2words2-0.1.0.dev1/num2words2/lang_EN_NG.py +45 -0
  70. num2words2-0.1.0.dev1/num2words2/lang_EO.py +130 -0
  71. num2words2-0.1.0.dev1/num2words2/lang_ES.py +399 -0
  72. num2words2-0.1.0.dev1/num2words2/lang_ES_CO.py +37 -0
  73. num2words2-0.1.0.dev1/num2words2/lang_ES_CR.py +38 -0
  74. num2words2-0.1.0.dev1/num2words2/lang_ES_GT.py +37 -0
  75. num2words2-0.1.0.dev1/num2words2/lang_ES_NI.py +35 -0
  76. num2words2-0.1.0.dev1/num2words2/lang_ES_VE.py +43 -0
  77. num2words2-0.1.0.dev1/num2words2/lang_ET.py +393 -0
  78. num2words2-0.1.0.dev1/num2words2/lang_EU.py +158 -0
  79. num2words2-0.1.0.dev1/num2words2/lang_EUR.py +104 -0
  80. num2words2-0.1.0.dev1/num2words2/lang_FA.py +187 -0
  81. num2words2-0.1.0.dev1/num2words2/lang_FI.py +759 -0
  82. num2words2-0.1.0.dev1/num2words2/lang_FO.py +136 -0
  83. num2words2-0.1.0.dev1/num2words2/lang_FR.py +133 -0
  84. num2words2-0.1.0.dev1/num2words2/lang_FR_BE.py +49 -0
  85. num2words2-0.1.0.dev1/num2words2/lang_FR_CH.py +48 -0
  86. num2words2-0.1.0.dev1/num2words2/lang_FR_DZ.py +35 -0
  87. num2words2-0.1.0.dev1/num2words2/lang_GL.py +135 -0
  88. num2words2-0.1.0.dev1/num2words2/lang_GU.py +172 -0
  89. num2words2-0.1.0.dev1/num2words2/lang_HA.py +293 -0
  90. num2words2-0.1.0.dev1/num2words2/lang_HAW.py +144 -0
  91. num2words2-0.1.0.dev1/num2words2/lang_HE.py +314 -0
  92. num2words2-0.1.0.dev1/num2words2/lang_HI.py +243 -0
  93. num2words2-0.1.0.dev1/num2words2/lang_HR.py +304 -0
  94. num2words2-0.1.0.dev1/num2words2/lang_HT.py +136 -0
  95. num2words2-0.1.0.dev1/num2words2/lang_HU.py +189 -0
  96. num2words2-0.1.0.dev1/num2words2/lang_HY.py +364 -0
  97. num2words2-0.1.0.dev1/num2words2/lang_ID.py +242 -0
  98. num2words2-0.1.0.dev1/num2words2/lang_IS.py +208 -0
  99. num2words2-0.1.0.dev1/num2words2/lang_IT.py +265 -0
  100. num2words2-0.1.0.dev1/num2words2/lang_JA.py +615 -0
  101. num2words2-0.1.0.dev1/num2words2/lang_JW.py +136 -0
  102. num2words2-0.1.0.dev1/num2words2/lang_KA.py +169 -0
  103. num2words2-0.1.0.dev1/num2words2/lang_KK.py +136 -0
  104. num2words2-0.1.0.dev1/num2words2/lang_KM.py +173 -0
  105. num2words2-0.1.0.dev1/num2words2/lang_KN.py +182 -0
  106. num2words2-0.1.0.dev1/num2words2/lang_KO.py +175 -0
  107. num2words2-0.1.0.dev1/num2words2/lang_KZ.py +161 -0
  108. num2words2-0.1.0.dev1/num2words2/lang_LA.py +135 -0
  109. num2words2-0.1.0.dev1/num2words2/lang_LB.py +135 -0
  110. num2words2-0.1.0.dev1/num2words2/lang_LN.py +136 -0
  111. num2words2-0.1.0.dev1/num2words2/lang_LO.py +149 -0
  112. num2words2-0.1.0.dev1/num2words2/lang_LT.py +283 -0
  113. num2words2-0.1.0.dev1/num2words2/lang_LV.py +266 -0
  114. num2words2-0.1.0.dev1/num2words2/lang_MG.py +143 -0
  115. num2words2-0.1.0.dev1/num2words2/lang_MI.py +151 -0
  116. num2words2-0.1.0.dev1/num2words2/lang_MK.py +136 -0
  117. num2words2-0.1.0.dev1/num2words2/lang_ML.py +159 -0
  118. num2words2-0.1.0.dev1/num2words2/lang_MN.py +319 -0
  119. num2words2-0.1.0.dev1/num2words2/lang_MR.py +187 -0
  120. num2words2-0.1.0.dev1/num2words2/lang_MS.py +293 -0
  121. num2words2-0.1.0.dev1/num2words2/lang_MT.py +159 -0
  122. num2words2-0.1.0.dev1/num2words2/lang_MY.py +152 -0
  123. num2words2-0.1.0.dev1/num2words2/lang_NE.py +157 -0
  124. num2words2-0.1.0.dev1/num2words2/lang_NL.py +204 -0
  125. num2words2-0.1.0.dev1/num2words2/lang_NN.py +136 -0
  126. num2words2-0.1.0.dev1/num2words2/lang_NO.py +143 -0
  127. num2words2-0.1.0.dev1/num2words2/lang_OC.py +135 -0
  128. num2words2-0.1.0.dev1/num2words2/lang_PA.py +159 -0
  129. num2words2-0.1.0.dev1/num2words2/lang_PL.py +336 -0
  130. num2words2-0.1.0.dev1/num2words2/lang_PS.py +136 -0
  131. num2words2-0.1.0.dev1/num2words2/lang_PT.py +280 -0
  132. num2words2-0.1.0.dev1/num2words2/lang_PT_BR.py +224 -0
  133. num2words2-0.1.0.dev1/num2words2/lang_RO.py +183 -0
  134. num2words2-0.1.0.dev1/num2words2/lang_RU.py +570 -0
  135. num2words2-0.1.0.dev1/num2words2/lang_SA.py +136 -0
  136. num2words2-0.1.0.dev1/num2words2/lang_SD.py +136 -0
  137. num2words2-0.1.0.dev1/num2words2/lang_SI.py +152 -0
  138. num2words2-0.1.0.dev1/num2words2/lang_SK.py +250 -0
  139. num2words2-0.1.0.dev1/num2words2/lang_SL.py +306 -0
  140. num2words2-0.1.0.dev1/num2words2/lang_SN.py +447 -0
  141. num2words2-0.1.0.dev1/num2words2/lang_SO.py +136 -0
  142. num2words2-0.1.0.dev1/num2words2/lang_SQ.py +252 -0
  143. num2words2-0.1.0.dev1/num2words2/lang_SR.py +254 -0
  144. num2words2-0.1.0.dev1/num2words2/lang_SU.py +136 -0
  145. num2words2-0.1.0.dev1/num2words2/lang_SV.py +169 -0
  146. num2words2-0.1.0.dev1/num2words2/lang_SW.py +219 -0
  147. num2words2-0.1.0.dev1/num2words2/lang_TA.py +303 -0
  148. num2words2-0.1.0.dev1/num2words2/lang_TE.py +169 -0
  149. num2words2-0.1.0.dev1/num2words2/lang_TET.py +285 -0
  150. num2words2-0.1.0.dev1/num2words2/lang_TG.py +149 -0
  151. num2words2-0.1.0.dev1/num2words2/lang_TH.py +214 -0
  152. num2words2-0.1.0.dev1/num2words2/lang_TK.py +136 -0
  153. num2words2-0.1.0.dev1/num2words2/lang_TL.py +145 -0
  154. num2words2-0.1.0.dev1/num2words2/lang_TR.py +882 -0
  155. num2words2-0.1.0.dev1/num2words2/lang_TT.py +136 -0
  156. num2words2-0.1.0.dev1/num2words2/lang_UK.py +1101 -0
  157. num2words2-0.1.0.dev1/num2words2/lang_UR.py +168 -0
  158. num2words2-0.1.0.dev1/num2words2/lang_UZ.py +136 -0
  159. num2words2-0.1.0.dev1/num2words2/lang_VI.py +143 -0
  160. num2words2-0.1.0.dev1/num2words2/lang_WO.py +136 -0
  161. num2words2-0.1.0.dev1/num2words2/lang_YI.py +135 -0
  162. num2words2-0.1.0.dev1/num2words2/lang_YO.py +136 -0
  163. num2words2-0.1.0.dev1/num2words2/lang_ZH.py +296 -0
  164. num2words2-0.1.0.dev1/num2words2/lang_ZH_CN.py +85 -0
  165. num2words2-0.1.0.dev1/num2words2/lang_ZH_HK.py +48 -0
  166. num2words2-0.1.0.dev1/num2words2/lang_ZH_TW.py +198 -0
  167. num2words2-0.1.0.dev1/num2words2/utils.py +35 -0
  168. num2words2-0.1.0.dev1/num2words2.egg-info/PKG-INFO +244 -0
  169. num2words2-0.1.0.dev1/num2words2.egg-info/SOURCES.txt +270 -0
  170. num2words2-0.1.0.dev1/num2words2.egg-info/dependency_links.txt +1 -0
  171. num2words2-0.1.0.dev1/num2words2.egg-info/entry_points.txt +2 -0
  172. num2words2-0.1.0.dev1/num2words2.egg-info/requires.txt +1 -0
  173. num2words2-0.1.0.dev1/num2words2.egg-info/top_level.txt +1 -0
  174. num2words2-0.1.0.dev1/pyproject.toml +58 -0
  175. num2words2-0.1.0.dev1/run_all_tests.py +202 -0
  176. num2words2-0.1.0.dev1/run_e2e_csv_tests.py +109 -0
  177. num2words2-0.1.0.dev1/scripts/create_release.sh +88 -0
  178. num2words2-0.1.0.dev1/setup.cfg +4 -0
  179. num2words2-0.1.0.dev1/setup.py +62 -0
  180. num2words2-0.1.0.dev1/tests/__init__.py +0 -0
  181. num2words2-0.1.0.dev1/tests/e2e_test_suite.csv +741 -0
  182. num2words2-0.1.0.dev1/tests/requirements-test.txt +9 -0
  183. num2words2-0.1.0.dev1/tests/run_e2e_tests.py +346 -0
  184. num2words2-0.1.0.dev1/tests/test_af.py +300 -0
  185. num2words2-0.1.0.dev1/tests/test_all_python_versions.py +342 -0
  186. num2words2-0.1.0.dev1/tests/test_am.py +100 -0
  187. num2words2-0.1.0.dev1/tests/test_ar.py +217 -0
  188. num2words2-0.1.0.dev1/tests/test_az.py +295 -0
  189. num2words2-0.1.0.dev1/tests/test_base.py +88 -0
  190. num2words2-0.1.0.dev1/tests/test_be.py +405 -0
  191. num2words2-0.1.0.dev1/tests/test_bg.py +225 -0
  192. num2words2-0.1.0.dev1/tests/test_bg_coverage.py +125 -0
  193. num2words2-0.1.0.dev1/tests/test_bn.py +371 -0
  194. num2words2-0.1.0.dev1/tests/test_ca.py +187 -0
  195. num2words2-0.1.0.dev1/tests/test_ce.py +420 -0
  196. num2words2-0.1.0.dev1/tests/test_cli.py +113 -0
  197. num2words2-0.1.0.dev1/tests/test_cs.py +125 -0
  198. num2words2-0.1.0.dev1/tests/test_currency.py +63 -0
  199. num2words2-0.1.0.dev1/tests/test_currency_comprehensive.py +245 -0
  200. num2words2-0.1.0.dev1/tests/test_cy.py +479 -0
  201. num2words2-0.1.0.dev1/tests/test_da.py +52 -0
  202. num2words2-0.1.0.dev1/tests/test_de.py +170 -0
  203. num2words2-0.1.0.dev1/tests/test_el.py +255 -0
  204. num2words2-0.1.0.dev1/tests/test_en.py +209 -0
  205. num2words2-0.1.0.dev1/tests/test_en_in.py +95 -0
  206. num2words2-0.1.0.dev1/tests/test_en_ng.py +150 -0
  207. num2words2-0.1.0.dev1/tests/test_eo.py +184 -0
  208. num2words2-0.1.0.dev1/tests/test_errors.py +33 -0
  209. num2words2-0.1.0.dev1/tests/test_es.py +2804 -0
  210. num2words2-0.1.0.dev1/tests/test_es_co.py +67 -0
  211. num2words2-0.1.0.dev1/tests/test_es_cr.py +68 -0
  212. num2words2-0.1.0.dev1/tests/test_es_gt.py +67 -0
  213. num2words2-0.1.0.dev1/tests/test_es_ni.py +42 -0
  214. num2words2-0.1.0.dev1/tests/test_es_ve.py +66 -0
  215. num2words2-0.1.0.dev1/tests/test_et.py +210 -0
  216. num2words2-0.1.0.dev1/tests/test_et_coverage.py +102 -0
  217. num2words2-0.1.0.dev1/tests/test_fa.py +115 -0
  218. num2words2-0.1.0.dev1/tests/test_fi.py +2771 -0
  219. num2words2-0.1.0.dev1/tests/test_fr.py +214 -0
  220. num2words2-0.1.0.dev1/tests/test_fr_be.py +135 -0
  221. num2words2-0.1.0.dev1/tests/test_fr_ch.py +133 -0
  222. num2words2-0.1.0.dev1/tests/test_fr_dz.py +71 -0
  223. num2words2-0.1.0.dev1/tests/test_fractional_cents.py +600 -0
  224. num2words2-0.1.0.dev1/tests/test_ha.py +192 -0
  225. num2words2-0.1.0.dev1/tests/test_he.py +513 -0
  226. num2words2-0.1.0.dev1/tests/test_hi.py +307 -0
  227. num2words2-0.1.0.dev1/tests/test_hr.py +216 -0
  228. num2words2-0.1.0.dev1/tests/test_hu.py +219 -0
  229. num2words2-0.1.0.dev1/tests/test_hy.py +604 -0
  230. num2words2-0.1.0.dev1/tests/test_id.py +69 -0
  231. num2words2-0.1.0.dev1/tests/test_is.py +100 -0
  232. num2words2-0.1.0.dev1/tests/test_it.py +322 -0
  233. num2words2-0.1.0.dev1/tests/test_ja.py +223 -0
  234. num2words2-0.1.0.dev1/tests/test_kn.py +79 -0
  235. num2words2-0.1.0.dev1/tests/test_ko.py +100 -0
  236. num2words2-0.1.0.dev1/tests/test_kz.py +92 -0
  237. num2words2-0.1.0.dev1/tests/test_local.sh +255 -0
  238. num2words2-0.1.0.dev1/tests/test_lt.py +197 -0
  239. num2words2-0.1.0.dev1/tests/test_lv.py +173 -0
  240. num2words2-0.1.0.dev1/tests/test_mn.py +158 -0
  241. num2words2-0.1.0.dev1/tests/test_ms.py +213 -0
  242. num2words2-0.1.0.dev1/tests/test_ms_coverage.py +82 -0
  243. num2words2-0.1.0.dev1/tests/test_nl.py +140 -0
  244. num2words2-0.1.0.dev1/tests/test_no.py +92 -0
  245. num2words2-0.1.0.dev1/tests/test_pl.py +177 -0
  246. num2words2-0.1.0.dev1/tests/test_pt.py +463 -0
  247. num2words2-0.1.0.dev1/tests/test_pt_BR.py +409 -0
  248. num2words2-0.1.0.dev1/tests/test_ro.py +201 -0
  249. num2words2-0.1.0.dev1/tests/test_ru.py +500 -0
  250. num2words2-0.1.0.dev1/tests/test_sk.py +97 -0
  251. num2words2-0.1.0.dev1/tests/test_sl.py +214 -0
  252. num2words2-0.1.0.dev1/tests/test_sn.py +227 -0
  253. num2words2-0.1.0.dev1/tests/test_sq.py +287 -0
  254. num2words2-0.1.0.dev1/tests/test_sr.py +248 -0
  255. num2words2-0.1.0.dev1/tests/test_sv.py +75 -0
  256. num2words2-0.1.0.dev1/tests/test_sw.py +215 -0
  257. num2words2-0.1.0.dev1/tests/test_ta.py +209 -0
  258. num2words2-0.1.0.dev1/tests/test_ta_coverage.py +89 -0
  259. num2words2-0.1.0.dev1/tests/test_te.py +76 -0
  260. num2words2-0.1.0.dev1/tests/test_tet.py +547 -0
  261. num2words2-0.1.0.dev1/tests/test_tg.py +124 -0
  262. num2words2-0.1.0.dev1/tests/test_th.py +215 -0
  263. num2words2-0.1.0.dev1/tests/test_tr.py +209 -0
  264. num2words2-0.1.0.dev1/tests/test_uk.py +3395 -0
  265. num2words2-0.1.0.dev1/tests/test_utils.py +41 -0
  266. num2words2-0.1.0.dev1/tests/test_vi.py +146 -0
  267. num2words2-0.1.0.dev1/tests/test_zh.py +202 -0
  268. num2words2-0.1.0.dev1/tests/test_zh_cn.py +106 -0
  269. num2words2-0.1.0.dev1/tests/test_zh_hk.py +71 -0
  270. num2words2-0.1.0.dev1/tests/test_zh_tw.py +164 -0
  271. num2words2-0.1.0.dev1/tox.ini +39 -0
  272. num2words2-0.1.0.dev1/translate_e2e_tests.py +259 -0
@@ -0,0 +1,5 @@
1
+ [run]
2
+ branch = true
3
+ source =
4
+ num2words2
5
+ tests
@@ -0,0 +1,14 @@
1
+ [flake8]
2
+ max-line-length = 160
3
+ exclude =
4
+ .tox,
5
+ venv,
6
+ build,
7
+ dist,
8
+ num2words2/_version.py,
9
+ .git,
10
+ __pycache__,
11
+ *.egg-info
12
+ ignore = E501,W503,W504
13
+ per-file-ignores =
14
+ tests/*:E501,W293,W292,W503,W504
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ ```python
16
+ # Code example that demonstrates the issue
17
+ from num2words2 import num2words
18
+ # Your code here
19
+ ```
20
+
21
+ **Expected behavior**
22
+ A clear and concise description of what you expected to happen.
23
+
24
+ **Actual behavior**
25
+ What actually happened instead.
26
+
27
+ **Environment (please complete the following information):**
28
+ - OS: [e.g. Ubuntu 20.04]
29
+ - Python version: [e.g. 3.9.5]
30
+ - num2words2 version: [e.g. 0.5.15]
31
+ - Language/locale: [e.g. en, fr, es]
32
+
33
+ **Additional context**
34
+ Add any other context about the problem here.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Language Support Request**
20
+ If this is a request for a new language:
21
+ - Language name:
22
+ - ISO 639-1 code:
23
+ - Example numbers and their text representation:
24
+ - 1:
25
+ - 10:
26
+ - 100:
27
+ - 1000:
28
+
29
+ **Additional context**
30
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: Language Support
3
+ about: Request support for a new language
4
+ title: 'Add support for [LANGUAGE NAME]'
5
+ labels: language-support
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Language Information**
11
+ - Language name:
12
+ - ISO 639-1 code:
13
+ - ISO 639-2 code:
14
+ - Writing system:
15
+ - Number of native speakers (approximate):
16
+
17
+ **Number System**
18
+ Please provide examples of how numbers are written in this language:
19
+
20
+ **Cardinal Numbers:**
21
+ - 0:
22
+ - 1:
23
+ - 2:
24
+ - 10:
25
+ - 11:
26
+ - 20:
27
+ - 21:
28
+ - 100:
29
+ - 101:
30
+ - 200:
31
+ - 1000:
32
+ - 1001:
33
+ - 10000:
34
+ - 100000:
35
+ - 1000000:
36
+
37
+ **Ordinal Numbers:**
38
+ - 1st:
39
+ - 2nd:
40
+ - 3rd:
41
+ - 10th:
42
+ - 11th:
43
+ - 20th:
44
+ - 100th:
45
+
46
+ **Decimal Numbers:**
47
+ - 0.5:
48
+ - 1.5:
49
+ - 10.25:
50
+
51
+ **Negative Numbers:**
52
+ - -1:
53
+ - -10:
54
+ - -100:
55
+
56
+ **Special Cases or Rules**
57
+ Please describe any special grammatical rules, gender agreements, or other considerations for number words in this language:
58
+
59
+ **Currency**
60
+ If applicable, how are currency amounts expressed:
61
+ - Currency name:
62
+ - Currency code:
63
+ - Example: 1.50 [currency] =
64
+
65
+ **Resources**
66
+ Please provide any reference materials or authoritative sources for the number system in this language:
67
+
68
+ **Are you willing to help implement this?**
69
+ - [ ] Yes, I can help with implementation
70
+ - [ ] Yes, I can help with testing
71
+ - [ ] No, but I can provide more examples if needed
@@ -0,0 +1,34 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+
4
+ version: 2
5
+ updates:
6
+ # Maintain dependencies for pip
7
+ - package-ecosystem: "pip"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
11
+ day: "monday"
12
+ time: "03:00"
13
+ labels:
14
+ - "dependencies"
15
+ - "python"
16
+ commit-message:
17
+ prefix: "chore"
18
+ include: "scope"
19
+ open-pull-requests-limit: 10
20
+
21
+ # Maintain dependencies for GitHub Actions
22
+ - package-ecosystem: "github-actions"
23
+ directory: "/"
24
+ schedule:
25
+ interval: "weekly"
26
+ day: "monday"
27
+ time: "03:00"
28
+ labels:
29
+ - "dependencies"
30
+ - "github-actions"
31
+ commit-message:
32
+ prefix: "ci"
33
+ include: "scope"
34
+ open-pull-requests-limit: 10
@@ -0,0 +1,28 @@
1
+ ## Description
2
+ Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
3
+
4
+ Fixes # (issue)
5
+
6
+ ## Type of change
7
+ Please delete options that are not relevant.
8
+
9
+ - [ ] Bug fix (non-breaking change which fixes an issue)
10
+ - [ ] New feature (non-breaking change which adds functionality)
11
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12
+ - [ ] This change requires a documentation update
13
+
14
+ ## Checklist:
15
+ - [ ] My code follows the style guidelines of this project
16
+ - [ ] I have performed a self-review of my own code
17
+ - [ ] I have commented my code, particularly in hard-to-understand areas
18
+ - [ ] I have made corresponding changes to the documentation
19
+ - [ ] My changes generate no new warnings
20
+ - [ ] I have added tests that prove my fix is effective or that my feature works
21
+ - [ ] New and existing unit tests pass locally with my changes
22
+ - [ ] Any dependent changes have been merged and published in downstream modules
23
+
24
+ ## Language Support
25
+ If adding support for a new language:
26
+ - [ ] Added comprehensive test cases
27
+ - [ ] Updated README.md with the new language
28
+ - [ ] Followed the existing language module structure
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ python-version: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13']
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0 # For setuptools_scm
17
+ - name: Set up Python ${{ matrix.python-version }}
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install tox tox-gh-actions coveralls
25
+ pip install -r tests/requirements-test.txt
26
+ - name: Test with tox
27
+ run: |
28
+ tox -v || (echo "Tox failed. Here's the log:" && cat .tox/*/log/*.log 2>/dev/null && exit 1)
29
+ - name: Build package
30
+ if: matrix.python-version == '3.11'
31
+ run: |
32
+ pip install build
33
+ python -m build
34
+ ls -la dist/
35
+ - name: Upload build artifacts
36
+ if: matrix.python-version == '3.11'
37
+ uses: actions/upload-artifact@v4
38
+ with:
39
+ name: python-package-distributions
40
+ path: dist/
41
+ - name: Upload coverage data to coveralls.io
42
+ run: coveralls --service=github
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45
+ COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
46
+ COVERALLS_PARALLEL: true
47
+ continue-on-error: true
48
+
49
+ coveralls:
50
+ name: Indicate completion to coveralls.io
51
+ needs: build
52
+ runs-on: ubuntu-latest
53
+ container: python:3-slim
54
+ steps:
55
+ - name: Finished
56
+ run: |
57
+ pip3 install --upgrade coveralls
58
+ coveralls --service=github --finish
59
+ env:
60
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,46 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ push:
5
+ branches: [ master, main ]
6
+ pull_request:
7
+ # The branches below must be a subset of the branches above
8
+ branches: [ master, main ]
9
+ schedule:
10
+ - cron: '45 23 * * 5'
11
+
12
+ jobs:
13
+ analyze:
14
+ name: Analyze
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ actions: read
18
+ contents: read
19
+ security-events: write
20
+
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ language: [ 'python' ]
25
+
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@v4
29
+
30
+ # Initializes the CodeQL tools for scanning.
31
+ - name: Initialize CodeQL
32
+ uses: github/codeql-action/init@v3
33
+ with:
34
+ languages: ${{ matrix.language }}
35
+ # If you wish to specify custom queries, you can do so here or in a config file.
36
+ # By default, queries listed here will override any specified in a config file.
37
+ # Prefix the list here with "+" to use these queries and those in the config file.
38
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
39
+
40
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
41
+ # If this step fails, then you should remove it and run the build manually (see below)
42
+ - name: Autobuild
43
+ uses: github/codeql-action/autobuild@v3
44
+
45
+ - name: Perform CodeQL Analysis
46
+ uses: github/codeql-action/analyze@v3
@@ -0,0 +1,118 @@
1
+ name: E2E Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ master, main, develop ]
6
+ paths:
7
+ - 'num2words2/**'
8
+ - 'tests/**'
9
+ - 'tests/run_e2e_tests.py'
10
+ - 'tests/e2e_test_suite.csv'
11
+ - '.github/workflows/e2e-tests.yml'
12
+ pull_request:
13
+ branches: [ master, main ]
14
+ paths:
15
+ - 'num2words2/**'
16
+ - 'tests/**'
17
+ - 'tests/run_e2e_tests.py'
18
+ - 'tests/e2e_test_suite.csv'
19
+ schedule:
20
+ # Run daily at 2 AM UTC
21
+ - cron: '0 2 * * *'
22
+ workflow_dispatch:
23
+ inputs:
24
+ test_limit:
25
+ description: 'Number of tests to run (empty for all)'
26
+ required: false
27
+ default: ''
28
+
29
+ jobs:
30
+ test:
31
+ runs-on: ${{ matrix.os }}
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ os: [ubuntu-latest, macos-latest, windows-latest]
36
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
37
+ include:
38
+ # Test on PyPy as well
39
+ - os: ubuntu-latest
40
+ python-version: 'pypy-3.9'
41
+ - os: ubuntu-latest
42
+ python-version: 'pypy-3.10'
43
+
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+
47
+ - name: Set up Python ${{ matrix.python-version }}
48
+ uses: actions/setup-python@v5
49
+ with:
50
+ python-version: ${{ matrix.python-version }}
51
+ cache: 'pip'
52
+
53
+ - name: Install dependencies
54
+ run: |
55
+ python -m pip install --upgrade pip
56
+ pip install pytest pytest-cov
57
+ pip install -e .
58
+
59
+ - name: Quick E2E Test (PR/Push)
60
+ if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
61
+ run: |
62
+ python tests/run_e2e_tests.py --quick --detailed
63
+ continue-on-error: ${{ matrix.python-version == 'pypy-3.9' || matrix.python-version == 'pypy-3.10' }}
64
+
65
+ - name: Full E2E Test (Scheduled)
66
+ if: github.event_name == 'schedule'
67
+ run: |
68
+ python tests/run_e2e_tests.py --detailed --limit 10000
69
+ continue-on-error: ${{ matrix.python-version == 'pypy-3.9' || matrix.python-version == 'pypy-3.10' }}
70
+
71
+ - name: Custom E2E Test (Manual)
72
+ if: github.event_name == 'workflow_dispatch'
73
+ run: |
74
+ if [ -z "${{ github.event.inputs.test_limit }}" ]; then
75
+ python tests/run_e2e_tests.py --detailed
76
+ else
77
+ python tests/run_e2e_tests.py --detailed --limit ${{ github.event.inputs.test_limit }}
78
+ fi
79
+ shell: bash
80
+ continue-on-error: ${{ matrix.python-version == 'pypy-3.9' || matrix.python-version == 'pypy-3.10' }}
81
+
82
+ - name: Upload test results
83
+ if: always()
84
+ uses: actions/upload-artifact@v4
85
+ with:
86
+ name: e2e-results-${{ matrix.os }}-${{ matrix.python-version }}
87
+ path: |
88
+ *.log
89
+ test-results/
90
+ retention-days: 30
91
+
92
+ summary:
93
+ needs: test
94
+ runs-on: ubuntu-latest
95
+ if: always()
96
+ steps:
97
+ - uses: actions/checkout@v4
98
+
99
+ - name: Set up Python
100
+ uses: actions/setup-python@v5
101
+ with:
102
+ python-version: '3.11'
103
+
104
+ - name: Create summary
105
+ run: |
106
+ echo "# E2E Test Results Summary" >> $GITHUB_STEP_SUMMARY
107
+ echo "" >> $GITHUB_STEP_SUMMARY
108
+ echo "## Test Configuration" >> $GITHUB_STEP_SUMMARY
109
+ echo "- Trigger: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
110
+ echo "- Branch: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
111
+ echo "- Commit: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
112
+ echo "" >> $GITHUB_STEP_SUMMARY
113
+ echo "## Results by Platform and Python Version" >> $GITHUB_STEP_SUMMARY
114
+ echo "" >> $GITHUB_STEP_SUMMARY
115
+ echo "| OS | Python | Status |" >> $GITHUB_STEP_SUMMARY
116
+ echo "|---|---|---|" >> $GITHUB_STEP_SUMMARY
117
+ echo "" >> $GITHUB_STEP_SUMMARY
118
+ echo "Results will be updated as jobs complete." >> $GITHUB_STEP_SUMMARY
@@ -0,0 +1,48 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [ master, main ]
6
+ pull_request:
7
+ branches: [ master, main ]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.10']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install flake8 isort black mypy
27
+
28
+ - name: Check code formatting with Black
29
+ run: |
30
+ black --check --diff num2words2 tests
31
+ continue-on-error: true
32
+
33
+ - name: Lint with flake8
34
+ run: |
35
+ # stop the build if there are Python syntax errors or undefined names
36
+ flake8 num2words2 tests --count --select=E9,F63,F7,F82 --show-source --statistics
37
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38
+ flake8 num2words2 tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39
+
40
+ - name: Check import sorting with isort
41
+ run: |
42
+ isort --check-only --diff num2words2 tests
43
+ continue-on-error: true
44
+
45
+ - name: Type checking with mypy
46
+ run: |
47
+ mypy num2words2 --ignore-missing-imports
48
+ continue-on-error: true
@@ -0,0 +1,90 @@
1
+ # Manual workflow to publish to PyPI
2
+ name: Manual PyPI Publish
3
+
4
+ on:
5
+ workflow_dispatch:
6
+ inputs:
7
+ version_increment:
8
+ description: 'Version increment type'
9
+ required: true
10
+ default: 'patch'
11
+ type: choice
12
+ options:
13
+ - patch
14
+ - minor
15
+ - major
16
+
17
+ permissions:
18
+ contents: write
19
+
20
+ jobs:
21
+ publish:
22
+ runs-on: ubuntu-latest
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: '3.x'
33
+
34
+ - name: Install dependencies
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ pip install build twine
38
+
39
+ - name: Get current version
40
+ id: get_version
41
+ run: |
42
+ VERSION=$(python -c "import re; print(re.search(r'__version__ = [\"\'](.*?)[\"\']', open('bin/num2words2').read()).group(1))")
43
+ echo "current_version=$VERSION" >> $GITHUB_OUTPUT
44
+
45
+ - name: Increment version
46
+ run: |
47
+ CURRENT_VERSION=${{ steps.get_version.outputs.current_version }}
48
+ IFS='.' read -r -a parts <<< "$CURRENT_VERSION"
49
+ major=${parts[0]}
50
+ minor=${parts[1]}
51
+ patch=${parts[2]}
52
+
53
+ case "${{ github.event.inputs.version_increment }}" in
54
+ "major")
55
+ major=$((major + 1))
56
+ minor=0
57
+ patch=0
58
+ ;;
59
+ "minor")
60
+ minor=$((minor + 1))
61
+ patch=0
62
+ ;;
63
+ "patch")
64
+ patch=$((patch + 1))
65
+ ;;
66
+ esac
67
+
68
+ NEW_VERSION="$major.$minor.$patch"
69
+
70
+ # Update version in bin/num2words2
71
+ sed -i "s/__version__ = \"$CURRENT_VERSION\"/__version__ = \"$NEW_VERSION\"/" bin/num2words2
72
+
73
+ echo "Updated version from $CURRENT_VERSION to $NEW_VERSION"
74
+
75
+ # Commit the version bump
76
+ git config --local user.email "action@github.com"
77
+ git config --local user.name "GitHub Action"
78
+ git add bin/num2words2
79
+ git commit -m "Bump version to $NEW_VERSION [skip ci]"
80
+ git push
81
+
82
+ - name: Build package
83
+ run: python -m build
84
+
85
+ - name: Publish package to PyPI
86
+ env:
87
+ TWINE_USERNAME: __token__
88
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
89
+ run: |
90
+ twine upload dist/* --verbose
@@ -0,0 +1,88 @@
1
+ name: Manual Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: 'Version number (e.g., 1.0.0)'
8
+ required: true
9
+ type: string
10
+ prerelease:
11
+ description: 'Pre-release?'
12
+ required: false
13
+ type: boolean
14
+ default: false
15
+
16
+ jobs:
17
+ create-release:
18
+ runs-on: ubuntu-latest
19
+ permissions:
20
+ contents: write
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+ token: ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: '3.11'
32
+
33
+ - name: Install dependencies
34
+ run: |
35
+ python -m pip install --upgrade pip
36
+ pip install build setuptools wheel setuptools_scm
37
+ pip install -r tests/requirements-test.txt
38
+
39
+ - name: Run tests
40
+ run: |
41
+ python -m pytest tests/ -v --tb=short
42
+
43
+ - name: Build distribution
44
+ run: |
45
+ python -m build
46
+ ls -la dist/
47
+
48
+ - name: Check build
49
+ run: |
50
+ pip install twine
51
+ twine check dist/*
52
+
53
+ - name: Create and push tag
54
+ run: |
55
+ git config user.name "GitHub Actions"
56
+ git config user.email "actions@github.com"
57
+ git tag -a "v${{ inputs.version }}" -m "Release v${{ inputs.version }}"
58
+ git push origin "v${{ inputs.version }}"
59
+
60
+ - name: Create GitHub Release
61
+ uses: softprops/action-gh-release@v1
62
+ with:
63
+ tag_name: v${{ inputs.version }}
64
+ name: Release v${{ inputs.version }}
65
+ draft: false
66
+ prerelease: ${{ inputs.prerelease }}
67
+ files: dist/*
68
+ body: |
69
+ ## Release v${{ inputs.version }}
70
+
71
+ ### What's New
72
+ - Added 45 new language modules
73
+ - Now supporting 119+ language codes
74
+ - Full implementations with native language support
75
+
76
+ ### Installation
77
+ ```bash
78
+ pip install num2words2==${{ inputs.version }}
79
+ ```
80
+
81
+ ### Full Changelog
82
+ See [CHANGELOG](https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md)
83
+
84
+ - name: Upload artifacts
85
+ uses: actions/upload-artifact@v4
86
+ with:
87
+ name: python-package-distributions
88
+ path: dist/