Jeremiah Lowin commited on
Commit
29763a9
·
unverified ·
2 Parent(s): e8f0947895a911

Merge pull request #2 from jlowin/add-tests

Browse files
.github/ai-labeler.yml ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ context-files:
2
+ - README.md
.github/workflows/ai-labeler.yml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: AI Labeler
2
+
3
+ on:
4
+ issues:
5
+ types: [opened, reopened]
6
+ issue_comment:
7
+ types: [created]
8
+ pull_request:
9
+ types: [opened, reopened]
10
+
11
+ jobs:
12
+ ai-labeler:
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: read
16
+ issues: write
17
+ pull-requests: write
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: jlowin/ai-labeler@v0.5.0
21
+ with:
22
+ openai-api-key: ${{ secrets.OPENAI_API_KEY }}
23
+ controlflow-llm-model: openai/gpt-4o-mini
.github/workflows/run-tests.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Run tests
2
+
3
+ env:
4
+ # enable colored output
5
+ PY_COLORS: 1
6
+
7
+ on:
8
+ push:
9
+ branches: ["main"]
10
+ pull_request:
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ run_tests:
18
+ name: Run tests
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v4
26
+
27
+ - name: Set up Python
28
+ run: uv python install 3.11
29
+
30
+ - name: Install FastMCP
31
+ run: uv sync --all-extras --dev
32
+
33
+ - name: Run tests
34
+ run: uv run pytest -vv
35
+ if: ${{ !(github.event.pull_request.head.repo.fork) }}
pyproject.toml CHANGED
@@ -29,6 +29,7 @@ dev = [
29
  "copychat>=0.5.2",
30
  "ipython>=8.12.3",
31
  "pdbpp>=0.10.3",
 
32
  "pytest>=8.3.3",
33
  "pytest-asyncio>=0.23.5",
34
  ]
 
29
  "copychat>=0.5.2",
30
  "ipython>=8.12.3",
31
  "pdbpp>=0.10.3",
32
+ "pytest-xdist>=3.6.1",
33
  "pytest>=8.3.3",
34
  "pytest-asyncio>=0.23.5",
35
  ]
uv.lock CHANGED
@@ -198,6 +198,15 @@ wheels = [
198
  { url = "https://files.pythonhosted.org/packages/02/cc/b7e31358aac6ed1ef2bb790a9746ac2c69bcb3c8588b41616914eb106eaf/exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b", size = 16453 },
199
  ]
200
 
 
 
 
 
 
 
 
 
 
201
  [[package]]
202
  name = "executing"
203
  version = "2.1.0"
@@ -222,7 +231,7 @@ wheels = [
222
 
223
  [[package]]
224
  name = "fastmcp"
225
- version = "0.1.1.dev3+gbffea91.d20241130"
226
  source = { editable = "." }
227
  dependencies = [
228
  { name = "httpx" },
@@ -239,6 +248,7 @@ dev = [
239
  { name = "pdbpp" },
240
  { name = "pytest" },
241
  { name = "pytest-asyncio" },
 
242
  ]
243
 
244
  [package.metadata]
@@ -257,6 +267,7 @@ dev = [
257
  { name = "pdbpp", specifier = ">=0.10.3" },
258
  { name = "pytest", specifier = ">=8.3.3" },
259
  { name = "pytest-asyncio", specifier = ">=0.23.5" },
 
260
  ]
261
 
262
  [[package]]
@@ -691,6 +702,19 @@ wheels = [
691
  { url = "https://files.pythonhosted.org/packages/96/31/6607dab48616902f76885dfcf62c08d929796fc3b2d2318faf9fd54dbed9/pytest_asyncio-0.24.0-py3-none-any.whl", hash = "sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b", size = 18024 },
692
  ]
693
 
 
 
 
 
 
 
 
 
 
 
 
 
 
694
  [[package]]
695
  name = "python-dotenv"
696
  version = "1.0.1"
 
198
  { url = "https://files.pythonhosted.org/packages/02/cc/b7e31358aac6ed1ef2bb790a9746ac2c69bcb3c8588b41616914eb106eaf/exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b", size = 16453 },
199
  ]
200
 
201
+ [[package]]
202
+ name = "execnet"
203
+ version = "2.1.1"
204
+ source = { registry = "https://pypi.org/simple" }
205
+ sdist = { url = "https://files.pythonhosted.org/packages/bb/ff/b4c0dc78fbe20c3e59c0c7334de0c27eb4001a2b2017999af398bf730817/execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3", size = 166524 }
206
+ wheels = [
207
+ { url = "https://files.pythonhosted.org/packages/43/09/2aea36ff60d16dd8879bdb2f5b3ee0ba8d08cbbdcdfe870e695ce3784385/execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc", size = 40612 },
208
+ ]
209
+
210
  [[package]]
211
  name = "executing"
212
  version = "2.1.0"
 
231
 
232
  [[package]]
233
  name = "fastmcp"
234
+ version = "0.2.1.dev8+gfc560b3.d20241130"
235
  source = { editable = "." }
236
  dependencies = [
237
  { name = "httpx" },
 
248
  { name = "pdbpp" },
249
  { name = "pytest" },
250
  { name = "pytest-asyncio" },
251
+ { name = "pytest-xdist" },
252
  ]
253
 
254
  [package.metadata]
 
267
  { name = "pdbpp", specifier = ">=0.10.3" },
268
  { name = "pytest", specifier = ">=8.3.3" },
269
  { name = "pytest-asyncio", specifier = ">=0.23.5" },
270
+ { name = "pytest-xdist", specifier = ">=3.6.1" },
271
  ]
272
 
273
  [[package]]
 
702
  { url = "https://files.pythonhosted.org/packages/96/31/6607dab48616902f76885dfcf62c08d929796fc3b2d2318faf9fd54dbed9/pytest_asyncio-0.24.0-py3-none-any.whl", hash = "sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b", size = 18024 },
703
  ]
704
 
705
+ [[package]]
706
+ name = "pytest-xdist"
707
+ version = "3.6.1"
708
+ source = { registry = "https://pypi.org/simple" }
709
+ dependencies = [
710
+ { name = "execnet" },
711
+ { name = "pytest" },
712
+ ]
713
+ sdist = { url = "https://files.pythonhosted.org/packages/41/c4/3c310a19bc1f1e9ef50075582652673ef2bfc8cd62afef9585683821902f/pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d", size = 84060 }
714
+ wheels = [
715
+ { url = "https://files.pythonhosted.org/packages/6d/82/1d96bf03ee4c0fdc3c0cbe61470070e659ca78dc0086fb88b66c185e2449/pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7", size = 46108 },
716
+ ]
717
+
718
  [[package]]
719
  name = "python-dotenv"
720
  version = "1.0.1"