data-8 / zero-to-data-8

A quick guide to deploying your own Data 8 course
http://data8.org/zero-to-data-8
MIT License
26 stars 15 forks source link

Scraping OKpy server stuff from the homework materials #11

Closed choldgraf closed 6 years ago

choldgraf commented 6 years ago

Right now we have a lot of homework materials / labs that require OKpy authentication and submission. What's the best path forward for scraping this away from the notebooks so that others can interact with them. Two main ideas I had:

  1. Write a helper script that clones the homework/lab repos and automatically scrapes out the server-specific stuff, then places the repo in the user's current directory.
  2. Publish a "public-facing" version of the homeworks/labs.
  3. Provide a "request access to the homeworks" form and then we grant people private access so they can clone w/o the answers being public. Combine this with #1

Any other ideas on how this could be handled? @henchc you mentioned this before, so curious as to your thoughts

henchc commented 6 years ago

I think option 1 shouldn't be too hard. if you take hw1 as an example, you can remove the _ = ok.auth(inline=True) line and all .submit lines. When you run _ = ok.grade('q2') you can still see if you got the answer correct because the answers are all local at this point.

this would allow one to complete the entire course and get it graded, but it wouldn't track it in a database like the OKpy servers (which I don't think we could expect to support).

am i missing something?

henchc commented 6 years ago

and as for #3 isn't it all public already?

choldgraf commented 6 years ago

cool, we can shoot for 1 and good point re: number 3

choldgraf commented 6 years ago

ok this should be fixed by https://github.com/choldgraf/dsep_stack/blob/master/z2d8/scripts/remove_okpy_from_data8.py