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

It is unclear that the name you choose for your project also has to be the name of your rpm file #3

Open
gavargas22 opened this issue Jun 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@gavargas22
Copy link
Collaborator

144 Rockrproperty models

When a user names a project say: example1 and the software attempts to load a rock property model it fails if an rpm file does not exist with same name as the project

@gavargas22 gavargas22 added the bug Something isn't working label Jun 28, 2023
@klaas-koster
Copy link

Good point, so let's change the code to something like:

def select_rpm(cfg):
if cfg.project == "example":
from rockphysics.rpm_example import RPMExample
print("Using the example RPM")

    rpm = RPMExample(cfg)
elif cfg.project == "abc":
    from rockphysics.rpm_abc import RPMExample
    print("Using the abcRPM")

    rpm = RPMExample(cfg)
else:
    print("No rock property model defined in select_rpm")
    print("Exiting code")
    sys.exit(1)


return rpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants