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

Create dataset, folder with name if does not exist. #62

Conversation

tcnichol
Copy link
Contributor

This branch now allows for the creation of datasets by name if they do not exist, and folders in datasets by name if they do not exist. Some of the methods were pulled from TerraUtils and some were taken from various scripts I've used for the PDG project. It seems like these would be useful to have.

Right now I have only implemented for v1. When the v2 pull request is merged in, I will add them for v2.

…nd for creating a folder with a name in a dataset if it does not exist
@tcnichol tcnichol linked an issue Mar 10, 2023 that may be closed by this pull request
@tcnichol tcnichol requested review from max-zilla and robkooper March 10, 2023 21:44
@@ -14,6 +14,126 @@
from pyclowder.collections import get_datasets, get_child_collections, delete as delete_collection
from pyclowder.utils import StatusMessage

def create_empty_dataset(host, clowder_user, clowder_pass, datasetname, description, parentid=None, spaceid=None):
Copy link
Member

Choose a reason for hiding this comment

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

this seems to be the same as create_empty (quick glance). Can we add the username/password/key option to that function and have them all be default None?

@robkooper
Copy link
Member

Can you update changelog

…nd-folder-by-name-if-they-do-not-exist

# Conflicts:
#	pyclowder/datasets.py
@tcnichol tcnichol closed this Apr 19, 2023
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.

create dataset and folder by name if they do not exist
2 participants