diff --git a/examples/create_dataset.py b/examples/create_dataset.py new file mode 100644 index 0000000..7b198a9 --- /dev/null +++ b/examples/create_dataset.py @@ -0,0 +1,12 @@ +""" +Run this script to copy the template directory to a create a new dataset +""" + +from pathlib import Path +from hdxms_datasets import create_dataset + + +author_name = "Krishnamurthy" +human_readable_tag = "SecB" # optional tag + +data_id = create_dataset(Path().resolve() / "datasets", "smit", "testing") diff --git a/tests/test_hdxms_datasets.py b/tests/test_hdxms_datasets.py index f8fc40f..3512a3d 100644 --- a/tests/test_hdxms_datasets.py +++ b/tests/test_hdxms_datasets.py @@ -76,6 +76,9 @@ def test_create_dataset(tmp_path): assert (dataset_pth / "readme.md").read_text() == f"# {data_id}" + assert (dataset_pth / "hdx_spec.yaml").exists() + assert (dataset_pth / "data" / "data_file.csv").exists() + def test_metadata(dataset: HDXDataSet): test_metadata = yaml.safe_load((TEST_PTH / "datasets" / DATA_ID / "metadata.yaml").read_text())