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 docdb utils #57

Merged
merged 3 commits into from
Jul 2, 2024
Merged

feat: add docdb utils #57

merged 3 commits into from
Jul 2, 2024

Conversation

helen-m-lin
Copy link
Collaborator

@helen-m-lin helen-m-lin commented Jul 2, 2024

closes #48

  • Adds docdb-related utils from aind-data-asset-indexer
  • Another PR will add examples and usage to readthedocs

@helen-m-lin helen-m-lin requested a review from jtyoung84 July 2, 2024 20:36
from pymongo import MongoClient


def is_prefix_valid(prefix: str) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

If this the only function that is requires aind-data-schema, it might be better to remove it and the aind-data-schema dependency for the time being. At the very least, since this package will probably be imported alongside other packages, it will be problematic if the version of aind-data-schema is pinned to a specific version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is_record_location_valid uses this function to check that the location field contains a valid data asset name. Should I also remove that check from is_record_location_valid for the time being?

Copy link
Contributor

@jtyoung84 jtyoung84 Jul 2, 2024

Choose a reason for hiding this comment

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

yeah, let's do those in a separate PR (if needed). Hopefully, people shouldn't be modifying the location.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great, I removed those two functions.

@jtyoung84 jtyoung84 merged commit 1dccef7 into dev Jul 2, 2024
3 checks passed
@jtyoung84 jtyoung84 deleted the feat-48-docdb-utils branch July 2, 2024 23:40
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.

add useful utils from aind-data-asset-indexer
2 participants