-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Perform all mesh-doctor checks at once #100
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
Open
alexbenedicto
wants to merge
18
commits into
main
Choose a base branch
from
benedicto/feature/mesh-doctor-checks-in-one
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,070
−489
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5c87d4c
Change folder named "checks" for "actions" to be less ambiguous about…
alexbenedicto 3f240fc
First version without results
alexbenedicto 892f9f1
Improve logging functionality across main mesh-doctor scripts
alexbenedicto 4e4a9bb
Improve logging across other scripts + better argparse variable name …
alexbenedicto 54c3cdf
First version of all_checks without "supported_elements" check
alexbenedicto 3d0552e
supported_elements action corrected and now included in all_checks
alexbenedicto 964a094
Update tests
alexbenedicto 1ebccdf
Add test for all_checks + bug fix
alexbenedicto cb63ad8
Update documentation
alexbenedicto a4fe9d6
yapf format
alexbenedicto 9f62b7f
Merge remote-tracking branch 'origin/main' into benedicto/feature/mes…
alexbenedicto 44d0ba7
Remove automatic documentation + yapf
alexbenedicto a8e4a7c
ruff checking
alexbenedicto a502e23
Add RESULTS log level to Logger
alexbenedicto c05762f
Replace logger by setup_logger + use of new "results" attribute
alexbenedicto 9c9efb9
typing and restore constant name Logger
alexbenedicto 2dba83a
Change default checks + update documentation
alexbenedicto 67deb6b
Update test and log output
alexbenedicto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
GEOS Mesh tools | ||
==================== | ||
|
||
**geos-mesh** is a Python package that contains several tools and utilities to handle processing and quality checks of meshes. | ||
|
||
.. toctree:: | ||
:maxdepth: 5 | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
./geos_mesh_docs/home.rst | ||
./geos_mesh_docs/doctor | ||
|
||
./geos_mesh_docs/converter | ||
|
||
./geos_mesh_docs/io | ||
|
||
./geos_mesh_docs/model | ||
|
||
./geos_mesh_docs/processing | ||
|
||
./geos_mesh_docs/stats | ||
|
||
./geos_mesh_docs/modules.rst | ||
./geos_mesh_docs/utils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from dataclasses import dataclass | ||
from geos.mesh.doctor.register import __load_module_action | ||
from geos.mesh.doctor.parsing.cli_parsing import setup_logger | ||
|
||
|
||
@dataclass( frozen=True ) | ||
class Options: | ||
checks_to_perform: list[ str ] | ||
checks_options: dict[ str, any ] | ||
check_displays: dict[ str, any ] | ||
|
||
|
||
@dataclass( frozen=True ) | ||
class Result: | ||
check_results: dict[ str, any ] | ||
|
||
|
||
def action( vtk_input_file: str, options: Options ) -> list[ Result ]: | ||
check_results: dict[ str, any ] = dict() | ||
for check_name in options.checks_to_perform: | ||
check_action = __load_module_action( check_name ) | ||
setup_logger.info( f"Performing check '{check_name}'." ) | ||
option = options.checks_options[ check_name ] | ||
check_result = check_action( vtk_input_file, option ) | ||
check_results[ check_name ] = check_result | ||
return Result( check_results=check_results ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.