-
Notifications
You must be signed in to change notification settings - Fork 31
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
[WIP] Update pythonwhat is_instance documentation #382
base: master
Are you sure you want to change the base?
Conversation
TimSangster
commented
Jun 20, 2019
- Fix pythonwhat is_instance documentation to mention inst needs to be passed as a string.
Codecov Report
@@ Coverage Diff @@
## master #382 +/- ##
=======================================
Coverage 94.60% 94.60%
=======================================
Files 26 26
Lines 1984 1984
=======================================
Hits 1877 1877
Misses 107 107
Continue to review full report at Codecov.
|
a83bd91
to
9f81d75
Compare
@@ -204,7 +204,7 @@ def is_instance(state, inst, not_instance_msg=None): | |||
used to 'zoom in' on the object of interest. | |||
|
|||
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).
@@ -225,6 +225,32 @@ Check Multiple Choice | |||
"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
*args
argument, while common does not need to be namedargs
. Pythonwhat expexts the real argument name. Useinspect.signature
as 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?