- 
                Notifications
    You must be signed in to change notification settings 
- Fork 31
[WIP] Update pythonwhat is_instance documentation #382
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
base: master
Are you sure you want to change the base?
Conversation
         TimSangster
  
      
      
      commented
      
            TimSangster
  
      
      
      commented
        Jun 20, 2019 
      
    
  
- Fix pythonwhat is_instance documentation to mention inst needs to be passed as a string.
| Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ | 
a83bd91    to
    9f81d75      
    Compare
  
    | Args: | ||
| inst (class): The class that the object should have. | ||
| inst (str): The class that the object should have as a string. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation is correct according to the implementation and this test:
pythonwhat/tests/test_check_object.py
Line 83 in e0befeb
| def test_is_instance(stu_code, passes): | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, found what you mean, going to look into it
| # solution | ||
| # Perform the train-test split | ||
| X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain where this function comes from (just mention library).
| "That's a clown who likes burgers.", | ||
| "Correct! Head over to the next exercise!"]) | ||
| Recommended approach for testing train test splits | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a link to this section.
That section should mention that the names of these arguments are not fixed, something like:
Note that the
*argsargument, while common does not need to be namedargs. Pythonwhat expexts the real argument name. Useinspect.signatureas done above to know the argument name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The is_instance update is not correct. Maybe a bug?