GermanZero-de / localzero-generator-core

7 stars 3 forks source link

Display derived facts in the explorer. #384

Closed bgrundmann closed 9 months ago

bgrundmann commented 9 months ago

What it says on the tin, now that we have derived facts, we should display them in the explorer. This does not yet include the corresponding code for assumptions but that is a small patch that will follow soon.

The implementation is not ideal in that the json will contain the definitions of derived facts at each usage of a derived fact. But given that derived facts tend to have very short definitions this was deemed okay (as opposed to spending yet more time and code complexity to introduce sharing).

Example screenshot

CleanShot 2024-02-20 at 14 57 27@2x

Ready to rock

(.venv) benediktgrundmann@Benedikts-Air localzero-generator-core % python devtool.py ready_to_rock
WARNING: there is a new pyright version available (v1.1.301 -> v1.1.351).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`

No configuration file found.
pyproject.toml file found at /Users/benediktgrundmann/Programming/localzero/localzero-generator-core.
Loading pyproject.toml file at /Users/benediktgrundmann/Programming/localzero/localzero-generator-core/pyproject.toml
Assuming Python platform Darwin
Auto-excluding **/node_modules
Auto-excluding **/__pycache__
Auto-excluding **/.*
Searching for source files
Found 202 source files
pyright 1.1.301
0 errors, 0 warnings, 0 informations
Completed in 2.346sec
=========================================================== test session starts ============================================================
platform darwin -- Python 3.10.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/benediktgrundmann/Programming/localzero/localzero-generator-core
plugins: anyio-3.6.2, cov-3.0.0
collected 45 items

tests/test_devtool_commands.py ..............                                                                                        [ 31%]
tests/test_end_to_end.py ......s.s.s.s.s.s                                                                                           [ 68%]
tests/test_entries.py .                                                                                                              [ 71%]
tests/test_refdata.py ....                                                                                                           [ 80%]
tests/test_tracing.py .........                                                                                                      [100%]

====================================================== 39 passed, 6 skipped in 5.52s =======================================================
Trim Trailing Whitespace.................................................Passed
Mixed line ending........................................................Passed
Check for case conflicts.................................................Passed
Check Yaml...............................................................Passed
Check for added large files..............................................Passed
Don't commit to branch...................................................Passed
black....................................................................Passed
You are ready to rock and save the climate at 5df0cb19b91762794c92feea8365dbde4c7770e6, but don't forget to copy paste the above into your pull request