Skip to content

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
@graphite-app
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.

2 participants