Skip to content

Conversation

@svmhdvn
Copy link

@svmhdvn svmhdvn commented May 26, 2025

As per https://packaging.python.org/en/latest/flow/, this PR migrates klongpy to a modern pyproject.toml with hatch backend. This is the recommended practice going forward.

New workflows:

hatch build generates a distribution
hatch fmt ... lints and formats the project
hatch test fully runs all tests (and also measures code coverage with the -c flag)

All tests are currently passing.

Coverage report with hatch test -c:

Name                                      Stmts   Miss  Cover
-------------------------------------------------------------
klongpy/__init__.py                           2      0   100%
klongpy/adverbs.py                          163      7    96%
klongpy/backend.py                           49     37    24%
klongpy/core.py                             508     44    91%
klongpy/db/__init__.py                        7      0   100%
klongpy/db/df_cache.py                       40      7    82%
klongpy/db/file_cache.py                    113     10    91%
klongpy/db/helpers.py                        50     22    56%
klongpy/db/sys_fn_db.py                     170     22    87%
klongpy/db/sys_fn_kvs.py                     74     35    53%
klongpy/dyads.py                            288      8    97%
klongpy/interpreter.py                      357     23    94%
klongpy/monads.py                            84      0   100%
klongpy/repl.py                              53      8    85%
klongpy/sys_fn.py                           279     75    73%
klongpy/sys_fn_ipc.py                       559    231    59%
klongpy/sys_fn_timer.py                      54      4    93%
klongpy/sys_var.py                           20      5    75%
klongpy/utils.py                             23      9    61%
klongpy/web/__init__.py                       2      0   100%
klongpy/web/sys_fn_web.py                    90     28    69%
tests/__init__.py                             5      0   100%
tests/kgtests/db/mkdf.py                      4      0   100%
tests/kgtests/interop/pool.py                 7      1    86%
tests/plugins/custom_export/__init__.py       2      0   100%
tests/plugins/custom_export/exports.py        4      0   100%
tests/plugins/greetings/__init__.py           1      0   100%
tests/plugins/greetings/hello_world.py       18      1    94%
tests/test_accel.py                         166     12    93%
tests/test_df_cache.py                       66      0   100%
tests/test_eval_monad_list.py                24      1    96%
tests/test_examples.py                       50     23    54%
tests/test_extra_suite.py                   288      2    99%
tests/test_file_cache.py                    139      2    99%
tests/test_interop.py                       148      0   100%
tests/test_kg_asarray.py                     70     11    84%
tests/test_kgtests.py                        48      3    94%
tests/test_known_bugs.py                    147     93    37%
tests/test_prog.py                           72     34    53%
tests/test_reshape_strings.py                24      1    96%
tests/test_suite.py                        1397      1    99%
tests/test_suite_file.py                     66      1    98%
tests/test_sys_fn.py                        362      3    99%
tests/test_sys_fn_db.py                      59      0   100%
tests/test_sys_fn_ipc.py                    379      3    99%
tests/test_sys_fn_timer.py                  105      0   100%
tests/test_sys_fn_web.py                     37      1    97%
tests/test_util.py                          199      1    99%
tests/utils.py                               85      3    96%
-------------------------------------------------------------
TOTAL                                      6957    772    89%

@briangu
Copy link
Owner

briangu commented Jul 10, 2025

Hello, sorry for not noticing this before. I've not seen hatch and will take a look. Thanks! I'm in the process of refactoring some things and will consider this.

@svmhdvn
Copy link
Author

svmhdvn commented Jul 10, 2025

Sounds good, I'd like to help push this forward. I do think hatch will definitely help you ease some of your development tasks and make managing dependencies easier. Let me first rebase and test again.

@svmhdvn svmhdvn force-pushed the push-ynpkzztlruvn branch from 79c3905 to ce10916 Compare July 10, 2025 12:48
@svmhdvn
Copy link
Author

svmhdvn commented Jul 10, 2025

klongpytest.txt
Here's the latest test run.

@svmhdvn
Copy link
Author

svmhdvn commented Sep 16, 2025

Any updates on reviewing this? I still think it would be good to merge this.

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.

2 participants