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

Always load all protocols #278

Merged
merged 6 commits into from
Feb 6, 2017
Merged

Always load all protocols #278

merged 6 commits into from
Feb 6, 2017

Conversation

knrafto
Copy link
Contributor

@knrafto knrafto commented Jan 26, 2017

From now on we'll ignore the list of protocols in protocols.

@@ -354,7 +354,7 @@ def import_module(module):
self.mockImportModule.side_effect = import_module
self.mockFindFiles.return_value = [self.FILE1]

self.makeAssignment()
self.assertRaises(ImportError, self.makeAssignment)
Copy link
Contributor Author

@knrafto knrafto Jan 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rationale here is that previously an invalid protocol was a config error. Now it's a bug.

@choreff
Copy link

choreff commented Jan 26, 2017

Does this mean that we won't need to add scoring to the OK files when adding them to the autograder? And that students would be able to run python3 ok --score?

@knrafto
Copy link
Contributor Author

knrafto commented Jan 26, 2017

Yes to both. Is there a danger to letting students run python3 ok --score?

@choreff
Copy link

choreff commented Jan 26, 2017

I don't think so. I was just clarifying my own understanding.

@Sumukh
Copy link
Member

Sumukh commented Jan 26, 2017

The only protocol I'm concerned about is Backup. It's perfectly valid for someone not want to use the backup protocol (data8 did this all last year) and with this PR there is no way to do so (without having the user add arguments every time).

No other protocol prompts for authentication with a user flag specifying that they want to run that protocol.

There are a few solutions:

  • A blank endpoint ("") prevents backup from running.
  • An optional argument in the .ok file that disables the backup protocol.

@knrafto knrafto closed this Jan 26, 2017
@Sumukh Sumukh reopened this Jan 26, 2017
@knrafto
Copy link
Contributor Author

knrafto commented Jan 26, 2017

Hmm how about omitting the endpoint entirely?

@Sumukh
Copy link
Member

Sumukh commented Jan 26, 2017

We use the endpoint all over the place - in collab & hinting for example.

If we can get a default value in there - so that using assignment.endpoint won't result in attribute error - then that's fine with me.

@knrafto
Copy link
Contributor Author

knrafto commented Feb 6, 2017

The endpoint now defaults to the empty string if omitted. If the endpoint is falsey, we won't attempt to backup. I tested the other protocols too manually, and nothing seemed to break.

@knrafto knrafto requested a review from Sumukh February 6, 2017 21:38
Copy link
Member

@Sumukh Sumukh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is worth a bump to v1.10.0

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.

3 participants