-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/horizon stack #259
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
SpliiT
wants to merge
33
commits into
next
Choose a base branch
from
feat/HorizonStack
base: next
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.
Open
Feat/horizon stack #259
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
c6f3a4f
feat(HorizonStack): Add Horizon Stack to the horizon step
SpliiT 8b9dd98
fix utils functions
SpliiT 7a98960
Apply prepare changes
SpliiT 8b7ade0
add missing test.og_hst3d
SpliiT 72b1089
Merge branch 'feat/HorizonStack' of https://github.com/Geode-solution…
SpliiT 49fa924
Merge branch 'next' into feat/HorizonStack
SpliiT 28cd18e
Apply prepare changes
SpliiT 21df80a
resolve mypy errors on GeodeHorizonStack3D and utils
SpliiT f656590
Merge branch 'feat/HorizonStack' of https://github.com/Geode-solution…
SpliiT c75f16c
Apply prepare changes
SpliiT c9f3d0b
rm comments
SpliiT 9583a1e
Merge branch 'feat/HorizonStack' of https://github.com/Geode-solution…
SpliiT 7f9b1d2
Apply prepare changes
SpliiT 2a0ecbd
fix comments
SpliiT 05eec1a
Merge branch 'feat/HorizonStack' of https://github.com/Geode-solution…
SpliiT 6785a86
reput asserts data
SpliiT bb604f2
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
SpliiT 7d75d71
clear validate
SpliiT 92b1133
Apply prepare changes
SpliiT 0a81e56
rm useless hasattr
SpliiT 8eef857
Merge branch 'feat/HorizonStack' of https://github.com/Geode-solution…
SpliiT 24f4de5
Apply prepare changes
SpliiT 69195d2
try to go around horizonstack saveable
SpliiT 0450aef
Merge branch 'feat/HorizonStack' of https://github.com/Geode-solution…
SpliiT 628d5be
rc geosciences
SpliiT b704741
Apply prepare changes
SpliiT 9fa68f4
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
SpliiT cf62a7c
Merge branch 'feat/HorizonStack' of https://github.com/Geode-solution…
SpliiT 059e15b
fix comments
SpliiT 4ad2188
mypy
SpliiT c10bfea
latest v9.6.1
SpliiT edb12d3
clean code and fix comments
SpliiT 355eef5
Apply prepare changes
SpliiT 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
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
103 changes: 103 additions & 0 deletions
103
src/opengeodeweb_back/geode_objects/geode_horizon_stack3d.py
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,103 @@ | ||
| # Standard library imports | ||
| from __future__ import annotations | ||
| from typing import Any | ||
|
|
||
| # Third party imports | ||
| import opengeode as og | ||
| import opengeode_geosciences as og_geosciences | ||
| from opengeodeweb_microservice.database.data_types import GeodeModelType | ||
|
|
||
| # Local application imports | ||
| from .geode_model import GeodeModel, ComponentRegistry | ||
|
|
||
|
|
||
| class GeodeHorizonStack3D(GeodeModel): | ||
| horizon_stack: og_geosciences.HorizonsStack3D | ||
|
|
||
| def __init__( | ||
| self, horizon_stack: og_geosciences.HorizonsStack3D | None = None | ||
| ) -> None: | ||
| self.horizon_stack = ( | ||
| horizon_stack | ||
| if horizon_stack is not None | ||
| else og_geosciences.HorizonsStack3D() | ||
| ) | ||
| super().__init__(self.horizon_stack) | ||
|
|
||
| @classmethod | ||
| def geode_object_type(cls) -> GeodeModelType: | ||
| return "HorizonStack3D" | ||
|
|
||
| def native_extension(self) -> str: | ||
| return self.horizon_stack.native_extension() | ||
|
|
||
| @classmethod | ||
| def is_3D(cls) -> bool: | ||
| return True | ||
|
|
||
| @classmethod | ||
| def is_viewable(cls) -> bool: | ||
| return False | ||
|
|
||
| def builder(self) -> og_geosciences.HorizonsStackBuilder3D: | ||
| return og_geosciences.HorizonsStackBuilder3D(self.horizon_stack) | ||
|
|
||
| @classmethod | ||
| def load(cls, filename: str) -> GeodeHorizonStack3D: | ||
| return GeodeHorizonStack3D(og_geosciences.load_horizons_stack3D(filename)) | ||
|
|
||
| @classmethod | ||
| def additional_files(cls, filename: str) -> og.AdditionalFiles: | ||
| return og_geosciences.horizons_stack_additional_files3D(filename) | ||
|
|
||
| @classmethod | ||
| def is_loadable(cls, filename: str) -> og.Percentage: | ||
| return og_geosciences.is_horizons_stack_loadable3D(filename) | ||
|
|
||
| @classmethod | ||
| def input_extensions(cls) -> list[str]: | ||
| return og_geosciences.HorizonsStackInputFactory3D.list_creators() | ||
|
|
||
| @classmethod | ||
| def output_extensions(cls) -> list[str]: | ||
| return og_geosciences.HorizonsStackOutputFactory3D.list_creators() | ||
|
|
||
| @classmethod | ||
| def object_priority(cls, filename: str) -> int: | ||
| return og_geosciences.horizons_stack_object_priority3D(filename) | ||
|
|
||
| def is_saveable(self, filename: str) -> bool: | ||
| return og_geosciences.is_horizons_stack_saveable3D(self.horizon_stack, filename) | ||
|
|
||
| def save(self, filename: str) -> list[str]: | ||
| return og_geosciences.save_horizons_stack3D(self.horizon_stack, filename) | ||
|
|
||
| def save_viewable(self, filename_without_extension: str) -> str: | ||
| return "" | ||
|
|
||
| def save_light_viewable(self, filename_without_extension: str) -> str: | ||
| return "" | ||
|
|
||
| def mesh_components(self) -> ComponentRegistry: | ||
| return {} | ||
|
|
||
| def collection_components(self) -> ComponentRegistry: | ||
| return {} | ||
|
|
||
| def boundaries(self, id: og.uuid) -> list[og.ComponentID]: | ||
|
SpliiT marked this conversation as resolved.
|
||
| return [] | ||
|
|
||
| def internals(self, id: og.uuid) -> list[og.ComponentID]: | ||
| return [] | ||
|
|
||
| def items(self, id: og.uuid) -> list[og.ComponentID]: | ||
| return [] | ||
|
|
||
| def component(self, id: og.uuid) -> og.Component3D: | ||
| raise NotImplementedError("HorizonStack3D has no mesh components") | ||
|
|
||
| def inspect(self) -> Any: | ||
| return None | ||
|
|
||
| def validate(self) -> Any: | ||
| return None | ||
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
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
Binary file not shown.
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.