Skip to content

Test/debug process geometry - #175

Closed
jnettels wants to merge 20 commits into
devfrom
test/debug_process_geometry
Closed

Test/debug process geometry#175
jnettels wants to merge 20 commits into
devfrom
test/debug_process_geometry

Conversation

@jnettels

Copy link
Copy Markdown
Contributor

This is not meant to be merged, it is purely for investigating failing tests.

jnettels and others added 18 commits July 8, 2026 11:48
Renaming back and forth is unnecessary.
This includes a refactor of _remove_useless_forks to allow reusing part
of its logic.
In the process, I refactored some of the logic functions to be
easier to understund. for example, `_have_unique_values` was True
if there are different values. The new name inverts the logic to
`_attribute_values_equal` and should be easier to understand.
(Also, the separate NaN treatment in `_all_values_equal` was useless,
as NaN != any value.)
It allows construction of a "reverse" house connection lines,
and was provided in
#166 (comment)
There were two problems when inverting "_all_values_equal":
First, the logic in _remove_useless_forks was notinverted.
This is now more transparent without continue statement.
Second, series of all NaN were not merged because NaN != NaN.
This is not needed anymore because simplify() already includes this step:
It uses a networkx Graph, which ony allows one edge between two nodes.
Includes .geojson test files
@jnettels jnettels self-assigned this Jul 15, 2026
@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/dhnx/gistools
  connect_points.py
  geometry_operations.py 566
  src/dhnx/optimization
  add_components.py 464-469, 532-537
  dhs_nodes.py 158-170
  optimization_models.py 213-223, 866
Project Total  

This report was generated by python-coverage-comment-action

@jnettels jnettels closed this Jul 15, 2026
@jnettels
jnettels deleted the test/debug_process_geometry branch July 15, 2026 10:05
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