fix path_format for http multivariate patterns
MODIFY
tests/conftest.py
tests/conftest.py
@@ -197,9 +197,10 @@ def start_http_server(paths, request, username=None, password=None, required_que
],
)
def netcdf_http_paths(netcdf_paths, request):
- paths, items_per_file, fnames_by_variable, path_format = netcdf_paths
+ paths, items_per_file, fnames_by_variable, _ = netcdf_paths
url = start_http_server(paths, request, **request.param)
+ path_format = url + "/{variable}_{time:03d}.nc" if fnames_by_variable else None
fnames = [path.basename for path in paths]
all_urls = ["/".join([url, str(fname)]) for fname in fnames]

MODIFY
tests/test_recipes.py
tests/test_recipes.py
@@ -140,13 +140,6 @@ def test_recipe_http_caching_copying(
RecipeClass, file_pattern, kwargs, ds_expected, target = netCDFtoZarr_http_recipe
- if len(file_pattern.merge_dims) != 0:
- pytest.skip(
- "This test ensures auth kwargs are correctly passed to the recipe class."
- "`netcdf_http_file_pattern` fixture currently does not return a properly"
- " formatted `path_format` for recipes with a `MergeDim.`"
- )
-
first_url = list(file_pattern.items())[0][1]
r = requests.get(first_url)
if r.status_code == 401:

fix path_format for http multivariate patterns