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

Various small fixes #211

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Various small fixes #211

wants to merge 22 commits into from

Conversation

lachlangrose
Copy link
Member

No description provided.

this means the feature won't check if the interpolator is up to date. In order for this to occur a builder needs to have an up_to_date method
…system. Fixed by reprojecting into local coordinates for the glyphing and then reprojecting out of the local coords after glyping.

requires a bounding box to be passed to vtk method for any vector calls.
Added a project/reproject method to the bounding box
@lachlangrose lachlangrose requested a review from Copilot January 6, 2025 22:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 16 changed files in this pull request and generated 2 comments.

Files not reviewed (11)
  • docs/Dockerfile: Language not supported
  • release-please-config.json: Language not supported
  • LoopStructural/modelling/features/_analytical_feature.py: Evaluated as low risk
  • LoopStructural/datatypes/_point.py: Evaluated as low risk
  • LoopStructural/modelling/core/geological_model.py: Evaluated as low risk
  • LoopStructural/interpolators/_interpolator_factory.py: Evaluated as low risk
  • LoopStructural/interpolators/supports/_3d_base_structured.py: Evaluated as low risk
  • LoopStructural/modelling/features/_geological_feature.py: Evaluated as low risk
  • LoopStructural/modelling/features/fault/_fault_segment.py: Evaluated as low risk
  • LoopStructural/interpolators/_finite_difference_interpolator.py: Evaluated as low risk
  • LoopStructural/modelling/features/_structural_frame.py: Evaluated as low risk
Comments suppressed due to low confidence (2)

.github/workflows/documentation.yml:1

  • [nitpick] The inclusion of an emoji in the workflow name may not be consistent with the naming conventions used in other workflow files.
-name: "📚 Build documentation and deploy "

LoopStructural/modelling/features/_cross_product_geological_feature.py:101

  • [nitpick] The parameter name should be more descriptive, such as new_name, to avoid confusion with the instance variable self.name.
def copy(self,name:Optional[str]=None):

projected point
"""

return (xyz - self.global_origin) / np.max((self.global_maximum-self.global_origin))#np.clip(xyz, self.origin, self.maximum)
Copy link
Preview

Copilot AI Jan 6, 2025

Choose a reason for hiding this comment

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

Using np.max for projection might be incorrect for non-uniform bounding boxes. Consider using element-wise division instead: (xyz - self.global_origin) / (self.global_maximum - self.global_origin).

Suggested change
return (xyz - self.global_origin) / np.max((self.global_maximum-self.global_origin))#np.clip(xyz, self.origin, self.maximum)
return (xyz - self.global_origin) / (self.global_maximum - self.global_origin)

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
reprojected point
"""

return xyz * np.max((self.global_maximum - self.global_origin)) + self.global_origin
Copy link
Preview

Copilot AI Jan 6, 2025

Choose a reason for hiding this comment

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

Using np.max for reprojection might be incorrect for non-uniform bounding boxes. Consider using element-wise multiplication instead: xyz * (self.global_maximum - self.global_origin) + self.global_origin.

Suggested change
return xyz * np.max((self.global_maximum - self.global_origin)) + self.global_origin
return xyz * (self.global_maximum - self.global_origin) + self.global_origin

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@lachlangrose lachlangrose requested a review from Copilot January 8, 2025 03:57

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 18 changed files in this pull request and generated no comments.

Files not reviewed (13)
  • docs/Dockerfile: Language not supported
  • release-please-config.json: Language not supported
  • LoopStructural/modelling/intrusions/intrusion_feature.py: Evaluated as low risk
  • LoopStructural/datatypes/_point.py: Evaluated as low risk
  • LoopStructural/interpolators/_finite_difference_interpolator.py: Evaluated as low risk
  • LoopStructural/modelling/features/fault/_fault_function_feature.py: Evaluated as low risk
  • LoopStructural/modelling/features/builders/_structural_frame_builder.py: Evaluated as low risk
  • LoopStructural/modelling/core/geological_model.py: Evaluated as low risk
  • LoopStructural/interpolators/_interpolator_factory.py: Evaluated as low risk
  • LoopStructural/modelling/features/_geological_feature.py: Evaluated as low risk
  • LoopStructural/interpolators/supports/_3d_base_structured.py: Evaluated as low risk
  • LoopStructural/modelling/features/fault/_fault_segment.py: Evaluated as low risk
  • LoopStructural/modelling/features/_structural_frame.py: Evaluated as low risk
Comments suppressed due to low confidence (3)

LoopStructural/modelling/features/_cross_product_geological_feature.py:45

  • Duplicate 'Parameters' section in the docstring. Please remove the redundant section.
        Parameters

LoopStructural/modelling/features/_cross_product_geological_feature.py:105

  • Ensure that the copy method is covered by tests to verify its behavior.
        return CrossProductGeologicalFeature(

LoopStructural/modelling/features/_analytical_feature.py:98

  • Ensure that the newly added copy method is covered by tests.
def copy(self, name: Optional[str] = None):
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.

1 participant