Skip to content

Commit 8d50a05

Browse files
author
Jennifer Tran
committed
fix: update references to collections directory
1 parent eed1b3c commit 8d50a05

File tree

3 files changed

+49
-194
lines changed

3 files changed

+49
-194
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ When submitting STAC records to ingest, a pull request can be made with the data
2424

2525
### `collections/`
2626

27-
The `ingestion-data/collections/` directory holds json files representing the data for VEDA collection metadata (STAC).
27+
The `ingestion-data/production/collections/` directory holds json files representing the data for VEDA collection metadata (STAC).
2828

2929
Should follow the following format:
3030

transformation-scripts/collection-and-item-ingest.ipynb

+24-18
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,23 @@
4141
"cell_type": "markdown",
4242
"metadata": {},
4343
"source": [
44-
"The following cell retrieves collection JSON files from `/ingestion-data/collections/` and save collectionIds to a list."
44+
"Set the testing mode to `True` when testing and `False` otherwise. When the testing mode is `True`, the notebook will be set to run against `dev` endpoints."
45+
]
46+
},
47+
{
48+
"cell_type": "code",
49+
"execution_count": null,
50+
"metadata": {},
51+
"outputs": [],
52+
"source": [
53+
"testing_mode = True"
54+
]
55+
},
56+
{
57+
"cell_type": "markdown",
58+
"metadata": {},
59+
"source": [
60+
"The following cell retrieves collection JSON files from the `collections` directory and save collectionIds to a list."
4561
]
4662
},
4763
{
@@ -64,7 +80,13 @@
6480
" \"combined_CMIP6_daily_GISS-E2-1-G_tas_kerchunk_DEMO\",\n",
6581
"]\n",
6682
"\n",
67-
"json_file_paths = glob.glob(\"../ingestion-data/collections/*.json\")\n",
83+
"local_collections_path = (\n",
84+
" \"../ingestion-data/staging/collections/*.json\"\n",
85+
" if testing_mode\n",
86+
" else \"../ingestion-data/production/collections/*.json\"\n",
87+
")\n",
88+
"\n",
89+
"json_file_paths = glob.glob(local_collections_path)\n",
6890
"filtered_list = [\n",
6991
" item\n",
7092
" for item in json_file_paths\n",
@@ -81,22 +103,6 @@
81103
"]"
82104
]
83105
},
84-
{
85-
"cell_type": "markdown",
86-
"metadata": {},
87-
"source": [
88-
"Set the testing mode to `True` when testing and `False` otherwise. When the testing mode is `True`, the notebook will be set to run against `dev` endpoints."
89-
]
90-
},
91-
{
92-
"cell_type": "code",
93-
"execution_count": null,
94-
"metadata": {},
95-
"outputs": [],
96-
"source": [
97-
"testing_mode = True"
98-
]
99-
},
100106
{
101107
"cell_type": "markdown",
102108
"metadata": {},

0 commit comments

Comments
 (0)