Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post-download implemented #4 #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Spatenheinz
Copy link
Contributor

I have considered your idea and it grew on me. So i have implemented post-download. I have not fixed anything in relation to the meta file etc. but i have moved unzipping submissions into a function unzip_handin() which works as a "macro". It is quite a bad implementation which should probably be improved some time in the future. Currently it should only work as a shortcut for generic unzipping.

@kfl
Copy link
Owner

kfl commented Oct 24, 2021

I'll not merge this PR as it is currently.

  • There is no documentation, thus I'm not sure I fully understand how to use the feature. I think that to get unzipping I need to set post-download to unzip_handin (or is it unzip_handin()).
  • The feature is not "opt-in". That is, it changes the current behaviour of calling download.py without enabling the feature. This goes against one of my current core development principles for staffeli_nt: Adding features for one course, should not disturb other courses using staffeli_nt (especially not while we are mid-block).
  • The current feature is just too dirty. Fishing variable binding out of the calling function's stack frame is too fragile for me to stomach 😉

That said, I like the idea of having some well-defined steps to use in post-download instead of having just raw python code. Perhaps something like:

post-download:
  - unzip_in("code.zip","unpacked")
  - remove_standard_junk
  - remove_junk([".stack-work",".git"])
  - call_onlineta:
      - url: https://pop.incorrectness.dk/
      - handin: code.zip

Maybe that's the right way forward for #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants