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

Add optional QID order validation and refactor label decomposition #507

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

OmarAI2003
Copy link
Contributor

  • Introduced check_optional_qid_order function to validate the order of QIDs in optional statements within SPARQL queries.
  • Extracted label decomposition logic into the decompose_label_features function, which is now used in both functions.
  • Updated check_query_forms to include validation for the correct order of QIDs in OPTIONAL clauses.

Contributor checklist


Description

This PR introduces a new function check_optional_qid_order to validate the order of QIDs in optional statements within SPARQL queries. Additionally, the label decomposition logic has been refactored into the decompose_label_features function, which is now used in both check_forms_order and check_optional_qid_order for better readability and consistency. The check_query_forms function has been updated to include validation for the correct order of QIDs in OPTIONAL clauses.

Note: The queries are still in progress and will be finalized once the function is approved.

Related issue

- Introduced check_optional_qid_order function to validate the order of QIDs in optional statements within SPARQL queries.
- Extracted label decomposition logic into the decompose_label_features function, which is now used in both functions.
- Updated check_query_forms to include validation for the correct order of QIDs in OPTIONAL clauses.
Copy link

github-actions bot commented Nov 13, 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. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The linting and formatting workflow within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis andrewtavis self-requested a review November 13, 2024 21:45
@andrewtavis
Copy link
Member

Wonderful work, @OmarAI2003! 🚀 Can we change the message to The QIDs in optional statement for FORM_NAME should be ordered:? That way it's easy for someone to find where they need to make the change?

@OmarAI2003
Copy link
Contributor Author

I've done this. Thanks @andrewtavis for your instant reply. Should I include anything else?

@andrewtavis
Copy link
Member

I'll correct my own suggestion 😇 Let's do QIDs in the optional statement for FORM_NAME should be ordered: (start as you had it and say the optional...). Aside from that we're good to fix the form orders and close this up!

…rammatical features), update error message, and fix queries.
@andrewtavis
Copy link
Member

Good for a final review here, @OmarAI2003? :)

@OmarAI2003
Copy link
Contributor Author

Good for a final review here, @OmarAI2003? :)

Yeah, I think so.

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.

Really amazing work here, @OmarAI2003 😊 No changes needed :) Thanks for the quick reactions to comments and for the attention to detail!

@andrewtavis andrewtavis merged commit 9773596 into scribe-org:main Nov 14, 2024
8 checks passed
@OmarAI2003 OmarAI2003 deleted the OptionalStatmentsOrdering branch November 15, 2024 22:20
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.

Create workflow to check query forms
2 participants