Skip to content

Conversation

slott56
Copy link

@slott56 slott56 commented Sep 13, 2023

This closes issue #4.

Additionally, this makes a few tweaks to the implementation of the & and | operators among conditions.

There are a few no-cover comments in places where the condition being tested seems impossible.

Additionally, a few docstrings have been added. (More will be added in a future PR.)

This is a pre-requisite for adding "watch-like" logging (similar to CLIPS watch commands) and creating stronger type hints.

Line 226 seems to be redundant code
Line 235 seems to be something Coverage can't catch.
Line 68 seems to be a condition that can never be true, based on line 93.
  py38: OK (15.37=setup[7.19]+cmd[6.77,0.32,1.09] seconds)
  py39: OK (11.49=setup[3.81]+cmd[6.39,0.39,0.90] seconds)
  py310: OK (11.70=setup[3.71]+cmd[6.75,0.32,0.92] seconds)
  py311: OK (10.22=setup[2.32]+cmd[6.00,0.51,1.39] seconds)
  congratulations :) (48.90 seconds)

Notes.

This commit has one outstanding issue:

Python 3.8 and 3.9 do not execute line 103 of production.py.
Python 3.10 and 3.11 do execute this line.  This line was added *because* it seemed like Ncc conditions where being silently dropped.

The isinstance() matching seems to have changed with python 3.10 and the introduction of the pipe operator for Union types.
Python 3.8 and 3.9 coverage can't see the `else: pass` in the `get_rete_conds()` function. Adding logging changes the coverage count.
Merge 100% test case coverage.
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