kfl / staffeli_nt

Staffeli NT Technology
MIT License
8 stars 8 forks source link

Make stafffeli run all submissions through onlineTA #34

Closed Spatenheinz closed 3 years ago

Spatenheinz commented 3 years ago

The title says it all. I am working on a feature that will allow staffeli to run all submissions through onlineTA, My idea is to add a field in the yaml file as such:

onlineTA: url-to-the-subinstance-of-onlineta/assignment

kfl commented 3 years ago

I'm all for making staffeli_nt more useful (so don't let this comment stop you).

However, extending the download script like this will worsen #4 if possibe, I'd prefer that the template yaml file grew a field called post-download (or something like that) that contained some python code that you'd like to run after each download.

Something like:

post-download: |
    import zipfile
    with zipfile.ZipFile("code.zip", 'r') as zip_ref:
         zip_ref.extractall("unpacked")

We might as well take full advantage of python having an eval function.

But as I said, don't let my pipe dreams hold you back.

kfl commented 3 years ago

We should probably use exec rather than eval (so that we can allow import and so on).

Spatenheinz commented 3 years ago

I made the suggestion without noticing that you had made a comment. So see my suggestion as a temporary solution. I do however think cluttering the template file too much is suboptimal as there is more considerations placed on the user. Perhaps we should modularize the different actions taken such as the ones in issue #34 and #4 in different scripts or would this be a bad idea?