{"id":19294492,"url":"https://github.com/channingko-madden/weather-data","last_synced_at":"2026-05-16T09:31:50.188Z","repository":{"id":253480271,"uuid":"575607696","full_name":"channingko-madden/weather-data","owner":"channingko-madden","description":"Weather data technical assessment","archived":false,"fork":false,"pushed_at":"2024-08-17T00:31:47.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T00:28:03.752Z","etag":null,"topics":["cli","cmake","cpp","json","vcpkg"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/channingko-madden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-07T22:31:42.000Z","updated_at":"2025-02-07T20:37:35.000Z","dependencies_parsed_at":"2024-08-17T02:41:47.865Z","dependency_job_id":"bd6e21e7-c610-47bb-9002-1c7b0764bcf7","html_url":"https://github.com/channingko-madden/weather-data","commit_stats":null,"previous_names":["channingko-madden/weather-data"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/channingko-madden/weather-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channingko-madden%2Fweather-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channingko-madden%2Fweather-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channingko-madden%2Fweather-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channingko-madden%2Fweather-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/channingko-madden","download_url":"https://codeload.github.com/channingko-madden/weather-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/channingko-madden%2Fweather-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33096858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cmake","cpp","json","vcpkg"],"created_at":"2024-11-09T22:38:33.966Z","updated_at":"2026-05-16T09:31:50.171Z","avatar_url":"https://github.com/channingko-madden.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# weather-data\nWeather data [technical assessment](docs/Technical_Task.md). \n\n## vcpkg (dependency-manager)\n[vcpkg](https://github.com/microsoft/vcpkg) is used to manage the dependencies for this project.\nCurrent dependencies are listed in [vcpkg.json](vcpkg.json). Currently they are:\n* [jsoncpp](https://github.com/open-source-parsers/jsoncpp)\n* [date](https://github.com/HowardHinnant/date)\n* [cli11](https://github.com/CLIUtils/CLI11)\n* [googletest](https://github.com/google/googletest)\n\nvcpkg has stable versions of the above libraries and makes it easy to download and build with them.\n### One-time setup for vcpkg\nvcpkg is included as a submodule within this project and requires a one-time setup when\nthis project repo is first cloned.\n```bash\ngit submodule update --init\ncd extern/vcpkg\n./bootstrap-vcpkg.sh -disableMetrics\n```\n\n## Build, Test, \u0026 Run\n### Build using cmake\nYou can build the parseweather command-line script as well as unit tests using cmake (C++17 is required).\n```bash\nmkdir build\ncd build\ncmake ..\ncmake --build .\n```\n### Install parseweather using cmake\nThe parseweather script and unit test executables can be run from within the build directory.\\\nOptionally, after building you can install the parseweather script also using cmake, and be able to\nrun the script from outside the build directory.\n```bash\ncd build\nsudo cmake --install .\n```\n### Test Scripts\nAn example JSON data file is located within the test directory\n- [json_parse_test](test/json_parse_test.cpp): Unit test for functions for parsing JSON data\n- [weather_archive_test](test/weather_archive_test.cpp): Unit test for\n[WeatherArchive](include/data/weather_archive.h) class\n\n### parseweather\nInstructions for how to use the parseweather command-line script can be found using the --help option:\n```bash\nparseweather -h\n```\nOn successful execution, parseweather sends the output to stdout, which can be redirected into a file if desired.\nFor example:\n```bash\nparseweather -f example_weather.json -d 2016-01-01 \u003e output.json\n```\nWarning and error messages are output to stderr to protect the JSON format of data output to stdout.\n\n#### The | character\nIn the terminal, the | character will be interpreted as the pipe command, and therefore needs to be escaped when\nusing the --range, --mean, and --sample-history options.\\\nFor example: \n```bash\nparseweather -f example_weather.json -r 2022-01-01\\|2022-12-31\n```\n\n#### Conflict of -h option \nThe [technical assessment](docs/Technical_Task.md) asks that there be an option -h or --historical-sample as an\nextra challenge. I decided to instead change the name of this option to -s or --sample-history because of the conflict\nof the short option -h with the common convention of -h as the short option for --help. I felt it was worth keeping\nin line with the -h, --help convention, and that changing the option name to -s, --sample-history did not make it\nmore difficult to understand.\n\n## Doxygen Documentation\nHTML API documentation can be created using doxygen.\n```bash\ncd docs\ndoxygen weather_data.conf\n```\nThe html documentation is created and placed in a directory named html.\\\nDocumentation can then be viewed in a browser. To open from the terminal:\n```bash\ncd docs\nxdg-open html/index.html\n```\n\n## Future Improvements\n* Improve user warning and error messages\n  * When data is missing for range based options\n  * When a historical sample cannot be found\n* Functional tests for parseweather script\n* Clang formatting\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanningko-madden%2Fweather-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanningko-madden%2Fweather-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanningko-madden%2Fweather-data/lists"}