-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
116 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Run Tests | ||
|
||
env: | ||
# enable colored output | ||
# https://github.com/pytest-dev/pytest/issues/7443 | ||
PY_COLORS: 1 | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/run-tests.yml | ||
- src/** | ||
- tests/** | ||
- pyproject.toml | ||
- setup.py | ||
|
||
pull_request: | ||
paths: | ||
- .github/workflows/run-tests.yml | ||
- src** | ||
- tests/** | ||
- pyproject.toml | ||
- setup.py | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
run_tests: | ||
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
# run no_llm tests across all python versions and oses | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
include: | ||
# Run LLM tests on 3.9 | ||
- python-version: '3.9' | ||
os: 'ubuntu-latest' | ||
|
||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
CONTROLFLOW_OPENAI_API_KEY: ${{ secrets.CONTROLFLOW_OPENAI_API_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
- name: Install ControlFlow | ||
run: pip install ".[tests]" | ||
|
||
- name: Run tests | ||
run: pytest -n auto -vv | ||
if: ${{ !(github.event.pull_request.head.repo.fork) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Run static analysis | ||
|
||
env: | ||
# enable colored output | ||
# https://github.com/pytest-dev/pytest/issues/7443 | ||
PY_COLORS: 1 | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
static_analysis: | ||
timeout-minutes: 1 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,9 @@ authors = [ | |
{ name = "Jeremiah Lowin", email = "[email protected]" } | ||
] | ||
dependencies = [ | ||
"marvin>=2.3.1", | ||
"marvin @ git+https://github.com/prefecthq/marvin@main", | ||
"prefect @ git+https://github.com/prefecthq/prefect@main", | ||
# can remove when prefect fully migrates to pydantic 2 | ||
"pydantic>=2", | ||
] | ||
readme = "README.md" | ||
|
@@ -17,19 +18,30 @@ keywords = ["ai", "chatbot", "llm", "NLP", "natural language processing", "prefe | |
[project.urls] | ||
Code = "https://github.com/jlowin/ControlFlow" | ||
|
||
[project.optional-dependencies] | ||
tests = [ | ||
"pytest-asyncio>=0.18.2,!=0.22.0,<0.23.0", | ||
"pytest-env>=0.8,<2.0", | ||
"pytest-rerunfailures>=10,<14", | ||
"pytest-sugar>=0.9,<2.0", | ||
"pytest>=8.1.1", | ||
"pytest-timeout", | ||
"pytest-xdist", | ||
"pre-commit>=3.7.0", | ||
] | ||
dev = [ | ||
"control_flow[tests]", | ||
"ipython>=8.22.2", | ||
"pdbpp>=0.10.3", | ||
"ruff>=0.3.4", | ||
] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.rye] | ||
managed = true | ||
dev-dependencies = [ | ||
"ipython>=8.22.2", | ||
"pdbpp>=0.10.3", | ||
"pre-commit>=3.7.0", | ||
"ruff>=0.3.4", | ||
"pytest>=8.1.1", | ||
] | ||
managed = true | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|