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

CV2-5373: Most relevant articles #2130

Merged

Conversation

melsawy
Copy link
Contributor

@melsawy melsawy commented Nov 18, 2024

Description

List most recent articles which include the following.

  • List most relevant results.
  • CV2-5617: Use workspace similarity settings for explainers.
  • CV2-5731: Refactoring smooch search to return explainers in addition to fact-checks and also to query from a ProjectMedia

References: CV2-5373

How has this been tested?

Implemented unit tests.

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

* CV2-5731: call tipline search_for_articles method and append Explainers if no articles exists

* CV2-5731: fix graphql query and add more tests

* CV2-5731: apply PR comments and add more tests
…ject media item (#2142)

* CV2-5761: include FactCheck & Explainer for item most relevant

* CV2-5751: fix articles sort and change the limit

* CV2-5761: keep default sort (sort by score)

* CV2-5761: enforce limit value as a method args

* CV2-5761: cleanup

* CV2-5761: add more tests

* CV2-5761: add missing test to back coverage 100%

* CV2-5761: apply PR comments
Copy link

codeclimate bot commented Dec 3, 2024

Code Climate has analyzed commit 5c95273 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (100% is the threshold).

This pull request will bring the total coverage in the repository to 100.0% (0.0% change).

View more on Code Climate.

melsawy and others added 2 commits December 4, 2024 16:38
* CV2-5617: use workspace similarity settings for explainers

* Refactor threshold getters

* CV2-5617: fix tests

* CV2-5617: return models_and_thresholds in Hash formatt

---------

Co-authored-by: Devin Gaffney <[email protected]>
@melsawy melsawy marked this pull request as ready for review December 10, 2024 15:40
melsawy and others added 2 commits December 10, 2024 21:44
…eck Web Testing (#2151)

* Add new test helper method for creating standalone and published fact check

- create_imported_standalone_fact_check method in TestController to create a standalone and published fact check and associate it with a team.
- Updated `routes.rb` to include the new endpoint for fact checks.
- Added tests for the create_imported_standalone_fact_check

Reference: CV2-5737
Copy link
Contributor

@caiosba caiosba left a comment

Choose a reason for hiding this comment

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

Thanks @melsawy , it took me some time because I wanted to re-review the whole thing carefully now that's altogether. We need to make sure to QA tipline search once this is merged.

test/models/explainer_test.rb Outdated Show resolved Hide resolved
…icles' of github.com:meedan/check-api into epic/CV2-5373-most-recent-articles-to-most-relevant-articles
@melsawy melsawy merged commit 5020cbc into develop Dec 11, 2024
11 checks passed
@melsawy melsawy deleted the epic/CV2-5373-most-recent-articles-to-most-relevant-articles branch December 11, 2024 08:48
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.

3 participants