LibreTexts / ngshare

nbgrader sharing service
https://ngshare.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
17 stars 17 forks source link

Submission listing notebook list and checksum support #36

Closed lxylxy123456 closed 4 years ago

lxylxy123456 commented 4 years ago

API modification: checksum is md5sum, whenever list_only or not return checksum Database modification: checksum for files Backend: ...

lxylxy123456 commented 4 years ago

@Lawrence37 Can you add the rule that get_all=true must have list_only=true?

lxylxy123456 commented 4 years ago

Also: should API fail or return empty list when using get_latest or timestamp?

lxylxy123456 commented 4 years ago

Also: it should look more like

{
    "success": true,
    submissions: [
        {
            "timestamp": /* submission timestamp */,
            "files": /* encoded directory tree */
        },
        ...
    ]
}
Lawrence37 commented 4 years ago

I removed get_all and get_latest. If no submission matches the timestamp, the server should respond with "Submission not found."

lxylxy123456 commented 4 years ago
  1. We want to also provide checksum for notebooks (so consider reverting b08a7e27ab0126e77170cb37cab2a9094e154574). It is redundant, but it makes backend easier and does not hurt frontend.
  2. What happens to get_all?
Lawrence37 commented 4 years ago
  1. I only changed the definitions. The API remains the same. Are you referring to a different commit?
  2. It's not necessary because "timestamp" can be used to retrieve all submissions.
lxylxy123456 commented 4 years ago

I see. My brain got short circuit when I was asking 1. I have no more questions now.