From f0b55c46c5528f657eb9d7f3c2c03f4181d6ed66 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Sat, 8 Jun 2024 22:50:20 +0800 Subject: [PATCH] feat: init projects --- .github/workflows/auto-invite.yml | 30 ++++++++++++++++ .github/workflows/e2e-test.yml | 35 +++++++++++++++++++ .github/workflows/issue-robot.yml | 17 +++++++++ .github/workflows/link-pr.yml | 0 .github/workflows/project-progress.yml | 15 ++++++++ .github/workflows/stale.yml | 33 +++++++++++++++++ ai_commons/__init__.py | 1 + ai_commons/api_clients/__init__.py | 1 + ai_commons/api_clients/openai_client.py | 1 + ai_commons/api_clients/slack_client.py | 1 + ai_commons/api_clients/webhook_handler.py | 1 + ai_commons/async_tasks/__init__.py | 1 + ai_commons/async_tasks/celery_task_manager.py | 1 + ai_commons/async_tasks/task_scheduler.py | 1 + ai_commons/config/__init__.py | 1 + ai_commons/config/config_loader.py | 1 + ai_commons/config/environment_manager.py | 1 + ai_commons/data_export/__init__.py | 1 + ai_commons/data_export/data_exporter.py | 1 + ai_commons/data_export/report_generator.py | 1 + ai_commons/data_processing/__init__.py | 1 + ai_commons/data_processing/data_splitter.py | 1 + ai_commons/data_processing/tag_aggregator.py | 1 + ai_commons/data_processing/theme_generator.py | 1 + ai_commons/database/__init__.py | 1 + ai_commons/database/database_connector.py | 1 + ai_commons/database/orm_wrapper.py | 1 + ai_commons/database/query_executor.py | 1 + ai_commons/file_processing/__init__.py | 1 + ai_commons/file_processing/data_cleaner.py | 1 + ai_commons/file_processing/excel_parser.py | 1 + ai_commons/file_processing/json_validator.py | 1 + ai_commons/logging_monitoring/__init__.py | 1 + .../logging_monitoring/error_tracker.py | 1 + ai_commons/logging_monitoring/logger.py | 1 + .../logging_monitoring/metrics_collector.py | 1 + ai_commons/security/__init__.py | 1 + ai_commons/security/access_control.py | 1 + ai_commons/security/auth_manager.py | 1 + ai_commons/ui_tools/__init__.py | 1 + ai_commons/ui_tools/data_visualizer.py | 1 + ai_commons/ui_tools/file_uploader.py | 1 + ai_commons/ui_tools/form_validator.py | 1 + tests/__init__.py | 1 + tests/test_api_clients.py | 1 + tests/test_async_tasks.py | 1 + tests/test_config.py | 1 + tests/test_data_export.py | 1 + tests/test_data_processing.py | 1 + tests/test_database.py | 1 + tests/test_file_processing.py | 1 + tests/test_logging_monitoring.py | 1 + tests/test_security.py | 1 + tests/test_ui_tools.py | 1 + 54 files changed, 178 insertions(+) create mode 100644 .github/workflows/auto-invite.yml create mode 100644 .github/workflows/e2e-test.yml create mode 100644 .github/workflows/issue-robot.yml create mode 100644 .github/workflows/link-pr.yml create mode 100644 .github/workflows/project-progress.yml create mode 100644 .github/workflows/stale.yml create mode 100644 ai_commons/__init__.py create mode 100644 ai_commons/api_clients/__init__.py create mode 100644 ai_commons/api_clients/openai_client.py create mode 100644 ai_commons/api_clients/slack_client.py create mode 100644 ai_commons/api_clients/webhook_handler.py create mode 100644 ai_commons/async_tasks/__init__.py create mode 100644 ai_commons/async_tasks/celery_task_manager.py create mode 100644 ai_commons/async_tasks/task_scheduler.py create mode 100644 ai_commons/config/__init__.py create mode 100644 ai_commons/config/config_loader.py create mode 100644 ai_commons/config/environment_manager.py create mode 100644 ai_commons/data_export/__init__.py create mode 100644 ai_commons/data_export/data_exporter.py create mode 100644 ai_commons/data_export/report_generator.py create mode 100644 ai_commons/data_processing/__init__.py create mode 100644 ai_commons/data_processing/data_splitter.py create mode 100644 ai_commons/data_processing/tag_aggregator.py create mode 100644 ai_commons/data_processing/theme_generator.py create mode 100644 ai_commons/database/__init__.py create mode 100644 ai_commons/database/database_connector.py create mode 100644 ai_commons/database/orm_wrapper.py create mode 100644 ai_commons/database/query_executor.py create mode 100644 ai_commons/file_processing/__init__.py create mode 100644 ai_commons/file_processing/data_cleaner.py create mode 100644 ai_commons/file_processing/excel_parser.py create mode 100644 ai_commons/file_processing/json_validator.py create mode 100644 ai_commons/logging_monitoring/__init__.py create mode 100644 ai_commons/logging_monitoring/error_tracker.py create mode 100644 ai_commons/logging_monitoring/logger.py create mode 100644 ai_commons/logging_monitoring/metrics_collector.py create mode 100644 ai_commons/security/__init__.py create mode 100644 ai_commons/security/access_control.py create mode 100644 ai_commons/security/auth_manager.py create mode 100644 ai_commons/ui_tools/__init__.py create mode 100644 ai_commons/ui_tools/data_visualizer.py create mode 100644 ai_commons/ui_tools/file_uploader.py create mode 100644 ai_commons/ui_tools/form_validator.py create mode 100644 tests/__init__.py create mode 100644 tests/test_api_clients.py create mode 100644 tests/test_async_tasks.py create mode 100644 tests/test_config.py create mode 100644 tests/test_data_export.py create mode 100644 tests/test_data_processing.py create mode 100644 tests/test_database.py create mode 100644 tests/test_file_processing.py create mode 100644 tests/test_logging_monitoring.py create mode 100644 tests/test_security.py create mode 100644 tests/test_ui_tools.py diff --git a/.github/workflows/auto-invite.yml b/.github/workflows/auto-invite.yml new file mode 100644 index 0000000..d2cee91 --- /dev/null +++ b/.github/workflows/auto-invite.yml @@ -0,0 +1,30 @@ +name: Invite users to join our group +on: + issue_comment: + types: + - created +jobs: + issue_comment: + name: Invite users to join our group + if: ${{ github.event.comment.body == '/invite' || github.event.comment.body == '/close' || github.event.comment.body == '/comment' }} + runs-on: ubuntu-latest + permissions: + issues: write + steps: + + - name: Invite user to join our group + uses: peter-evans/create-or-update-comment@v1 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + body: | + hello ~ + + - name: Close Issue + uses: peter-evans/close-issue@v3 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + comment: 🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above + labels: | + triage/accepted \ No newline at end of file diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml new file mode 100644 index 0000000..ed961f8 --- /dev/null +++ b/.github/workflows/e2e-test.yml @@ -0,0 +1,35 @@ +name: e2e + +on: + workflow_dispatch: + pull_request: + push: + schedule: + # run e2e test every 4 hours + - cron: 0 */4 * * * + +jobs: + build: + name: Test + runs-on: ubuntu-latest + env: + GO111MODULE: on + steps: + + - name: Set up Go 1.21 + uses: actions/setup-go@v2 + with: + go-version: 1.21 + id: go + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Create e2e test + run: | + echo "...test e2e" \ No newline at end of file diff --git a/.github/workflows/issue-robot.yml b/.github/workflows/issue-robot.yml new file mode 100644 index 0000000..74927a0 --- /dev/null +++ b/.github/workflows/issue-robot.yml @@ -0,0 +1,17 @@ +name: 'issue translator' +on: + issue_comment: + types: [created] + issues: + types: [opened] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: usthe/issues-translate-action@v2.7 + with: + # it is not necessary to decide whether you need to modify the issue header content + IS_MODIFY_TITLE: true + BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + # Required, input your bot github token \ No newline at end of file diff --git a/.github/workflows/link-pr.yml b/.github/workflows/link-pr.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/project-progress.yml b/.github/workflows/project-progress.yml new file mode 100644 index 0000000..2902c72 --- /dev/null +++ b/.github/workflows/project-progress.yml @@ -0,0 +1,15 @@ +name: Move new issues into Triage + +on: + issues: + types: [opened] + +jobs: + automate-project-columns: + runs-on: ubuntu-latest + steps: + - uses: alex-page/github-project-automation-plus@v0.8.3 + with: + project: OpenKF + column: In Progress + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..37a9826 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,33 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '0 8 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.BOT_GITHUB_TOKEN }} + days-before-stale: 60 + days-before-close: 30 + stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + stale-pr-message: 'This issue is stale because it has been open 60 days with no activity.' + close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' + close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity. You can reopen it if you want.' + stale-pr-label: lifecycle/stale + stale-issue-label: lifecycle/stale + exempt-issue-labels: 'openim' + exempt-pr-labels: 'openim' + exempt-draft-pr: true diff --git a/ai_commons/__init__.py b/ai_commons/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/api_clients/__init__.py b/ai_commons/api_clients/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/api_clients/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/api_clients/openai_client.py b/ai_commons/api_clients/openai_client.py new file mode 100644 index 0000000..2dbb1f6 --- /dev/null +++ b/ai_commons/api_clients/openai_client.py @@ -0,0 +1 @@ +# OpenAI client module diff --git a/ai_commons/api_clients/slack_client.py b/ai_commons/api_clients/slack_client.py new file mode 100644 index 0000000..c8cd554 --- /dev/null +++ b/ai_commons/api_clients/slack_client.py @@ -0,0 +1 @@ +# Slack client module diff --git a/ai_commons/api_clients/webhook_handler.py b/ai_commons/api_clients/webhook_handler.py new file mode 100644 index 0000000..5da9dc3 --- /dev/null +++ b/ai_commons/api_clients/webhook_handler.py @@ -0,0 +1 @@ +# Webhook handler module diff --git a/ai_commons/async_tasks/__init__.py b/ai_commons/async_tasks/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/async_tasks/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/async_tasks/celery_task_manager.py b/ai_commons/async_tasks/celery_task_manager.py new file mode 100644 index 0000000..be6ab97 --- /dev/null +++ b/ai_commons/async_tasks/celery_task_manager.py @@ -0,0 +1 @@ +# Celery task manager module diff --git a/ai_commons/async_tasks/task_scheduler.py b/ai_commons/async_tasks/task_scheduler.py new file mode 100644 index 0000000..792dabe --- /dev/null +++ b/ai_commons/async_tasks/task_scheduler.py @@ -0,0 +1 @@ +# Task scheduler module diff --git a/ai_commons/config/__init__.py b/ai_commons/config/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/config/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/config/config_loader.py b/ai_commons/config/config_loader.py new file mode 100644 index 0000000..cae46bd --- /dev/null +++ b/ai_commons/config/config_loader.py @@ -0,0 +1 @@ +# Config loader module diff --git a/ai_commons/config/environment_manager.py b/ai_commons/config/environment_manager.py new file mode 100644 index 0000000..6c1ec8e --- /dev/null +++ b/ai_commons/config/environment_manager.py @@ -0,0 +1 @@ +# Environment manager module diff --git a/ai_commons/data_export/__init__.py b/ai_commons/data_export/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/data_export/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/data_export/data_exporter.py b/ai_commons/data_export/data_exporter.py new file mode 100644 index 0000000..c001576 --- /dev/null +++ b/ai_commons/data_export/data_exporter.py @@ -0,0 +1 @@ +# Data exporter module diff --git a/ai_commons/data_export/report_generator.py b/ai_commons/data_export/report_generator.py new file mode 100644 index 0000000..aad8a01 --- /dev/null +++ b/ai_commons/data_export/report_generator.py @@ -0,0 +1 @@ +# Report generator module diff --git a/ai_commons/data_processing/__init__.py b/ai_commons/data_processing/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/data_processing/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/data_processing/data_splitter.py b/ai_commons/data_processing/data_splitter.py new file mode 100644 index 0000000..64654ef --- /dev/null +++ b/ai_commons/data_processing/data_splitter.py @@ -0,0 +1 @@ +# Data splitter module diff --git a/ai_commons/data_processing/tag_aggregator.py b/ai_commons/data_processing/tag_aggregator.py new file mode 100644 index 0000000..f83d8b5 --- /dev/null +++ b/ai_commons/data_processing/tag_aggregator.py @@ -0,0 +1 @@ +# Tag aggregator module diff --git a/ai_commons/data_processing/theme_generator.py b/ai_commons/data_processing/theme_generator.py new file mode 100644 index 0000000..a31da9d --- /dev/null +++ b/ai_commons/data_processing/theme_generator.py @@ -0,0 +1 @@ +# Theme generator module diff --git a/ai_commons/database/__init__.py b/ai_commons/database/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/database/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/database/database_connector.py b/ai_commons/database/database_connector.py new file mode 100644 index 0000000..7915b1f --- /dev/null +++ b/ai_commons/database/database_connector.py @@ -0,0 +1 @@ +# Database connector module diff --git a/ai_commons/database/orm_wrapper.py b/ai_commons/database/orm_wrapper.py new file mode 100644 index 0000000..fe4248a --- /dev/null +++ b/ai_commons/database/orm_wrapper.py @@ -0,0 +1 @@ +# ORM wrapper module diff --git a/ai_commons/database/query_executor.py b/ai_commons/database/query_executor.py new file mode 100644 index 0000000..6a6849f --- /dev/null +++ b/ai_commons/database/query_executor.py @@ -0,0 +1 @@ +# Query executor module diff --git a/ai_commons/file_processing/__init__.py b/ai_commons/file_processing/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/file_processing/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/file_processing/data_cleaner.py b/ai_commons/file_processing/data_cleaner.py new file mode 100644 index 0000000..68db6b4 --- /dev/null +++ b/ai_commons/file_processing/data_cleaner.py @@ -0,0 +1 @@ +# Data cleaner module diff --git a/ai_commons/file_processing/excel_parser.py b/ai_commons/file_processing/excel_parser.py new file mode 100644 index 0000000..b64d266 --- /dev/null +++ b/ai_commons/file_processing/excel_parser.py @@ -0,0 +1 @@ +# Excel parser module diff --git a/ai_commons/file_processing/json_validator.py b/ai_commons/file_processing/json_validator.py new file mode 100644 index 0000000..13b0a84 --- /dev/null +++ b/ai_commons/file_processing/json_validator.py @@ -0,0 +1 @@ +# JSON validator module diff --git a/ai_commons/logging_monitoring/__init__.py b/ai_commons/logging_monitoring/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/logging_monitoring/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/logging_monitoring/error_tracker.py b/ai_commons/logging_monitoring/error_tracker.py new file mode 100644 index 0000000..01a4869 --- /dev/null +++ b/ai_commons/logging_monitoring/error_tracker.py @@ -0,0 +1 @@ +# Error tracker module diff --git a/ai_commons/logging_monitoring/logger.py b/ai_commons/logging_monitoring/logger.py new file mode 100644 index 0000000..3ac4483 --- /dev/null +++ b/ai_commons/logging_monitoring/logger.py @@ -0,0 +1 @@ +# Logger module diff --git a/ai_commons/logging_monitoring/metrics_collector.py b/ai_commons/logging_monitoring/metrics_collector.py new file mode 100644 index 0000000..17aab05 --- /dev/null +++ b/ai_commons/logging_monitoring/metrics_collector.py @@ -0,0 +1 @@ +# Metrics collector module diff --git a/ai_commons/security/__init__.py b/ai_commons/security/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/security/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/security/access_control.py b/ai_commons/security/access_control.py new file mode 100644 index 0000000..e870561 --- /dev/null +++ b/ai_commons/security/access_control.py @@ -0,0 +1 @@ +# Access control module diff --git a/ai_commons/security/auth_manager.py b/ai_commons/security/auth_manager.py new file mode 100644 index 0000000..c4987f4 --- /dev/null +++ b/ai_commons/security/auth_manager.py @@ -0,0 +1 @@ +# Auth manager module diff --git a/ai_commons/ui_tools/__init__.py b/ai_commons/ui_tools/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ai_commons/ui_tools/__init__.py @@ -0,0 +1 @@ + diff --git a/ai_commons/ui_tools/data_visualizer.py b/ai_commons/ui_tools/data_visualizer.py new file mode 100644 index 0000000..2d3c5df --- /dev/null +++ b/ai_commons/ui_tools/data_visualizer.py @@ -0,0 +1 @@ +# Data visualizer module diff --git a/ai_commons/ui_tools/file_uploader.py b/ai_commons/ui_tools/file_uploader.py new file mode 100644 index 0000000..d162b5e --- /dev/null +++ b/ai_commons/ui_tools/file_uploader.py @@ -0,0 +1 @@ +# File uploader module diff --git a/ai_commons/ui_tools/form_validator.py b/ai_commons/ui_tools/form_validator.py new file mode 100644 index 0000000..4fbbfbf --- /dev/null +++ b/ai_commons/ui_tools/form_validator.py @@ -0,0 +1 @@ +# Form validator module diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ + diff --git a/tests/test_api_clients.py b/tests/test_api_clients.py new file mode 100644 index 0000000..7e3e647 --- /dev/null +++ b/tests/test_api_clients.py @@ -0,0 +1 @@ +# Test API clients diff --git a/tests/test_async_tasks.py b/tests/test_async_tasks.py new file mode 100644 index 0000000..4507d09 --- /dev/null +++ b/tests/test_async_tasks.py @@ -0,0 +1 @@ +# Test async tasks diff --git a/tests/test_config.py b/tests/test_config.py new file mode 100644 index 0000000..f4bd2fa --- /dev/null +++ b/tests/test_config.py @@ -0,0 +1 @@ +# Test config diff --git a/tests/test_data_export.py b/tests/test_data_export.py new file mode 100644 index 0000000..fe602f4 --- /dev/null +++ b/tests/test_data_export.py @@ -0,0 +1 @@ +# Test data export diff --git a/tests/test_data_processing.py b/tests/test_data_processing.py new file mode 100644 index 0000000..4cf98ea --- /dev/null +++ b/tests/test_data_processing.py @@ -0,0 +1 @@ +# Test data processing diff --git a/tests/test_database.py b/tests/test_database.py new file mode 100644 index 0000000..bd61c86 --- /dev/null +++ b/tests/test_database.py @@ -0,0 +1 @@ +# Test database diff --git a/tests/test_file_processing.py b/tests/test_file_processing.py new file mode 100644 index 0000000..442b199 --- /dev/null +++ b/tests/test_file_processing.py @@ -0,0 +1 @@ +# Test file processing diff --git a/tests/test_logging_monitoring.py b/tests/test_logging_monitoring.py new file mode 100644 index 0000000..01f407b --- /dev/null +++ b/tests/test_logging_monitoring.py @@ -0,0 +1 @@ +# Test logging and monitoring diff --git a/tests/test_security.py b/tests/test_security.py new file mode 100644 index 0000000..66d1e71 --- /dev/null +++ b/tests/test_security.py @@ -0,0 +1 @@ +# Test security diff --git a/tests/test_ui_tools.py b/tests/test_ui_tools.py new file mode 100644 index 0000000..03e7933 --- /dev/null +++ b/tests/test_ui_tools.py @@ -0,0 +1 @@ +# Test UI tools