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

Root dir checks #116

Merged
merged 4 commits into from May 23, 2024
Merged

Root dir checks #116

merged 4 commits into from May 23, 2024

Conversation

stuartmcalpine
Copy link
Collaborator

Add some checks on the root_dir before registering data

Changes

  • Add check during dataset registration to raise an exception if the root_dir does not exist
  • Add check before copying any data (i.e., old_location != None) that the user has write permission to the root_dir folder.

Thoughts

  • Is this the behavior we want? Are there any other scenarios/checks to cover?

Todo

  • Add CI test

@stuartmcalpine stuartmcalpine changed the base branch from main to u/stuart/v0.4.0 April 9, 2024 14:39
Base automatically changed from u/stuart/v0.4.0 to main April 27, 2024 09:56
@JoanneBogart
Copy link
Collaborator

Is this the behavior we want?

That's the question all right. It is consistent with the way register currently works, creating directories directly under root_dir when necessary. But it isn't always necessary. Most of the time the owner_type directory at least will already be there, often owner_type/owner as well. If they exist, the caller only needs write permission there. On the other hand, we currently have no reason (or automated ability) to make permissions different for different levels of the file hierarchy.

@JoanneBogart JoanneBogart self-requested a review May 17, 2024 16:18
Copy link
Collaborator

@JoanneBogart JoanneBogart left a comment

Choose a reason for hiding this comment

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

This is fine the way it is for now.

@stuartmcalpine stuartmcalpine merged commit b54ba6e into main May 23, 2024
8 checks passed
@stuartmcalpine stuartmcalpine deleted the u/stuart/folder_permission_check branch May 23, 2024 11:27
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.

None yet

2 participants