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

Sweep: Create GitHub issues for all the the tasks in https://github.com/FDA-AI/FDAi/blob/develop/docs/treaty/strategy.md #159

Merged
merged 2 commits into from
Mar 23, 2024

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Mar 23, 2024

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement

Description

This pull request introduces a new feature that automates the creation of GitHub issues for tasks listed in the docs/treaty/strategy.md document of the FDA-AI/FDAi repository. It includes updates to the documentation to guide contributors on how to use this new automation script and the script itself, create_issues_from_strategy_doc.py, which parses tasks from the strategy document and creates corresponding issues in the GitHub repository.

Summary

  • Added detailed instructions in docs/contributing/task-management/create-a-task.md on how to automate task creation using the new Python script.
  • Introduced a new Python script scripts/jobs/create_issues_from_strategy_doc.py that:
    • Reads and parses tasks from docs/treaty/strategy.md.
    • Uses the GitHub API to create issues for each task found in the document.
    • Handles rate limiting and authentication errors gracefully.
  • Prerequisites for running the script include:
    • Python installation.
    • requests Python package.
    • A GitHub API token with the necessary permissions.

Fixes #158.


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

This is an automated message generated by Sweep AI.

Copy link
Contributor Author

sweep-ai bot commented Mar 23, 2024

Rollback Files For Sweep

  • Rollback changes to docs/contributing/task-management/create-a-task.md
  • Rollback changes to scripts/jobs/create_issues_from_strategy_doc.py

This is an automated message generated by Sweep AI.

Copy link
Contributor Author

sweep-ai bot commented Mar 23, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

This is an automated message generated by Sweep AI.

Copy link
Contributor Author

sweep-ai bot commented Mar 23, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

The recent addition of the `create_issues_from_strategy_doc.py` script introduces new business logic to automate the creation of GitHub issues from tasks listed in a markdown document. According to our development guidelines, all new business logic must be accompanied by corresponding unit tests to ensure reliability and maintainability of the code.

Action Required:

  • Please add unit tests for the create_issues_from_strategy_doc.py script. The tests should cover the following functions:
    • read_strategy_md(file_path)
    • parse_tasks(markdown_content)
    • create_github_issue(title, body, token, repo)

Suggestions for Writing Tests:

  • Mock external calls, such as the GitHub API requests, to ensure tests do not depend on external services.
  • Use test cases that cover various scenarios, including normal operation, expected exceptions, and edge cases.

Files to Look At:

  • scripts/jobs/create_issues_from_strategy_doc.py

Adding these tests will help us maintain the quality and reliability of our automation scripts. If you need any assistance or have questions about implementing these tests, please feel free to reach out to the engineering team.

Thank you for your attention to this matter and your contribution to improving our project's codebase.

This issue was created to address the following rule:
All new business logic should have corresponding unit tests.

[!CAUTION]

An error has occurred: Failed to fetch files (tracking ID: b76c03ffeb)

Copy link
Contributor Author

sweep-ai bot commented Mar 23, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

The recent addition of the `create_issues_from_strategy_doc.py` script introduces new business logic to automate the creation of GitHub issues from tasks listed in a markdown document. According to our development guidelines, all new business logic must have corresponding unit tests to ensure reliability and maintainability of the code.

Action Required:

  • Please add unit tests for the create_issues_from_strategy_doc.py script. The tests should cover various scenarios including but not limited to:
    • Reading and parsing the markdown document.
    • Handling of different markdown formats.
    • Successful creation of GitHub issues.
    • Handling of GitHub API rate limiting.
    • Authentication failures with GitHub API.
  • Ensure that the tests are comprehensive and cover edge cases to prevent future bugs and regressions.

Files to Look At:

  • scripts/jobs/create_issues_from_strategy_doc.py

Adding these tests will help in maintaining the quality and robustness of the automation script. If you need any assistance or have questions regarding the testing strategy, feel free to reach out to the engineering team.

Thank you for your attention to this matter and for contributing to the quality of our project.

This issue was created to address the following rule:
All new business logic should have corresponding unit tests.

[!CAUTION]

An error has occurred: 'NoneType' object is not subscriptable (tracking ID: fa981d867e)

@mikepsinn mikepsinn merged commit 21f292e into main Mar 23, 2024
@mikepsinn mikepsinn deleted the sweep/create_github_issues_for_all_the_the_tas branch March 23, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant