Deltares / Deltares/imod-python

increase the number of partition test cases for test_partitioning_unstructured.py

Open
#731 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs tests
Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

Add the following cases to the partitioning tests in test_partitioning_unstructured.py. This results in many failing tests. This should be fixed or at least understood.

def case_two_parts(self, idomain_top) -> xu.UgridDataArray:
    two_parts = zeros_like(idomain_top)
    two_parts.values[74:] = 1
    return two_parts

def case_two_parts2(self, idomain_top) -> xu.UgridDataArray:
    two_parts = zeros_like(idomain_top)
    two_parts.values[47:] = 1
    return two_parts

def case_two_parts3(self, idomain_top) -> xu.UgridDataArray:
    two_parts = zeros_like(idomain_top)
    two_parts.values[147:] = 1
    return two_parts

def case_two_parts4(self, idomain_top) -> xu.UgridDataArray:
    two_parts = zeros_like(idomain_top)
    two_parts.values[187:] = 1
    return two_parts

def case_two_parts_inverse(self, idomain_top) -> xu.UgridDataArray:
    two_parts_inverse = zeros_like(idomain_top)
    two_parts_inverse.values[:74] = 1
    return two_parts_inverse

def case_two_parts_inverse2(self, idomain_top) -> xu.UgridDataArray:
    two_parts_inverse = zeros_like(idomain_top)
    two_parts_inverse.values[:47] = 1
    return two_parts_inverse

def case_two_parts_inverse3(self, idomain_top) -> xu.UgridDataArray:
    two_parts_inverse = zeros_like(idomain_top)
    two_parts_inverse.values[:147] = 1
    return two_parts_inverse

def case_two_parts_inverse4(self, idomain_top) -> xu.UgridDataArray:
    two_parts_inverse = zeros_like(idomain_top)
    two_parts_inverse.values[:187] = 1
    return two_parts_inverse

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in test_partitioning_unstructured.py and add the eight specified partition cases to the existing partitioning test setup. Run the partitioning tests, then investigate the resulting failures; done means the added cases are covered and each failure is either fixed or clearly understood.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.