From c7d8ee5fe424a73933737ad156645ad55399bfe4 Mon Sep 17 00:00:00 2001 From: Mohamed Ashraf Date: Thu, 20 Feb 2025 11:21:42 +0200 Subject: [PATCH] feat: added base files --- .github/ISSUE_TEMPLATE/bug.yml | 75 +++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 75 +++++++++++++++ .github/ISSUE_TEMPLATE/feature.yml | 44 +++++++++ .github/PULL_REQUEST_TEMPLATE.md | 54 +++++++++++ .github/dependabot.yml | 12 +++ .github/workflows/precommit.yml | 62 ++++++++++++ .github/workflows/release-please.yml | 36 +++++++ .gitignore | 135 +++++++++++++++++++++++++++ .pre-commit-config.yaml | 52 +++++++++++ .release-please-manifest.json | 3 + LICENSE | 19 ++++ SECURITY.md | 29 ++++++ docs/index.md | 1 + mkdocs.yml | 27 ++++++ pyproject.toml | 69 ++++++++++++++ release-please-config.json | 15 +++ 16 files changed, 708 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/precommit.yml create mode 100644 .github/workflows/release-please.yml create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 .release-please-manifest.json create mode 100644 LICENSE create mode 100644 SECURITY.md create mode 100644 docs/index.md create mode 100644 mkdocs.yml create mode 100644 pyproject.toml create mode 100644 release-please-config.json diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..6f4fc48 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,75 @@ +name: Bug Report +description: Report a bug in the project +title: "[BUG] " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: input + id: description + attributes: + label: Description + description: A clear and concise description of what the bug is. + placeholder: "Describe the bug" + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: | + Steps to reproduce the behavior: + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + placeholder: "List the steps to reproduce the bug" + validations: + required: true + + - type: input + id: expected + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + placeholder: "Describe the expected behavior" + validations: + required: true + + - type: input + id: actual + attributes: + label: Actual Behavior + description: A clear and concise description of what actually happened. + placeholder: "Describe the actual behavior" + validations: + required: true + + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: If applicable, add screenshots to help explain your problem. + placeholder: "Add screenshots here" + + - type: input + id: environment + attributes: + label: Environment + description: | + - OS: e.g. Windows 10, macOS 11.2 + - Python Version: e.g. 3.8.5 + placeholder: "Describe your environment" + validations: + required: true + + - type: textarea + id: additional + attributes: + label: Additional Information + description: Add any other information about the problem here. + placeholder: "Add additional information here" diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..7e2d97e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,75 @@ +name: Configuration Issue +description: Report a configuration issue in the project +title: "[CONFIG] " +labels: ["configuration"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this configuration issue report! + + - type: input + id: description + attributes: + label: Description + description: A clear and concise description of what the configuration issue is. + placeholder: "Describe the configuration issue" + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: | + Steps to reproduce the behavior: + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + placeholder: "List the steps to reproduce the configuration issue" + validations: + required: true + + - type: input + id: expected + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + placeholder: "Describe the expected behavior" + validations: + required: true + + - type: input + id: actual + attributes: + label: Actual Behavior + description: A clear and concise description of what actually happened. + placeholder: "Describe the actual behavior" + validations: + required: true + + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: If applicable, add screenshots to help explain your problem. + placeholder: "Add screenshots here" + + - type: input + id: environment + attributes: + label: Environment + description: | + - OS: e.g. Windows 10, macOS 11.2 + - Python Version: e.g. 3.8.5 + placeholder: "Describe your environment" + validations: + required: true + + - type: textarea + id: additional + attributes: + label: Additional Information + description: Add any other information about the problem here. + placeholder: "Add additional information here" diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..956c0df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,44 @@ + +name: Feature Request +description: Suggest a new feature for the project +title: "[FEATURE] " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to suggest a feature! + + - type: input + id: description + attributes: + label: Description + description: A clear and concise description of what the feature is. + placeholder: "Describe the feature" + validations: + required: true + + - type: textarea + id: motivation + attributes: + label: Motivation + description: Explain why this feature should be added. + placeholder: "Explain the motivation behind this feature" + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives + description: Describe any alternative solutions or features you've considered. + placeholder: "Describe alternatives" + validations: + required: true + + - type: textarea + id: additional + attributes: + label: Additional Information + description: Add any other information about the feature request here. + placeholder: "Add additional information here" diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..166faf9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,54 @@ +## Pull Request Template + +### Description + + + + +Issue ID: #[issue_id] + +--- + +### Type of Change + + + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation update + +--- + +### How Has This Been Tested? + + + +--- + +### Checklist + +- [ ] The issue ID is linked to this pull request +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules + +### Additional Information + + + +--- + +**Please Note:** + +If there's a relevant issue for this pull request, please link it above. + +If no issue exists: + +- For a new feature, please create a feature request issue using [Bug Report](https://github.com/MultiAgentLab/agentic-multi-agents-ai/issues/new?assignees=&labels=bug&projects=&template=bug.yml&title=%5BBUG%5D+). +- For a bug, please create a bug report issue using [Feature Request](https://github.com/MultiAgentLab/agentic-multi-agents-ai/issues/new?assignees=&labels=enhancement&projects=&template=feature.yml&title=%5BFEATURE%5D+). diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f33a02c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml new file mode 100644 index 0000000..778f021 --- /dev/null +++ b/.github/workflows/precommit.yml @@ -0,0 +1,62 @@ +name: Pre-Commit Check + +on: + pull_request: + workflow_dispatch: + +permissions: + pull-requests: write + contents: read + +jobs: + uv-pre-commit: + name: Pre-Commit Check + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Cache Dependencies + uses: actions/cache@v3 + with: + path: | + ${{ runner.temp }}/setup-uv-cache + .venv + key: ${{ runner.os }}-uv-cache-${{ hashFiles('**/pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-uv-cache- + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.5.16" + cache-dir: ${{ runner.temp }}/setup-uv-cache + + - name: Install Development Dependencies + shell: bash + run: uv sync --only-dev + + - name: Run Pre-Commit + id: precommit + shell: bash + run: uvx pre-commit run --all-files + continue-on-error: true + + - name: Comment on PR if Pre-Commit Fails + if: steps.precommit.outcome == 'failure' + uses: marocchino/sticky-pull-request-comment@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + header: Pre-Commit Check + message: | + 🚨 **Pre-Commit Check Failed** + Please run the following command locally to fix the issues: + ```bash + uv run pre-commit run --all-files + ``` + + - name: PR Fails + if: steps.precommit.outcome == 'failure' + shell: bash + run: exit 1 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..b2cd7ea --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,36 @@ +name: Release Please + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + outputs: + remote-developer--tag_name: ${{ steps.release.outputs.remote-developer--tag_name }} + remote-developer--release_created: ${{ steps.release.outputs.remote-developer--release_created }} + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json + + release-remote-developer: + if: ${{ needs.release-please.outputs.remote-developer--release_created == 'true' }} + runs-on: ubuntu-latest + needs: release-please + steps: + - uses: actions/checkout@v4 + - run: zip -r remote-developer-build.zip remote-developer/build + - name: Upload Release Artifact + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload ${{ needs.release-please.outputs.remote-developer--tag_name }} remote-developer-build.zip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a4ea18 --- /dev/null +++ b/.gitignore @@ -0,0 +1,135 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec +a +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py +.ruff_cache/ +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# UV +uv.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +output/ + +.vscode/ +.venv/ +.env/ +examples/ +.python-version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..66a786c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,52 @@ +# .pre-commit-config.yaml +repos: + # Ruff pre-commit hooks for linting and formatting Python code + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.9.0 # Use the specified version of Ruff + hooks: + # Run Ruff to lint Python code and automatically fix issues + - id: ruff + args: ['--fix', '.'] + # '--fix': Automatically applies fixes to issues detected by Ruff + # Format Python files using Ruff's formatting rules + - id: ruff-format + + # Pre-commit hooks from the official pre-commit-hooks repository + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 # Use the specified version of pre-commit-hooks + hooks: + # Remove trailing whitespace from all files + - id: trailing-whitespace + + # Add a newline to the end of files if missing + - id: end-of-file-fixer + + # Check that toml files are valid and well-formed + - id: check-toml + + # Check that YAML files are valid and well-formed + - id: check-yaml + + # Check JSON files for proper formatting + - id: check-json + + # Automatically format JSON files for readability + - id: pretty-format-json + args: ['--autofix', '--indent', '2', '--no-ensure-ascii', '--no-sort-keys'] + + + # Prevent committing large files (default threshold: 5MB) + - id: check-added-large-files + + # Prevent committing directly to a protected branch (e.g., 'main') + - id: no-commit-to-branch + args: ["--branch", "main", "--branch", "^(?!((feature|bugfix|hotfix|release)/[a-z0-9._-]+)$).*"] # Specify the protected branch name + + # Conventional Commit message enforcement + - repo: https://github.com/compilerla/conventional-pre-commit + rev: v4.0.0 # Use the latest stable version + hooks: + - id: conventional-pre-commit + args: ['--strict'] + # 'stages': Ensures the hook runs during the commit message stage + # 'args': '--strict' enforces strict adherence to the Conventional Commits specification diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..4c3e688 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + "remote_developer": "0.1.0" +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..96f1555 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018 The Python Packaging Authority + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..b954549 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,29 @@ +# Security Policy + +Security is very important for this project and its community. 🔒 + +Learn more about it below. 👇 + +## Versions + +The latest version or release is supported. + +You are encouraged to write tests for your application and update your versions frequently after ensuring that your tests are passing. This way you will benefit from the latest features, bug fixes, and **security fixes**. + +## Reporting a Vulnerability + +If you believe you have identified a security vulnerability, even if you're uncertain, please report it immediately by emailing [mohamedashrafwx@gmail.com](mailto:mohamedashrafwx@gmail.com). Provide a detailed description, including all steps and example code needed to reproduce the issue. + +I (the author, [@mohamedwx](https://linkedin.com/mohamedashrafwx)) will review it thoroughly and get back to you. + +## Public Discussions + +Please restrain from publicly discussing a potential security vulnerability. 🙊 + +It's better to discuss privately and try to find a solution first, to limit the potential impact as much as possible. + +--- + +Thanks for your help! + +The community and I thank you for that. 🙇 diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..089c635 --- /dev/null +++ b/docs/index.md @@ -0,0 +1 @@ +# Remote Developer diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..92684fd --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,27 @@ +site_name: Remote Developer +site_author: MoWx +repo_url: https://github.com/mohamedashraf-eng/remote-developer +site_description: Framework for orchestrating collaborative AI agents. +edit_uri: https://github.com/mohamedashraf-eng/remote-developer/edit/main/docs/ + +theme: + name: material + language: en + palette: + - scheme: default + primary: deep orange + accent: deep orange + - scheme: slate + primary: deep orange + accent: deep orange + +nav: + - Home: index.md + +plugins: + - search + +extra: + social: + - icon: fontawesome/brands/github + link: https://github.com/mohamedashraf-eng/remote-developer diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..cc61ca2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,69 @@ +[project] +name = "agenticai" +version = "0.1.0" +description = "A multi-agent AI framework for developing and testing intelligent agents" +readme = "README.md" +requires-python = ">=3.11" +dependencies = [ +] + +[tool.uv] +dev-dependencies = [ + "mkdocs>=1.6.1", + "mkdocs-material[imaging]>=9.5.49", + "ruff>=0.9.0", + "pre-commit>=4.0.1", +] + +[tool.ruff] +line-length = 100 +indent-width = 4 +target-version = "py311" +exclude = [ + "tests/*", + "build/*", + "playground/*", +] + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +docstring-code-format = true + +[tool.ruff.lint] +extend-select = [ + "E", # Error codes + "F", # Unused imports, undefined variables + "B", # Bugbear rules for design and bug detection + "Q", # String quotes consistency + "S", # Security checks + "UP", # pyupgrade + "D" # pydocstyle +] +fixable = [ + "D100", # Missing docstring in public module + "D101", # Missing docstring in public class + "D102", # Missing docstring in public method + "D103", # Missing docstring in public function + "D104", # Missing docstring in public package + "D200", # One-line docstring should fit on one line + "D202", # No blank lines allowed after function docstring + "D410", # Missing blank line after section ("Args") + "D411", # Missing blank line before section ("Returns") + "D415", # First line should end with a period, question mark, or exclamation point + "F401", # Unused imports + "F541", # f-string without any placeholders + "UP006", # Use built-in `dict` and `list` instead of `Dict` and `List` + "UP007", # Use `X | Y` for type annotations + "UP015", # Remove unnecessary file open mode +] +ignore = [ + "D212", # Multi-line docstring issues + "E501", # Line too long + "D205", # Blank line required between summary line and description + "S101", # Use of `assert` detected, + "E402", # Module level import not at top of file +] + +[tool.ruff.lint.pydocstyle] +convention = "google" diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..f252af3 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,15 @@ +{ + "include-component-in-tag": true, + "include-v-in-tag": true, + "tag-separator": "/", + "separate-pull-requests": true, + "packages": { + "remote_developer": { + "component": "remote_developer", + "release-type": "python", + "changelog-path": "CHANGELOG.md", + "version-file": "README.md" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}