Skip to content

[ENH] Add nugget optimization module with per-group optimization capability #1036

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

Merged
merged 14 commits into from
May 26, 2025

Conversation

Leguark
Copy link
Member

@Leguark Leguark commented May 25, 2025

Description

Refactored the nugget optimization functionality into a dedicated module for better organization and reusability. The PR extracts the optimization logic from compute_API.py into a new optimize_nuggets module with improved structure and cleaner implementation. It also adds a new API function optimize_nuggets that allows optimizing specific structural groups rather than the entire model.

The PR also includes code reorganization, moving the _LoadDEMArtificial class from create_topography.py to topography.py where it's more logically placed, and fixing import paths throughout the codebase.

Relates to #optimization-refactoring

Checklist

  • My code uses type hinting for function and method arguments and return values.
  • I have created tests which cover my code.
  • The test code either 1. demonstrates at least one valuable use case (e.g. integration tests)
    or 2. verifies that outputs are as expected for given inputs (e.g. unit tests).
  • New tests pass locally with my changes.

Copy link
Member Author

Leguark commented May 25, 2025

Leguark added 10 commits May 26, 2025 15:54
[CLN] Make modules a bit more clear
Streamlined nugget optimization logic by delegating it to a standalone `run_optimization` function, improving reusability and clarity. Added support for optimizing specific structural groups, enhancing flexibility in nugget effect optimization workflows.
Switched to relative imports for better modularity and cleaner project structure. This change improves maintainability and aligns with Python's best practices for package organization.
@Leguark Leguark force-pushed the serialize_opt_nugget branch from 325dae4 to 6b27207 Compare May 26, 2025 14:54
@Leguark Leguark marked this pull request as ready for review May 26, 2025 14:56
@graphite-app graphite-app bot added the gempy 3 Will come with the next major update label May 26, 2025
@Leguark Leguark changed the title [WIP] Adding test for nugget effect optimization [ENH] Add nugget optimization module with per-group optimization capability May 26, 2025
Copy link

graphite-app bot commented May 26, 2025

Graphite Automations

"Add gempy label" took an action on this PR • (05/26/25)

1 label was added to this PR based on Miguel de la Varga's automation.

@Leguark Leguark merged commit 0fb74e5 into main May 26, 2025
2 checks passed
@Leguark Leguark deleted the serialize_opt_nugget branch May 26, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gempy 3 Will come with the next major update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy