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

feat: add frame & gain ingestion to db import #308

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

jgadling
Copy link
Contributor

I also started working on a new interface for these db importers that more closely resembles the S3 importers, so hopefully they're easier to maintain going forward. I'll update the old importers to use the new base classes over the next few weeks.

@jgadling jgadling requested a review from manasaV3 October 10, 2024 19:29
logger = logging.getLogger("config")


class DBImportConfig:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this class out of importers/base_importer.py into its own file.

pass


class FileFinder(ItemFinder):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to add more finders over time, but this is ~similar to the idea of finders in s3 ingestion.

Comment on lines +58 to +59
if prefix.startswith("s3://"):
prefix = "/".join(prefix.split("/")[3:])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added these two lines to this method to make it a little less fussy to work with.

Comment on lines +29 to +30
self.model_args["run_id"] = self.input_data["run"].id
self.model_args["deposition_id"] = self.input_data["deposition"].id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently don't have a metadata for this, so would we populating this from the dataset's deposition_id ?

* Remove deprecated `Tomogram.is_standardized field`
@jgadling jgadling merged commit 7a167d6 into main Oct 14, 2024
7 checks passed
@jgadling jgadling deleted the jgadling/frame-gain-db-import branch October 14, 2024 19:52
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

Successfully merging this pull request may close these issues.

2 participants