unneon / icie

Competitive programming IDE-as-a-VS-Code-plugin
https://marketplace.visualstudio.com/items?itemName=pustaczek.icie
Mozilla Public License 2.0
84 stars 11 forks source link

Sample test cases are not being fetched for Codechef problems #30

Open ShridharGoel opened 4 years ago

ShridharGoel commented 4 years ago

Sample test cases are not being fetched for Codechef problems because of the which the Test View remains blank.

unneon commented 4 years ago

Fetching CodeChef tests is not implemented yet, because they come in various formats depending on the contest, so it's hard to tell where they begin and end. If you're interested in working on this, feel free to ask me on our Discord.

ShridharGoel commented 4 years ago

Fetching CodeChef tests is not implemented yet, because they come in various formats depending on the contest, so it's hard to tell where they begin and end.

Okay, I was wondering whether it's a bug or it isn't implemented yet. Just saw that it's mentioned in the Supported Sites table in the Readme.

If you're interested in working on this, feel free to ask me on our Discord.

Actually, I don't have any experience with Rust currently.

Raju235 commented 4 years ago

Fetching CodeChef tests is not implemented yet, because they come in various formats depending on the contest, so it's hard to tell where they begin and end.

But, this has been implemented in acmX and it works well. Can we try it the similar way?

unneon commented 4 years ago

It's very much possible to implement. acmX uses competitive companion to do the parsing, which implements CodeChef test parsing here. It seems like it's just a lot of ifs, and it should be possible to add similar logic in ICIE's parser using the resp.body variable (it's in Markdown, so the parsing will be slightly different) there. So just write a bunch of ifs/text slicing/regexes, return that from the function, and then test it on a lot of tasks. Unfortunately, I really don't have any time or need to implement this myself. If want to do this, feel free to ask me on Discord for details.