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

Update checkquery.py #64

Merged
merged 4 commits into from
Feb 22, 2024
Merged

Update checkquery.py #64

merged 4 commits into from
Feb 22, 2024

Conversation

Jk40git
Copy link
Contributor

@Jk40git Jk40git commented Feb 12, 2024

Changes made on the docstrings

Contributor checklist


Description

Related issue

  • #ISSUE_NUMBER

Changes made on the docstrings
Copy link

github-actions bot commented Feb 12, 2024

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. It'd be great to have you!

Maintainer checklist

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution

    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local Scribe-Data repo
  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis
Copy link
Member

Hey @Jk40git. I see that there's still some confusion here. The goal os this is not to have the same documentation string for all of the functions. The document string is for the arguments of the function, so we just need to reformat it and put the arguments of the function in the right place. I'll annotate the code a bit to explain what I'm talking about.


Returns:
str: the SPARQL query.
The 'target' value given the passed arguments.
Copy link
Member

Choose a reason for hiding this comment

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

We want this here to be the same as it was before, but with a different format for the Returns:. So ideally:

Returns
--------
    str : the SPARQL query.

query (QueryFile): the query that failed.
Parameters
-----------
source_value : str
Copy link
Member

Choose a reason for hiding this comment

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

Here we need message and query, the arguments of the function.

bool: True if connectivity established. False otherwise.
Parameters
-----------
source_value : str
Copy link
Member

Choose a reason for hiding this comment

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

Here we need url and timeout.


Returns
--------
The 'target' value given the passed arguments.
Copy link
Member

Choose a reason for hiding this comment

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

We need this to be bool : True if connectivity established. False otherwise..


Returns
--------
The 'target' value given the passed arguments.
Copy link
Member

Choose a reason for hiding this comment

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

Here we need SPARQLWrapper : the context. as that's the return value for this function.

@andrewtavis
Copy link
Member

Let me know if the examples help with what we're asking for here, @Jk40git! Would be great if you could make changes for here and #65.

@Jk40git
Copy link
Contributor Author

Jk40git commented Feb 12, 2024

Hey @Jk40git. I see that there's still some confusion here. The goal os this is not to have the same documentation string for all of the functions. The document string is for the arguments of the function, so we just need to reformat it and put the arguments of the function in the right place. I'll annotate the code a bit to explain what I'm talking about.

Please check the edits I have just made

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

A couple more edits this time around, @Jk40git, but generally ok. Many of the parameter descriptions needed to be on a new line, and there we're some minor things like the dashes not being the same length as Parameters and Returns.

@andrewtavis andrewtavis merged commit 2e06ffb into scribe-org:main Feb 22, 2024
3 of 6 checks passed
@Jk40git
Copy link
Contributor Author

Jk40git commented Feb 22, 2024

A couple more edits this time around, @Jk40git, but generally ok. Many of the parameter descriptions needed to be on a new line, and there we're some minor things like the dashes not being the same length as Parameters and Returns.

@andrewtavis they are already on new lines or what do you mean please (the indentation)?

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