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

Making Drillhole objects without a Workspace object #440

Open
cardinalgeo opened this issue Oct 20, 2023 · 4 comments
Open

Making Drillhole objects without a Workspace object #440

cardinalgeo opened this issue Oct 20, 2023 · 4 comments

Comments

@cardinalgeo
Copy link

Hey Mira Geoscience Team!

I'm interested in using the geoh5py Drillhole class (and associated ones like DrillholeGroup) in a project I'm working on but would strongly prefer to not create a geoh5 file. It seems this isn't currently possible, as a Workspace object is needed to create objects of these classes. Is that the case? If so, do you see a path to making the classes usable without a Workspace object? Would certainly be beneficial for the crowd interested in just loading some data into a jupyter notebook for a quick look!

Best,
Robert Collar

@github-actions
Copy link

JIRA issue [GEOPY-1141] was created.

@domfournier
Copy link
Contributor

Good question - easy answer.
As of v0.8.0, the workspace can now be created "in memory" only by omitting to provide a path to a file.

workspace = Workspace()
my_drillhole = Drillhole.create(workspace)

If you change your mind and would like to create a disk representation, you simply run

workspace.save(filepath)

We initially didn't intend to have these classes used outside of geoh5, but looks like it might be desirable in the future. The plan would be to allow instantiating the objects outside the workspace, but that will require some re-write.

To be continued.

@cardinalgeo
Copy link
Author

Hey Dom, great to hear that you've built in this work around. I'll give it a go. And def looking forward to instantiating objects outside of a workspace!

@domfournier
Copy link
Contributor

Turns out that our @benk-mira hit the same wall recently trying to parallel read/create drillholes. H5 files are not picklable, so this issue will be elevated.

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

No branches or pull requests

2 participants