Closed jorbea closed 1 year ago
Handling -j (args.j) just means logging your data from response.json() and then doing process.exit(0). Sorry if this was unclear from the assignment instructions.
Hi Ellis,
Thank you for your help a few weeks ago trying to debug my assignment. I tinkered around with a few things to try and figure out what changed from before we looked into it and after, since it went from failing one test (galosh.js JSON) to failing three (Today weather, galosh.js today, and still galosh.js JSON). After looking through my commits, I realized that I didn't change anything, but I think what the autograder was testing changed. I reverted to an older commit that was passing everything but the galosh.js JSON, and now it's failing the same three tests.
Unfortunately, I didn't take note of the type of change that you recommended for the days/precipitation if statements, so I was wondering if you have any advice as to what I should try/what I'm missing that is resulting in those three tests failing. When I test them, the output appears correct.
Thank you for your time!
Looks like you were able to figure out the issue! Yes, occasionally you will have everything correct but the autograder will expect certain syntax with output (INCLUDING exact spacing) so keep that in mind when moving forward in the assignments.
I've checked galo.sh to try and get an idea of what exactly needs to be returned when entering the command "galosh.js -j" into our app, but what I have tried thus far is not satisfying the autograder.
Here is what I've tried:
*My current weather JSON includes the following information when provided a lat of 35 and long of 79: { "latitude": 35, "longitude": 79, "generationtime_ms": 0.35202503204345703, "utc_offset_seconds": -14400, "timezone": "America/New_York", "timezone_abbreviation": "EDT", "elevation": 5507, "current_weather": { "temperature": -17.7, "windspeed": 8, "winddirection": 306, "weathercode": 0, "time": "2022-10-13T20:00" }, "daily_units": { "time": "iso8601", "precipitation_hours": "h" }, "daily": { "time": [ "2022-10-13", "2022-10-14", "2022-10-15", "2022-10-16", "2022-10-17", "2022-10-18", "2022-10-19" ], "precipitation_hours": [ 3, 0, 0, 0, 0, 0, 0 ] } }
Any clarification would be much appreciated!