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

[WIP] Update pythonwhat is_instance documentation #382

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TimSangster
Copy link
Contributor

  • Fix pythonwhat is_instance documentation to mention inst needs to be passed as a string.

@TimSangster TimSangster self-assigned this Jun 20, 2019
@codecov
Copy link

codecov bot commented Jun 20, 2019

Codecov Report

Merging #382 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #382   +/-   ##
=======================================
  Coverage   94.60%   94.60%           
=======================================
  Files          26       26           
  Lines        1984     1984           
=======================================
  Hits         1877     1877           
  Misses        107      107           
Impacted Files Coverage Δ
pythonwhat/checks/check_object.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1140abb...9f81d75. Read the comment docs.

@TimSangster TimSangster force-pushed the update_pythonwhat_documentation branch from a83bd91 to 9f81d75 Compare June 20, 2019 14:43
@@ -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.
Copy link
Member

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:

def test_is_instance(stu_code, passes):

Copy link
Contributor Author

@TimSangster TimSangster Jun 24, 2019

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)
Copy link
Member

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
Copy link
Member

@hermansje hermansje Jun 24, 2019

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 named args. Pythonwhat expexts the real argument name. Use inspect.signature as done above to know the argument name.

Copy link
Member

@hermansje hermansje left a 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?

@TimSangster TimSangster marked this pull request as draft September 15, 2020 11:42
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