Skip to content

Commit

Permalink
Fix description of several tests in checks/cross_section_definitions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
margrietpalm committed Nov 25, 2024
1 parent 6507c57 commit d79a3f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Changelog of threedi-modelchecker
2.14.1 (unreleased)
-------------------

- Nothing changed yet.
- Fix descriptions of several checks


2.14.0 (2024-11-25)
Expand Down
12 changes: 6 additions & 6 deletions threedi_modelchecker/checks/cross_section_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_invalid(self, session):

def description(self):
return (
f"{self.table.__tablename__}.{self.column_name} should contain one or more lines of "
f"{self.table.name}.{self.column_name} should contain one or more lines of "
"comma separated values"
)

Expand All @@ -177,7 +177,7 @@ class CrossSectionListCheck(CrossSectionCSVFormatCheck):

def description(self):
return (
f"{self.table.__tablename__}.{self.column_name} should contain comma separated floats "
f"{self.table.name}.{self.column_name} should contain comma separated floats "
f"for shapes {self.shape_msg}"
)

Expand All @@ -191,7 +191,7 @@ def __init__(self, ncol, *args, **kwargs):

def description(self):
return (
f"{self.table.__tablename__}.{self.column_name} should contain a csv table containing "
f"{self.table.name}.{self.column_name} should contain a csv table containing "
f"{self.ncol} columns with floats for shapes {self.shape_msg}"
)

Expand Down Expand Up @@ -438,7 +438,7 @@ def get_invalid(self, session):
return invalids

def description(self):
return f"{self.table.__tablename__}.cross_section_width and/or cross_section_height should be at least 0.1m"
return f"{self.table.name}.cross_section_width and/or cross_section_height should be at least 0.1m"


class OpenIncreasingCrossSectionCheck(CrossSectionBaseCheck):
Expand Down Expand Up @@ -500,7 +500,7 @@ def to_check(self, session):

def description(self):
return (
f"{self.table.__tablename__}.friction_type can only "
f"{self.table.name}.friction_type can only "
"have conveyance if the associated definition is "
"an open shape, and its width is monotonically increasing"
)
Expand Down Expand Up @@ -598,7 +598,7 @@ def get_invalid(self, session):
return invalids

def description(self):
return f"All values in {self.table.__tablename__}.{self.column_name} should be equal to or larger than 0"
return f"All values in {self.table.name}.{self.column_name} should be equal to or larger than 0"


class CrossSectionVariableFrictionRangeCheck(CrossSectionBaseCheck):
Expand Down

0 comments on commit d79a3f8

Please sign in to comment.