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

Articles data model and API changes #1903

Merged
merged 58 commits into from
Jul 22, 2024
Merged

Articles data model and API changes #1903

merged 58 commits into from
Jul 22, 2024

Conversation

caiosba
Copy link
Contributor

@caiosba caiosba commented May 28, 2024

API changes to return filtered and sorted explainers and fact-checks for a given workspace.

Reference: CV2-4441.

Check Web Epic PR: meedan/check-web#1951

caiosba added 4 commits May 24, 2024 16:56
In order to list explainers on the frontend side, some changes were needed on the backend.

- Title should not be mandatory at the API level but at the model level (and description as well)
- Store tags in the Explainer model and keep them in sync with TagText instances
- Adding filters, counter, sorting and pagination to the TeamType.articles connection

Reference: CV2-4500.
end
end

private
Copy link

Choose a reason for hiding this comment

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

Useless private access modifier.

caiosba added 2 commits May 30, 2024 08:58
Some changes for fact-checks data model and API:

* Adding tags
* Filters and sort

Reference: CV2-4145
@caiosba caiosba marked this pull request as ready for review May 31, 2024 23:10
@caiosba
Copy link
Contributor Author

caiosba commented Jun 4, 2024

@melsawy can you please review this?

melsawy and others added 10 commits June 11, 2024 16:49
* CV2-4665: index report information in fact check

* CV2-4665: fix tests

* CV2-4665: migrate fact-check tags and allow filter by report informations(publisher, rating and report status)

* CV2-4665: apply PR comments

* CV2-4665: add more tests
Some changes to articles API and data model:

- It should be possible to create `ClaimDescription` without a `ProjectMedia`
- Adding a `team_id` field to `ClaimDescription`
- Expose `ClaimDescription.project_media_id` in GraphQL mutations
- Adding a new many-to-many relationship between explainers and items, through a new join model `ExplainItem`, and respective GraphQL type and mutations
- Expose `FactCheck.rating` in GraphQL mutations
- New GraphQL fields for `ProjectMedia`: `fact_check` and `explainers`
- New filters for `Team.explainers` GraphQL connection: `standalone` and `text`

References: CV2-4441, CV2-4626 and CV2-4627.
caiosba and others added 22 commits July 10, 2024 08:49
Adding an "imported" field to fact-checks. It's automatically set as "true" for fact-checks created by bots. This PR includes:

- Database migration
- Business logic (set "imported" as "true" for fact-checks created by bots, automatically)
- Unit tests
- GraphQL API, including filter to TeamType.articles
- Rake task to update existing fact-checks

Reference: CV2-4882.
* CV2-4901: Sync status value with fact-check rating

* CV2-4901: apply PR comment

* CV2-4901: fix tests
…ecks (#1956)

This creates both standalone claim descriptions and standalone claim descriptions with fact checks. Though only the second is visible in the UI. We also:

- verify the fact checks with a random status ('undetermined', 'not_applicable', 'in_progress', 'verified' or 'false')
- add a link to half of the standalone fact checks

Note: I also had to update how we were verifying and publishing the fact-checks that are related to a project media. It was breaking since now we can have claim_descriptions with nil project_media_id. (check-api/db/seeds.rb: line 333)

References: 4880
PR: 1956
Copy link

codeclimate bot commented Jul 17, 2024

Code Climate has analyzed commit 8a201eb 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.

@caiosba caiosba merged commit b36f8f1 into develop Jul 22, 2024
4 checks passed
@caiosba caiosba deleted the epic/CV2-4441-articles branch July 22, 2024 22:07
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.

6 participants