Pipeline: rename Location to City, wire postal code into breweries

This commit is contained in:
Aaron Po
2026-07-13 02:26:44 -04:00
parent fbcf438381
commit d52dba904c
48 changed files with 2261 additions and 1227 deletions

View File

@@ -15,7 +15,7 @@
using ForenameList = std::vector<ForenameEntry>;
using SurnameList = std::vector<std::string>;
using LocationsList = std::vector<Location>;
using CityList = std::vector<City>;
using PersonasList = std::vector<UserPersona>;
using ForenamesByCountryMap = std::unordered_map<std::string, ForenameList>;
using SurnamesByCountryMap = std::unordered_map<std::string, SurnameList>;
@@ -37,7 +37,7 @@ class ICuratedDataService {
/**
* @brief Loads all curated location records.
*/
virtual const LocationsList& LoadLocations() = 0;
virtual const CityList& LoadCities() = 0;
/**
* @brief Loads all curated persona records.

View File

@@ -16,7 +16,7 @@
* CuratedJsonDataService.
*/
struct CuratedDataFilePaths {
std::filesystem::path locations_path;
std::filesystem::path cities_path;
std::filesystem::path personas_path;
std::filesystem::path forenames_path;
std::filesystem::path surnames_path;
@@ -27,7 +27,7 @@ struct CuratedDataFilePaths {
*/
class CuratedJsonDataService final : public ICuratedDataService {
struct cache {
LocationsList locations;
CityList locations;
PersonasList personas;
ForenamesByCountryMap forenames_by_country;
SurnamesByCountryMap surnames_by_country;
@@ -43,9 +43,9 @@ class CuratedJsonDataService final : public ICuratedDataService {
explicit CuratedJsonDataService(CuratedDataFilePaths filepaths);
/**
* @brief Parses a JSON array file and returns all location records.
* @brief Parses a JSON array file and returns all city records.
*/
const LocationsList& LoadLocations() override;
const CityList& LoadCities() override;
/**
* @brief Parses a JSON array file and returns all persona records.

View File

@@ -20,7 +20,7 @@ class MockCuratedDataService final : public ICuratedDataService {
public:
MockCuratedDataService();
const LocationsList& LoadLocations() override;
const CityList& LoadCities() override;
const PersonasList& LoadPersonas() override;
@@ -29,7 +29,7 @@ class MockCuratedDataService final : public ICuratedDataService {
const SurnamesByCountryMap& LoadSurnamesByCountry() override;
private:
LocationsList locations_;
CityList locations_;
PersonasList personas_;
ForenamesByCountryMap forenames_by_country_;
SurnamesByCountryMap surnames_by_country_;