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

Assign Topics to Articles #157

Open
13 tasks
prasenjeet-symon opened this issue Oct 11, 2023 · 5 comments
Open
13 tasks

Assign Topics to Articles #157

prasenjeet-symon opened this issue Oct 11, 2023 · 5 comments
Assignees
Labels
beginner-friendly EddieHub:good-first-issue enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed server related to server

Comments

@prasenjeet-symon
Copy link
Owner

Title: Assign Topics to Articles

Description:
This GitHub issue is aimed at implementing a function called assignTopicsToArticles in the seeder/utils.ts file. This function will assign topics to articles in the database. The goal is to ensure that articles are tagged with relevant topics, providing better organization and searchability within the application.

Tasks:

  1. Implement assignTopicsToArticles Function:
    • Create a new function named assignTopicsToArticles within the seeder/utils.ts file.
    • Ensure that the function accepts an email parameter, representing the target user.
    • Fetch the main user's topics from the database using the provided email.
    • Retrieve all the topics available in the application from the database.
    • Fetch all articles from the database.
    • Select 80% of the articles randomly to assign topics.
    • For each article, create a list of topics to assign in such a way that:
      • The number of topics should be no more than 3.
      • The list of topics should contain at least 1 topic from the main user's topics.
      • The list of topics for each article should be randomized with at least 1 topic from the main user's topics.
    • Assign the generated topics to the selected 80% of the articles.
    • Ensure that the remaining 20% of articles are also assigned topics but without including any topics from the main user's topics.
    • Implement error handling to gracefully manage any unforeseen issues during the topic assignment process.

Acceptance Criteria:

  • The assignTopicsToArticles function is successfully implemented and located in the seeder/utils.ts file.
  • The function fetches the main user's topics based on the provided email.
  • All topics available in the application are retrieved from the database.
  • 80% of the articles are randomly selected for topic assignment, and each article is tagged with a list of topics.
  • The generated topics for articles include at least one topic from the main user's topics.
  • 20% of articles are also assigned topics, ensuring none of them contain topics from the main user's topics.
  • The function is designed to handle errors effectively.

Additional Information:

  • This function is crucial for enhancing the organization and searchability of articles within the application.
  • Successful implementation and testing of this function are key to addressing this issue.
@patil-gau
Copy link

can you assign me this

@prasenjeet-symon
Copy link
Owner Author

@patil-gau Assigned to you

@Believet2
Copy link

pls can you asign?

@Believet2
Copy link

I think this has to do with programming, which i don't know, im just a technical writer.

@prasenjeet-symon
Copy link
Owner Author

I think this has to do with programming, which i don't know, im just a technical writer.

Alright. I understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner-friendly EddieHub:good-first-issue enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed server related to server
Projects
None yet
Development

No branches or pull requests

3 participants