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

Remove gempyor.seeding Dependence On gempyor.model_info.ModelInfo #422

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

TimothyWillard
Copy link
Contributor

Describe your changes.

This pull request untangles gempyor.seeding.Seeding from gempyor.model_info.ModelInfo by requiring explicit values be passed to gempyor.seeding.Seeding. This eases the unit testability of the gempyor.seeding module. Also adds the ModelInfo.get_seeding_data method which replaces prior calls to the seeding instance from the Modelnfo instance with a modinf argument.

Does this pull request make any user interface changes? If so please describe.

The user interface changes are:

  • Added gempyor.model_info.ModelInfo.get_seeding_data method,
  • Changed interface for gempyor.seeding.Seeding.get_from_config/file methods, and
  • Deprecated gempyor.seeding.Seeding.get_from_file in favor of gempyor.seeding.Seeding.get_from_config.

Those are reflected in updates to the documentation in the docstrings of these methods.

What does your pull request address? Tag relevant issues.

This pull request addresses part of GH-397.

* Added explicit exports,
* Reordered imports,
* Added general structure comments, and
* Refactored all lines to be less than 92 characters.
Remvoed the `modinf` arg from the `_DataFrame2NumbaDict` internal
utility and replaced it with the individual attributes from the `modinf`
object that are needed.
Untangled the `Seeding` class from the `ModelInfo` class by adding a
method to `ModelInfo` that interfaces with the `Seeding` class.
Updated remaining references in inactive code, notebooks and the
`gempyor.dev` module.
@TimothyWillard TimothyWillard added enhancement Request for improvement or addition of new feature(s). gempyor Concerns the Python core. medium priority Medium priority. docstring Relating to in-code documentation. labels Dec 10, 2024
@TimothyWillard TimothyWillard added this to the Software Quality milestone Dec 10, 2024
@TimothyWillard TimothyWillard added the next release Marks a PR as a target to include in the next release. label Dec 16, 2024
@TimothyWillard TimothyWillard marked this pull request as ready for review December 16, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docstring Relating to in-code documentation. enhancement Request for improvement or addition of new feature(s). gempyor Concerns the Python core. medium priority Medium priority. next release Marks a PR as a target to include in the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: cyclic dependencies between model_info, seeding, and initial_conditions complicate type hinting
1 participant