comp426-2022-fall / a02

Create a command line Node.js package that ingests API data from Open-Meteo
GNU Affero General Public License v3.0
0 stars 0 forks source link

Autograder: ::error::The output for test galosh.js JSON did not match #17

Open chaynickUNC opened 1 year ago

chaynickUNC commented 1 year ago

Delete text above this line before you submit your issue. Place your issue information in the appropriate sections below.

Which autograder check is failing?

::error::The output for test galosh.js JSON did not match

What is happening?

The output of my code does not match what the autograder expects, even when they appear to be the exact same.

Failed workflow run URL

https://github.com/comp426-2022-fall/a02-chaynickUNC/actions/runs/3390630486/jobs/5634991842

What should be happening?

The autograder should compare what is expected to the code's output, and allowing the test to pass.

Screenshots of your local test(s)

Why do you think the autograder is failing?

One of the data points returned by OpenMeteo is not in the range of acceptable values

vennila-t commented 1 year ago

Hey Nicholas,

I looked through your code and realized that you didn't have a statement for what would happen if your command line argument was "-j". This is the test/command that is currently failing in the autograder. I would add a conditional statement for what your program should do in this scenario. Hint: should start with if( args.j). Once you figure out what to write, this should fix your issue. Let me know if you have additional questions

chaynickUNC commented 1 year ago

I think I already have a conditional dealing with -j, around line 13 in cli.js

Get Outlook for iOShttps://aka.ms/o0ukef


From: vennila-t @.> Sent: Thursday, November 17, 2022 12:55:18 PM To: comp426-2022-fall/a02 @.> Cc: Carter, Nicholas Chay @.>; Author @.> Subject: Re: [comp426-2022-fall/a02] Autograder: ::error::The output for test galosh.js JSON did not match (Issue #17)

Hey Nicholas,

I looked through your code and realized that you didn't have a statement for what would happen if your command line argument was "-j". This is the test/command is currently failing in the autograder. I would add a conditional statement for what your program should do if args.j. Once you figure out what to write, this should fix your issue. Let me know y=if you have additional questions

— Reply to this email directly, view it on GitHubhttps://github.com/comp426-2022-fall/a02/issues/17#issuecomment-1319000273, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASRVBIEG6TQF2VV3KYD6RPLWIZWQNANCNFSM6AAAAAASDTKAU4. You are receiving this because you authored the thread.Message ID: @.***>

vennila-t commented 1 year ago

Ohh I see. I missed that line.

However, In line 14, I notice that in your const response , for fetch you already have the default test values for latitude, longitudes, etc. instead of inserting variables in your url. You need to insert your variables instead. the format should be "https://api.open-meteo.com/v1/forecast?latitude= + latitude " instead of "https://api.open-meteo.com/v1/forecast?latitude=35.875" and this should be done for every variable in the url