Skip to content

Conversation

@NilsChudalla
Copy link
Member

@NilsChudalla NilsChudalla commented Nov 12, 2025

Description

In example "ch1_5", function set_fault_relation does not work as intended as described in issue #1074. I tried this in some other models, where the behaviour is still off. This is a WIP, where I turned the model from ch1_5 into a test. For this model it works.

I am willingt to try myself, @Leguark, but I spent quite some time in it already and am a bit out of ideas.

Checklist

  • My code uses type hinting for function and method arguments and return values.
  • I have created tests which cover my code.
  • The test code either 1. demonstrates at least one valuable use case (e.g. integration tests)
    or 2. verifies that outputs are as expected for given inputs (e.g. unit tests).
  • New tests pass locally with my changes.

…TION" is based on the model from tutorial ch1_5, where this did not work. For the video tutorial model, set fault relations does work.
Copy link
Member

Leguark commented Nov 13, 2025

it is failing the new test looking for the data. I will look into it

    FileNotFoundError: [Errno 2] No such file or directory: '/home/leguark/buildAgent/work/d766739d2d98fcb9/gempy/API/..\\..\\examples\\data\\input_data\\tests\\fault_relations_test_surf.csv'

venv/lib/python3.13/site-packages/pandas/io/common.py:873: FileNotFoundError

@Leguark Leguark self-requested a review December 5, 2025 10:19
j = self.structural_groups.index(fault_group)
if j <= i: # Only consider groups that are
raise ValueError(f"Fault {group.name} cannot affect older fault {fault_group.name}")
fault_relations[i, j] = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line of code was removed in 2023 when I added the next case and no test was picking it up thanks you Nils. Great catch!

Leguark
Leguark previously approved these changes Dec 5, 2025
Copy link
Member

@Leguark Leguark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding such a huge bug and provide the a test for it!

@Leguark Leguark self-requested a review December 5, 2025 10:49
@Leguark Leguark dismissed their stale review December 5, 2025 10:50

my changes are breaking other functions looking into it

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