Skip to content

Commit

Permalink
Ignore .github workflow folder (#40)
Browse files Browse the repository at this point in the history
* move file

* add requirements.txt

* add setup and test dir

* add pre-commit-config

* fix install dependencies issues

* fix install dependencies issues

* fix nonexisting pytest

* fix mypy.yml

* fix mypy.yml

---------

Co-authored-by: Ruiyi Wang <ruiyi.pamela.wang@gmail.com>
  • Loading branch information
lwaekfjlk and ruiyiw authored Oct 11, 2023
1 parent 9c25d20 commit 875bbf1
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ jobs:
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 .
1 change: 0 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11.2
- uses: pre-commit/action@v3.0.0
8 changes: 0 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,3 @@ jobs:
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
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.1 # Use the sha / tag you want to point at
hooks:
- id: prettier
types_or: [html]
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: [--line-length=79]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", --line-length=72]
- repo: https://github.com/kynan/nbstripout
rev: 0.6.0
hooks:
- id: nbstripout
18 changes: 18 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pandas
openai
langchain
tiktoken
rich
pandas-stubs
types-tqdm
peft
transformers
logzero
fastapi
uvicorn
gin-config
absl-py
datasets
names
together
pydantic==1.10.12
31 changes: 31 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[metadata]
name = sotopia

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"

[options.extras_require]
dev =
pre-commit==3.0.1
pytest==7.1.2
mypy==1.2.0
beartype==0.14.0
nbmake
types-setuptools
pytest-asyncio

[options]
python_requires = >=3.7, <4
packages =
sotopia
lmlib
sotopia_conf

[mypy]
mypy_path = stubs
strict = true
plugins = pydantic.mypy

[mypy-transformers.*]
ignore_missing_imports = True
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from setuptools import setup

if __name__ == "__main__":
setup()
Empty file added tests/dummyfile
Empty file.

0 comments on commit 875bbf1

Please sign in to comment.