<!-- SPDX-FileCopyrightText: © opening_hours.js contributors -->
<!-- SPDX-License-Identifier: LGPL-3.0-only -->

# Nominatim Cache Fixtures

## Purpose

These fixtures provide stable Nominatim responses for the test suite. They are
used to resolve a location's country and, for regional fixtures, state or
subdivision codes for holiday and sunrise calculations without making network
requests during tests.

## Generation

Do not edit files in this directory manually! They are generated by
[populate_nominatim_cache.mjs](../populate_nominatim_cache.mjs), which reads the
`_nominatim_url` entries from the country definitions, requests Nominatim
sequentially with a delay between requests, and writes the responses here.

To refresh all definitions into this directory, run from `src/holidays`:

```sh
node populate_nominatim_cache.mjs --overwrite --delay 1100
```

Use `--input-file de.yaml` to refresh one country. Existing files are not
overwritten unless `--overwrite` is specified.

## Fixture Types

Country fixtures contain only the country-level address fields used for
country resolution. Regional fixtures retain the relevant state or
subdivision fields, including ISO 3166-2 codes, so regional public holiday
rules can be selected during tests.
