Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LGVISIUM-80: review proposal Stijn #101

Conversation

stijnvermeeren-swisstopo
Copy link
Contributor

@stijnvermeeren-swisstopo stijnvermeeren-swisstopo commented Oct 29, 2024

A generic FeatureOnPage class that can be reused for groundwater, elevation, coordinates... instead of requiring separate classes GroundwaterOnPage, ElevationOnPage, CoordinatesOnPage etc.

Upgrade to Python 3.11 in order to be able to use from typing import Self.

Copy link

github-actions bot commented Oct 29, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/stratigraphy
   __init__.py8188%11
   extract.py1981980%3–499
   get_files.py19190%3–47
   main.py1171170%3–314
src/stratigraphy/benchmark
   ground_truth.py21195%47
   metrics.py594327%18, 22–25, 29–32, 36–39, 46–49, 53–54, 58, 65–72, 76–89, 94–133
src/stratigraphy/data_extractor
   data_extractor.py75692%30, 39, 52, 92, 129, 174
src/stratigraphy/depthcolumn
   boundarydepthcolumnvalidator.py412051%47, 57, 60, 81–84, 110–128, 140–149
   depthcolumn.py2278264%28, 33, 65, 82, 87, 93, 109–117, 138, 146, 154–155, 171–173, 188, 195, 208–209, 226, 254–273, 311, 319–320, 336–338, 383, 402–410, 421, 426, 433, 464, 469–476, 491–492, 534–575
   depthcolumnentry.py361072%17, 21, 37, 52, 55, 72, 81, 98–100
   find_depth_columns.py1061982%42–43, 73, 86, 180–181, 225–245
src/stratigraphy/depths_materials_column_pairs
   depths_materials_column_pairs.py19763%23, 34, 55–60
src/stratigraphy/evaluation
   evaluation_dataclasses.py491667%24, 33, 42–44, 52, 71–74, 90, 104, 125–131, 147
   groundwater_evaluator.py482744%27, 35, 39–42, 46–49, 63–64, 72–128
   metadata_evaluator.py381463%53–72, 95–102
   utility.py342429%30–34, 48–57, 72–93
src/stratigraphy/groundwater
   groundwater_extraction.py15610334%44, 52, 66–67, 79, 94, 127–132, 140, 167–171, 186–206, 217–306, 322–354
   utility.py393315%10–17, 30–47, 59–73, 88–102
src/stratigraphy/layer
   layer.py582066%30, 40, 58–95, 107–108, 121, 139
   layer_identifier_column.py795530%16–17, 20, 28, 43, 52, 61, 69–73, 81, 89, 106–111, 123, 136, 149–150, 169–172, 195–205, 219–246
src/stratigraphy/lines
   geometric_line_utilities.py86298%81, 131
   line.py51492%25, 50, 60, 110
   linesquadtree.py46198%75
src/stratigraphy/metadata
   coordinate_extraction.py110595%30, 68, 98–99, 111
   elevation_extraction.py906033%34–39, 47, 55, 63, 79–87, 124–138, 150–153, 165–197, 212–220, 228–232
   language_detection.py181328%17–23, 37–45
   metadata.py662464%27, 83, 101–127, 146–155, 195–198, 206
src/stratigraphy/text
   description_block_splitter.py70297%24, 139
   extract_text.py29390%19, 53–54
   find_description.py642856%27–35, 50–63, 79–95, 172–175
   textblock.py80989%28, 56, 64, 89, 101, 124, 145, 154, 183
src/stratigraphy/util
   dataclasses.py32391%37–39
   interval.py1045547%29–32, 37–40, 46, 52, 56, 66–68, 107–153, 174, 180–196
   predictions.py1468840%77, 85–93, 130, 153–179, 214–243, 257–291, 303–308, 325–340, 358–375
   util.py341362%41, 69–76, 90–92, 116–117
TOTAL2459112554% 

Tests Skipped Failures Errors Time
86 0 💤 0 ❌ 0 🔥 6.627s ⏱️

Copy link
Contributor

@dcleres dcleres left a comment

Choose a reason for hiding this comment

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

@stijnvermeeren-swisstopo thank you for the code suggestion. I think it was a good idea to update the python version to get access to these features. I made a few small changes in code and in the docstrings as not all of them were up to date. I am happy to merge.

src/stratigraphy/annotations/draw.py Show resolved Hide resolved
@stijnvermeeren-swisstopo stijnvermeeren-swisstopo marked this pull request as ready for review October 30, 2024 10:38
@stijnvermeeren-swisstopo stijnvermeeren-swisstopo merged commit 5c6db29 into LGVISIUM-80-Refactor-the-groundwater-object-and-its-evaluation Oct 30, 2024
3 checks passed
@stijnvermeeren-swisstopo stijnvermeeren-swisstopo deleted the LGVISIUM-80/review-stijn branch October 30, 2024 10:38
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