diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..084b8a31 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,39 @@ +name: 🐛Bug Report +description: File a bug report here +title: "[BUG]: " +labels: ["bug"] +assignees: ["JayantGoel001"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report 🤗 + Make sure there aren't any open/closed issues for this topic 😃 + + - type: textarea + id: bug-description + attributes: + label: Description of the bug + description: Give us a brief description of what happened and what should have happened + validations: + required: true + + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: textarea + id: additional-information + attributes: + label: Additional Information + description: | + Provide any additional information such as logs, screenshots, likes, scenarios in which the bug occurs so that it facilitates resolving the issue. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..40dc70e3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,23 @@ +name: ✨Feature Request +description: Request a new feature or enhancement +labels: ["enhancement"] +title: "[FEAT]: " +body: + - type: markdown + attributes: + value: | + Please make sure this feature request hasn't been already submitted by someone by looking through other open/closed issues + + - type: textarea + id: description + attributes: + label: Description + description: Give us a brief description of the feature or enhancement you would like + validations: + required: true + + - type: textarea + id: additional-information + attributes: + label: Additional Information + description: Give us some additional information on the feature request like proposed solutions, links, screenshots, etc. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index ceaaa12d..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,17 +0,0 @@ - - - - -## Why are these changes needed? - - - -## Related issue number (if applicable) - - - -## Checks - -- [ ] I've run `format.sh` to lint the changes in this PR. -- [ ] I've included any doc changes needed. -- [ ] I've made sure the relevant tests are passing (if applicable). diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..af460a9c --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,27 @@ + + + +Closes # + +## 📑 Description + + + + +## ✅ Checks + +- [ ] My pull request adheres to the code style of this project +- [ ] My code requires changes to the documentation +- [ ] I have updated the documentation as required +- [ ] All the tests have passed +- [ ] Branch name follows `type/descript` (e.g. `feature/add-llm-agents`) +- [ ] Ready for code review + +## ℹ Additional Information + diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 00000000..34486ae5 --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,29 @@ +name: Mypy +on: [push] + +jobs: + Static-Type-Checking: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11.2 + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r requirements.txt + pip install -e .[dev] + - name: Type-checking package with mypy + run: | + # Manually install mypy in the standard way. + pip --quiet install -U mypy + # Log this mypy version for debuggability. + mypy --version + # Run this mypy instance against our main package. + mypy --install-types --non-interactive sotopia + mypy --strict . diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..4941c638 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,17 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11.2 + - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml deleted file mode 100644 index 8f122cae..00000000 --- a/.github/workflows/python-package.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.10"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -e '.[dev]' - - name: Run linter - run: | - pylint -d all -e E0602 ./fastchat/ - - name: Check formatting - run: | - black --check . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..83b47bec --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,27 @@ +name: Pytest +on: [push] + +jobs: + Pytest: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11.2 + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r requirements.txt + pip install -e .[dev] + - name: Test with pytest + env: # Or as an environment variable + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + REDIS_OM_URL: ${{ secrets.REDIS_OM_URL }} + TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} + run: | + pytest