diff --git a/tooling/pipeline/includes/json_handling/json_loader.h b/tooling/pipeline/includes/json_handling/json_loader.h index 0354660..b8387c4 100644 --- a/tooling/pipeline/includes/json_handling/json_loader.h +++ b/tooling/pipeline/includes/json_handling/json_loader.h @@ -19,13 +19,11 @@ class JsonLoader { public: /// @brief Parses a JSON array file and returns all location records. static std::vector LoadLocations( - const std::filesystem::path& filepath, - std::shared_ptr logger = nullptr); + const std::filesystem::path& filepath); /// @brief Parses a JSON array file and returns all persona records. static std::vector LoadPersonas( - const std::filesystem::path& filepath, - std::shared_ptr logger = nullptr); + const std::filesystem::path& filepath); /** * @brief Parses the names-by-country fixture pair into a sampling-capable @@ -36,8 +34,7 @@ class JsonLoader { */ static NamesByCountry LoadNamesByCountry( const std::filesystem::path& forenames_filepath, - const std::filesystem::path& surnames_filepath, - std::shared_ptr logger = nullptr); + const std::filesystem::path& surnames_filepath); }; #endif // BIERGARTEN_PIPELINE_INCLUDES_JSON_HANDLING_JSON_LOADER_H_ diff --git a/tooling/pipeline/src/biergarten_pipeline_orchestrator/generate_users.cc b/tooling/pipeline/src/biergarten_pipeline_orchestrator/generate_users.cc index 3c00bbe..1b94e1e 100644 --- a/tooling/pipeline/src/biergarten_pipeline_orchestrator/generate_users.cc +++ b/tooling/pipeline/src/biergarten_pipeline_orchestrator/generate_users.cc @@ -96,7 +96,7 @@ void BiergartenPipelineOrchestrator::GenerateUsers( .message = "=== SAMPLE USER GENERATION ==="}); const std::vector personas = - JsonLoader::LoadPersonas("personas.json", logger_); + JsonLoader::LoadPersonas("personas.json"); if (personas.empty()) { throw std::runtime_error( @@ -104,7 +104,7 @@ void BiergartenPipelineOrchestrator::GenerateUsers( } const NamesByCountry names_by_country = JsonLoader::LoadNamesByCountry( - "forenames-by-country.json", "surnames-by-country.json", logger_); + "forenames-by-country.json", "surnames-by-country.json"); std::mt19937 rng(std::random_device{}()); std::uniform_int_distribution persona_dist(0, personas.size() - 1); diff --git a/tooling/pipeline/src/biergarten_pipeline_orchestrator/query_cities_with_countries.cc b/tooling/pipeline/src/biergarten_pipeline_orchestrator/query_cities_with_countries.cc index 6c1b62b..d6e66c3 100644 --- a/tooling/pipeline/src/biergarten_pipeline_orchestrator/query_cities_with_countries.cc +++ b/tooling/pipeline/src/biergarten_pipeline_orchestrator/query_cities_with_countries.cc @@ -22,7 +22,7 @@ BiergartenPipelineOrchestrator::QueryCitiesWithCountries() { const std::filesystem::path locations_path = "locations.json"; - auto all_locations = JsonLoader::LoadLocations(locations_path, logger_); + auto all_locations = JsonLoader::LoadLocations(locations_path); const size_t sample_count = std::min( static_cast(application_options_.pipeline.location_count), diff --git a/tooling/pipeline/src/json_handling/json_loader.cc b/tooling/pipeline/src/json_handling/json_loader.cc index 05ef4b5..15b4558 100644 --- a/tooling/pipeline/src/json_handling/json_loader.cc +++ b/tooling/pipeline/src/json_handling/json_loader.cc @@ -105,7 +105,7 @@ std::string ReadFirstOfStringArray(const boost::json::object& object, } // namespace std::vector JsonLoader::LoadLocations( - const std::filesystem::path& filepath, std::shared_ptr logger) { + const std::filesystem::path& filepath) { const boost::json::value root = ParseJsonFile(filepath, "locations"); if (!root.is_array()) { @@ -140,7 +140,7 @@ std::vector JsonLoader::LoadLocations( } std::vector JsonLoader::LoadPersonas( - const std::filesystem::path& filepath, std::shared_ptr logger) { + const std::filesystem::path& filepath) { const boost::json::value root = ParseJsonFile(filepath, "personas"); if (!root.is_array()) { @@ -171,8 +171,7 @@ std::vector JsonLoader::LoadPersonas( NamesByCountry JsonLoader::LoadNamesByCountry( const std::filesystem::path& forenames_filepath, - const std::filesystem::path& surnames_filepath, - std::shared_ptr logger) { + const std::filesystem::path& surnames_filepath) { const boost::json::value forenames_root = ParseJsonFile(forenames_filepath, "forenames-by-country"); const boost::json::value surnames_root =