langsmith-cli 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- langsmith_cli-0.1.3/.env.example +2 -0
- langsmith_cli-0.1.3/.github/workflows/ci.yml +317 -0
- langsmith_cli-0.1.3/.github/workflows/dependency-review.yml +39 -0
- langsmith_cli-0.1.3/.github/workflows/publish.yml +117 -0
- langsmith_cli-0.1.3/.gitignore +219 -0
- langsmith_cli-0.1.3/.pre-commit-config.yaml +15 -0
- langsmith_cli-0.1.3/.python-version +1 -0
- langsmith_cli-0.1.3/AGENTS.md +80 -0
- langsmith_cli-0.1.3/CLAUDE.md +447 -0
- langsmith_cli-0.1.3/LICENSE +21 -0
- langsmith_cli-0.1.3/MCP_PARITY.md +155 -0
- langsmith_cli-0.1.3/PKG-INFO +492 -0
- langsmith_cli-0.1.3/README.md +444 -0
- langsmith_cli-0.1.3/claude-plugin.json +9 -0
- langsmith_cli-0.1.3/docs/CI_BEST_PRACTICES.md +570 -0
- langsmith_cli-0.1.3/docs/CODECOV_SETUP.md +253 -0
- langsmith_cli-0.1.3/docs/COMMANDS_DESIGN.md +338 -0
- langsmith_cli-0.1.3/docs/PRD.md +284 -0
- langsmith_cli-0.1.3/docs/PUBLISHING.md +253 -0
- langsmith_cli-0.1.3/docs/PYPI_SETUP_SUMMARY.md +136 -0
- langsmith_cli-0.1.3/docs/QOL_FEATURES.md +514 -0
- langsmith_cli-0.1.3/docs/QOL_IMPROVEMENTS.md +299 -0
- langsmith_cli-0.1.3/docs/SESSION_DIRECTIVES.md +24 -0
- langsmith_cli-0.1.3/docs/TLDR.md +72 -0
- langsmith_cli-0.1.3/main.py +6 -0
- langsmith_cli-0.1.3/pyproject.toml +59 -0
- langsmith_cli-0.1.3/skills/langsmith/SKILL.md +61 -0
- langsmith_cli-0.1.3/skills/langsmith/bridge.py +17 -0
- langsmith_cli-0.1.3/skills/langsmith/docs/examples.md +791 -0
- langsmith_cli-0.1.3/skills/langsmith/docs/reference.md +185 -0
- langsmith_cli-0.1.3/skills/langsmith/references/datasets.md +113 -0
- langsmith_cli-0.1.3/skills/langsmith/references/examples.md +106 -0
- langsmith_cli-0.1.3/skills/langsmith/references/fql.md +67 -0
- langsmith_cli-0.1.3/skills/langsmith/references/projects.md +59 -0
- langsmith_cli-0.1.3/skills/langsmith/references/prompts.md +130 -0
- langsmith_cli-0.1.3/skills/langsmith/references/runs.md +197 -0
- langsmith_cli-0.1.3/skills/langsmith/references/troubleshooting.md +102 -0
- langsmith_cli-0.1.3/src/langsmith_cli/__init__.py +0 -0
- langsmith_cli-0.1.3/src/langsmith_cli/commands/auth.py +29 -0
- langsmith_cli-0.1.3/src/langsmith_cli/commands/datasets.py +170 -0
- langsmith_cli-0.1.3/src/langsmith_cli/commands/examples.py +170 -0
- langsmith_cli-0.1.3/src/langsmith_cli/commands/projects.py +162 -0
- langsmith_cli-0.1.3/src/langsmith_cli/commands/prompts.py +125 -0
- langsmith_cli-0.1.3/src/langsmith_cli/commands/runs.py +545 -0
- langsmith_cli-0.1.3/src/langsmith_cli/main.py +45 -0
- langsmith_cli-0.1.3/src/langsmith_cli/utils.py +237 -0
- langsmith_cli-0.1.3/tests/conftest.py +8 -0
- langsmith_cli-0.1.3/tests/test_auth.py +55 -0
- langsmith_cli-0.1.3/tests/test_e2e.py +150 -0
- langsmith_cli-0.1.3/tests/test_main.py +24 -0
- langsmith_cli-0.1.3/tests/test_projects.py +293 -0
- langsmith_cli-0.1.3/tests/test_runs.py +741 -0
- langsmith_cli-0.1.3/tests/test_utils.py +507 -0
- langsmith_cli-0.1.3/uv.lock +845 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
# Cancel in-progress runs when a new workflow on the same PR is triggered
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
pull-requests: write # For PR comments
|
|
18
|
+
|
|
19
|
+
env:
|
|
20
|
+
FORCE_COLOR: "1" # Force colored output in CI logs
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
# Linting and formatting checks
|
|
24
|
+
lint:
|
|
25
|
+
name: Lint & Format
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Install uv
|
|
31
|
+
uses: astral-sh/setup-uv@v4
|
|
32
|
+
with:
|
|
33
|
+
enable-cache: true
|
|
34
|
+
cache-dependency-glob: "pyproject.toml"
|
|
35
|
+
|
|
36
|
+
- name: Set up Python
|
|
37
|
+
uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.12"
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: uv sync --frozen
|
|
43
|
+
|
|
44
|
+
- name: Run Ruff linter
|
|
45
|
+
run: uv run ruff check . --output-format=github
|
|
46
|
+
|
|
47
|
+
- name: Check Ruff formatting
|
|
48
|
+
run: uv run ruff format --check .
|
|
49
|
+
|
|
50
|
+
- name: Run Pyright type checker
|
|
51
|
+
run: uv run pyright
|
|
52
|
+
|
|
53
|
+
# Unit and integration tests with coverage
|
|
54
|
+
test:
|
|
55
|
+
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
56
|
+
runs-on: ${{ matrix.os }}
|
|
57
|
+
strategy:
|
|
58
|
+
fail-fast: false
|
|
59
|
+
matrix:
|
|
60
|
+
os: [ubuntu-latest]
|
|
61
|
+
python-version: ["3.12", "3.13"]
|
|
62
|
+
include:
|
|
63
|
+
# Test on macOS and Windows with latest Python only
|
|
64
|
+
- os: macos-latest
|
|
65
|
+
python-version: "3.13"
|
|
66
|
+
- os: windows-latest
|
|
67
|
+
python-version: "3.13"
|
|
68
|
+
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
|
|
72
|
+
- name: Install uv
|
|
73
|
+
uses: astral-sh/setup-uv@v4
|
|
74
|
+
with:
|
|
75
|
+
enable-cache: true
|
|
76
|
+
cache-dependency-glob: "pyproject.toml"
|
|
77
|
+
|
|
78
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
79
|
+
uses: actions/setup-python@v5
|
|
80
|
+
with:
|
|
81
|
+
python-version: ${{ matrix.python-version }}
|
|
82
|
+
|
|
83
|
+
- name: Install dependencies
|
|
84
|
+
run: uv sync --frozen
|
|
85
|
+
|
|
86
|
+
- name: Run tests with coverage
|
|
87
|
+
run: |
|
|
88
|
+
uv run pytest \
|
|
89
|
+
--cov=src \
|
|
90
|
+
--cov-report=term-missing \
|
|
91
|
+
--cov-report=xml \
|
|
92
|
+
--cov-report=html \
|
|
93
|
+
--cov-report=json \
|
|
94
|
+
--junit-xml=pytest-report.xml \
|
|
95
|
+
-v
|
|
96
|
+
|
|
97
|
+
- name: Upload coverage to Codecov
|
|
98
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
99
|
+
uses: codecov/codecov-action@v4
|
|
100
|
+
with:
|
|
101
|
+
file: ./coverage.xml
|
|
102
|
+
flags: unittests
|
|
103
|
+
name: codecov-umbrella
|
|
104
|
+
fail_ci_if_error: false
|
|
105
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
106
|
+
|
|
107
|
+
- name: Upload coverage HTML report
|
|
108
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
109
|
+
uses: actions/upload-artifact@v4
|
|
110
|
+
with:
|
|
111
|
+
name: coverage-report-html
|
|
112
|
+
path: htmlcov/
|
|
113
|
+
retention-days: 30
|
|
114
|
+
|
|
115
|
+
- name: Upload coverage JSON
|
|
116
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
117
|
+
uses: actions/upload-artifact@v4
|
|
118
|
+
with:
|
|
119
|
+
name: coverage-report-json
|
|
120
|
+
path: coverage.json
|
|
121
|
+
retention-days: 30
|
|
122
|
+
|
|
123
|
+
- name: Upload pytest results
|
|
124
|
+
if: always()
|
|
125
|
+
uses: actions/upload-artifact@v4
|
|
126
|
+
with:
|
|
127
|
+
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
|
|
128
|
+
path: pytest-report.xml
|
|
129
|
+
retention-days: 30
|
|
130
|
+
|
|
131
|
+
- name: Check coverage threshold
|
|
132
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
133
|
+
run: |
|
|
134
|
+
COVERAGE=$(uv run coverage report --precision=2 | grep TOTAL | awk '{print $NF}' | sed 's/%//')
|
|
135
|
+
echo "Current coverage: $COVERAGE%"
|
|
136
|
+
|
|
137
|
+
THRESHOLD=79.0
|
|
138
|
+
if (( $(echo "$COVERAGE < $THRESHOLD" | bc -l) )); then
|
|
139
|
+
echo "❌ Coverage $COVERAGE% is below threshold $THRESHOLD%"
|
|
140
|
+
exit 1
|
|
141
|
+
else
|
|
142
|
+
echo "✅ Coverage $COVERAGE% meets threshold $THRESHOLD%"
|
|
143
|
+
fi
|
|
144
|
+
|
|
145
|
+
# Coverage report as PR comment
|
|
146
|
+
coverage-comment:
|
|
147
|
+
name: Post Coverage Comment
|
|
148
|
+
runs-on: ubuntu-latest
|
|
149
|
+
needs: test
|
|
150
|
+
if: github.event_name == 'pull_request'
|
|
151
|
+
steps:
|
|
152
|
+
- uses: actions/checkout@v4
|
|
153
|
+
|
|
154
|
+
- name: Download coverage JSON
|
|
155
|
+
uses: actions/download-artifact@v4
|
|
156
|
+
with:
|
|
157
|
+
name: coverage-report-json
|
|
158
|
+
|
|
159
|
+
- name: Install uv
|
|
160
|
+
uses: astral-sh/setup-uv@v4
|
|
161
|
+
with:
|
|
162
|
+
enable-cache: true
|
|
163
|
+
|
|
164
|
+
- name: Set up Python
|
|
165
|
+
uses: actions/setup-python@v5
|
|
166
|
+
with:
|
|
167
|
+
python-version: "3.12"
|
|
168
|
+
|
|
169
|
+
- name: Install dependencies
|
|
170
|
+
run: uv sync --frozen
|
|
171
|
+
|
|
172
|
+
- name: Generate coverage report
|
|
173
|
+
run: |
|
|
174
|
+
uv run coverage report --precision=2 > coverage-report.txt
|
|
175
|
+
cat coverage-report.txt
|
|
176
|
+
|
|
177
|
+
- name: Comment PR with coverage
|
|
178
|
+
uses: actions/github-script@v7
|
|
179
|
+
with:
|
|
180
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
181
|
+
script: |
|
|
182
|
+
const fs = require('fs');
|
|
183
|
+
const coverage = fs.readFileSync('coverage-report.txt', 'utf8');
|
|
184
|
+
const coverageJson = JSON.parse(fs.readFileSync('coverage.json', 'utf8'));
|
|
185
|
+
const totalCoverage = coverageJson.totals.percent_covered.toFixed(2);
|
|
186
|
+
|
|
187
|
+
const body = `## 📊 Coverage Report
|
|
188
|
+
|
|
189
|
+
**Total Coverage: ${totalCoverage}%**
|
|
190
|
+
|
|
191
|
+
<details>
|
|
192
|
+
<summary>📋 Detailed Coverage Report</summary>
|
|
193
|
+
|
|
194
|
+
\`\`\`
|
|
195
|
+
${coverage}
|
|
196
|
+
\`\`\`
|
|
197
|
+
|
|
198
|
+
</details>
|
|
199
|
+
|
|
200
|
+
${totalCoverage < 79 ? '⚠️ Coverage is below the 79% threshold!' : '✅ Coverage meets the threshold!'}
|
|
201
|
+
`;
|
|
202
|
+
|
|
203
|
+
// Find existing comment
|
|
204
|
+
const { data: comments } = await github.rest.issues.listComments({
|
|
205
|
+
owner: context.repo.owner,
|
|
206
|
+
repo: context.repo.repo,
|
|
207
|
+
issue_number: context.issue.number,
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const botComment = comments.find(comment =>
|
|
211
|
+
comment.user.type === 'Bot' &&
|
|
212
|
+
comment.body.includes('Coverage Report')
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
// Update or create comment
|
|
216
|
+
if (botComment) {
|
|
217
|
+
await github.rest.issues.updateComment({
|
|
218
|
+
owner: context.repo.owner,
|
|
219
|
+
repo: context.repo.repo,
|
|
220
|
+
comment_id: botComment.id,
|
|
221
|
+
body: body
|
|
222
|
+
});
|
|
223
|
+
} else {
|
|
224
|
+
await github.rest.issues.createComment({
|
|
225
|
+
owner: context.repo.owner,
|
|
226
|
+
repo: context.repo.repo,
|
|
227
|
+
issue_number: context.issue.number,
|
|
228
|
+
body: body
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
# E2E tests (run separately, require API key)
|
|
233
|
+
e2e:
|
|
234
|
+
name: E2E Tests
|
|
235
|
+
runs-on: ubuntu-latest
|
|
236
|
+
# Only run E2E tests on main branch or when explicitly triggered
|
|
237
|
+
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
|
|
238
|
+
steps:
|
|
239
|
+
- uses: actions/checkout@v4
|
|
240
|
+
|
|
241
|
+
- name: Install uv
|
|
242
|
+
uses: astral-sh/setup-uv@v4
|
|
243
|
+
with:
|
|
244
|
+
enable-cache: true
|
|
245
|
+
cache-dependency-glob: "pyproject.toml"
|
|
246
|
+
|
|
247
|
+
- name: Set up Python
|
|
248
|
+
uses: actions/setup-python@v5
|
|
249
|
+
with:
|
|
250
|
+
python-version: "3.12"
|
|
251
|
+
|
|
252
|
+
- name: Install dependencies
|
|
253
|
+
run: uv sync --frozen
|
|
254
|
+
|
|
255
|
+
- name: Run E2E tests
|
|
256
|
+
env:
|
|
257
|
+
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
|
|
258
|
+
run: uv run pytest tests/test_e2e.py -v
|
|
259
|
+
continue-on-error: true # Don't fail CI if E2E tests fail
|
|
260
|
+
|
|
261
|
+
- name: Upload E2E test results
|
|
262
|
+
if: always()
|
|
263
|
+
uses: actions/upload-artifact@v4
|
|
264
|
+
with:
|
|
265
|
+
name: e2e-test-results
|
|
266
|
+
path: pytest-report.xml
|
|
267
|
+
retention-days: 7
|
|
268
|
+
|
|
269
|
+
# Build package verification
|
|
270
|
+
build:
|
|
271
|
+
name: Build Package
|
|
272
|
+
runs-on: ubuntu-latest
|
|
273
|
+
steps:
|
|
274
|
+
- uses: actions/checkout@v4
|
|
275
|
+
|
|
276
|
+
- name: Install uv
|
|
277
|
+
uses: astral-sh/setup-uv@v4
|
|
278
|
+
with:
|
|
279
|
+
enable-cache: true
|
|
280
|
+
|
|
281
|
+
- name: Set up Python
|
|
282
|
+
uses: actions/setup-python@v5
|
|
283
|
+
with:
|
|
284
|
+
python-version: "3.12"
|
|
285
|
+
|
|
286
|
+
- name: Build package
|
|
287
|
+
run: uv build
|
|
288
|
+
|
|
289
|
+
- name: Check distribution
|
|
290
|
+
run: |
|
|
291
|
+
uv pip install --system twine
|
|
292
|
+
twine check dist/*
|
|
293
|
+
|
|
294
|
+
- name: Upload build artifacts
|
|
295
|
+
uses: actions/upload-artifact@v4
|
|
296
|
+
with:
|
|
297
|
+
name: dist
|
|
298
|
+
path: dist/
|
|
299
|
+
retention-days: 30
|
|
300
|
+
|
|
301
|
+
# Final status check (all jobs must pass)
|
|
302
|
+
all-checks:
|
|
303
|
+
name: All Checks Passed
|
|
304
|
+
runs-on: ubuntu-latest
|
|
305
|
+
needs: [lint, test, build]
|
|
306
|
+
if: always()
|
|
307
|
+
steps:
|
|
308
|
+
- name: Check all jobs
|
|
309
|
+
run: |
|
|
310
|
+
if [ "${{ needs.lint.result }}" != "success" ] || \
|
|
311
|
+
[ "${{ needs.test.result }}" != "success" ] || \
|
|
312
|
+
[ "${{ needs.build.result }}" != "success" ]; then
|
|
313
|
+
echo "❌ Some checks failed"
|
|
314
|
+
exit 1
|
|
315
|
+
else
|
|
316
|
+
echo "✅ All checks passed"
|
|
317
|
+
fi
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Dependency Review Action
|
|
2
|
+
#
|
|
3
|
+
# This Action will scan dependency manifest files that change as part of a Pull Request,
|
|
4
|
+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
|
|
5
|
+
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
|
|
6
|
+
# packages will be blocked from merging.
|
|
7
|
+
#
|
|
8
|
+
# Source repository: https://github.com/actions/dependency-review-action
|
|
9
|
+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
|
10
|
+
name: 'Dependency review'
|
|
11
|
+
on:
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: [ "main" ]
|
|
14
|
+
|
|
15
|
+
# If using a dependency submission action in this workflow this permission will need to be set to:
|
|
16
|
+
#
|
|
17
|
+
# permissions:
|
|
18
|
+
# contents: write
|
|
19
|
+
#
|
|
20
|
+
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
|
|
24
|
+
pull-requests: write
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
dependency-review:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- name: 'Checkout repository'
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
- name: 'Dependency Review'
|
|
33
|
+
uses: actions/dependency-review-action@v4
|
|
34
|
+
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
|
|
35
|
+
with:
|
|
36
|
+
comment-summary-in-pr: always
|
|
37
|
+
# fail-on-severity: moderate
|
|
38
|
+
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
|
|
39
|
+
# retry-on-snapshot-warnings: true
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*' # Trigger on version tags like v0.1.0, v1.0.0, etc.
|
|
7
|
+
workflow_dispatch: # Allow manual triggering
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Run Tests
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v4
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: uv sync
|
|
31
|
+
|
|
32
|
+
- name: Run linting
|
|
33
|
+
run: |
|
|
34
|
+
uv run ruff check .
|
|
35
|
+
uv run ruff format --check .
|
|
36
|
+
|
|
37
|
+
- name: Run type checking
|
|
38
|
+
run: uv run pyright
|
|
39
|
+
|
|
40
|
+
- name: Run tests
|
|
41
|
+
run: uv run pytest
|
|
42
|
+
|
|
43
|
+
build:
|
|
44
|
+
name: Build Distribution
|
|
45
|
+
needs: test
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
|
|
50
|
+
- name: Install uv
|
|
51
|
+
uses: astral-sh/setup-uv@v4
|
|
52
|
+
|
|
53
|
+
- name: Set up Python
|
|
54
|
+
uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.12"
|
|
57
|
+
|
|
58
|
+
- name: Build package
|
|
59
|
+
run: uv build
|
|
60
|
+
|
|
61
|
+
- name: Store the distribution packages
|
|
62
|
+
uses: actions/upload-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: python-package-distributions
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
publish-to-pypi:
|
|
68
|
+
name: Publish to PyPI
|
|
69
|
+
needs: build
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
environment:
|
|
72
|
+
name: pypi
|
|
73
|
+
url: https://pypi.org/p/langsmith-cli
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
76
|
+
|
|
77
|
+
steps:
|
|
78
|
+
- name: Download all the dists
|
|
79
|
+
uses: actions/download-artifact@v4
|
|
80
|
+
with:
|
|
81
|
+
name: python-package-distributions
|
|
82
|
+
path: dist/
|
|
83
|
+
|
|
84
|
+
- name: Publish distribution to PyPI
|
|
85
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
86
|
+
|
|
87
|
+
github-release:
|
|
88
|
+
name: Create GitHub Release
|
|
89
|
+
needs: publish-to-pypi
|
|
90
|
+
runs-on: ubuntu-latest
|
|
91
|
+
permissions:
|
|
92
|
+
contents: write # IMPORTANT: mandatory for creating releases
|
|
93
|
+
id-token: write
|
|
94
|
+
|
|
95
|
+
steps:
|
|
96
|
+
- name: Download all the dists
|
|
97
|
+
uses: actions/download-artifact@v4
|
|
98
|
+
with:
|
|
99
|
+
name: python-package-distributions
|
|
100
|
+
path: dist/
|
|
101
|
+
|
|
102
|
+
- name: Create GitHub Release
|
|
103
|
+
env:
|
|
104
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
105
|
+
run: >-
|
|
106
|
+
gh release create
|
|
107
|
+
'${{ github.ref_name }}'
|
|
108
|
+
--repo '${{ github.repository }}'
|
|
109
|
+
--notes "Release ${{ github.ref_name }}"
|
|
110
|
+
|
|
111
|
+
- name: Upload artifact signatures to GitHub Release
|
|
112
|
+
env:
|
|
113
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
114
|
+
run: >-
|
|
115
|
+
gh release upload
|
|
116
|
+
'${{ github.ref_name }}' dist/**
|
|
117
|
+
--repo '${{ github.repository }}'
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
######
|
|
2
|
+
# Project specific ignores
|
|
3
|
+
######
|
|
4
|
+
mcp.json
|
|
5
|
+
.mcp.json
|
|
6
|
+
.vscode/mcp.json
|
|
7
|
+
.claude/
|
|
8
|
+
|
|
9
|
+
######
|
|
10
|
+
# Standard python ignores
|
|
11
|
+
######
|
|
12
|
+
|
|
13
|
+
# Byte-compiled / optimized / DLL files
|
|
14
|
+
__pycache__/
|
|
15
|
+
*.py[codz]
|
|
16
|
+
*$py.class
|
|
17
|
+
|
|
18
|
+
# C extensions
|
|
19
|
+
*.so
|
|
20
|
+
|
|
21
|
+
# Distribution / packaging
|
|
22
|
+
.Python
|
|
23
|
+
build/
|
|
24
|
+
develop-eggs/
|
|
25
|
+
dist/
|
|
26
|
+
downloads/
|
|
27
|
+
eggs/
|
|
28
|
+
.eggs/
|
|
29
|
+
lib/
|
|
30
|
+
lib64/
|
|
31
|
+
parts/
|
|
32
|
+
sdist/
|
|
33
|
+
var/
|
|
34
|
+
wheels/
|
|
35
|
+
share/python-wheels/
|
|
36
|
+
*.egg-info/
|
|
37
|
+
.installed.cfg
|
|
38
|
+
*.egg
|
|
39
|
+
MANIFEST
|
|
40
|
+
|
|
41
|
+
# PyInstaller
|
|
42
|
+
# Usually these files are written by a python script from a template
|
|
43
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
44
|
+
*.manifest
|
|
45
|
+
*.spec
|
|
46
|
+
|
|
47
|
+
# Installer logs
|
|
48
|
+
pip-log.txt
|
|
49
|
+
pip-delete-this-directory.txt
|
|
50
|
+
|
|
51
|
+
# Unit test / coverage reports
|
|
52
|
+
htmlcov/
|
|
53
|
+
.tox/
|
|
54
|
+
.nox/
|
|
55
|
+
.coverage
|
|
56
|
+
.coverage.*
|
|
57
|
+
.cache
|
|
58
|
+
nosetests.xml
|
|
59
|
+
coverage.xml
|
|
60
|
+
*.cover
|
|
61
|
+
*.py.cover
|
|
62
|
+
.hypothesis/
|
|
63
|
+
.pytest_cache/
|
|
64
|
+
cover/
|
|
65
|
+
|
|
66
|
+
# Translations
|
|
67
|
+
*.mo
|
|
68
|
+
*.pot
|
|
69
|
+
|
|
70
|
+
# Django stuff:
|
|
71
|
+
*.log
|
|
72
|
+
local_settings.py
|
|
73
|
+
db.sqlite3
|
|
74
|
+
db.sqlite3-journal
|
|
75
|
+
|
|
76
|
+
# Flask stuff:
|
|
77
|
+
instance/
|
|
78
|
+
.webassets-cache
|
|
79
|
+
|
|
80
|
+
# Scrapy stuff:
|
|
81
|
+
.scrapy
|
|
82
|
+
|
|
83
|
+
# Sphinx documentation
|
|
84
|
+
docs/_build/
|
|
85
|
+
|
|
86
|
+
# PyBuilder
|
|
87
|
+
.pybuilder/
|
|
88
|
+
target/
|
|
89
|
+
|
|
90
|
+
# Jupyter Notebook
|
|
91
|
+
.ipynb_checkpoints
|
|
92
|
+
|
|
93
|
+
# IPython
|
|
94
|
+
profile_default/
|
|
95
|
+
ipython_config.py
|
|
96
|
+
|
|
97
|
+
# pyenv
|
|
98
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
99
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
100
|
+
# .python-version
|
|
101
|
+
|
|
102
|
+
# pipenv
|
|
103
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
104
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
105
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
106
|
+
# install all needed dependencies.
|
|
107
|
+
#Pipfile.lock
|
|
108
|
+
|
|
109
|
+
# UV
|
|
110
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
111
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
112
|
+
# commonly ignored for libraries.
|
|
113
|
+
#uv.lock
|
|
114
|
+
|
|
115
|
+
# poetry
|
|
116
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
117
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
118
|
+
# commonly ignored for libraries.
|
|
119
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
120
|
+
#poetry.lock
|
|
121
|
+
#poetry.toml
|
|
122
|
+
|
|
123
|
+
# pdm
|
|
124
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
125
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
126
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
127
|
+
#pdm.lock
|
|
128
|
+
#pdm.toml
|
|
129
|
+
.pdm-python
|
|
130
|
+
.pdm-build/
|
|
131
|
+
|
|
132
|
+
# pixi
|
|
133
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
134
|
+
#pixi.lock
|
|
135
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
136
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
137
|
+
.pixi
|
|
138
|
+
|
|
139
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
140
|
+
__pypackages__/
|
|
141
|
+
|
|
142
|
+
# Celery stuff
|
|
143
|
+
celerybeat-schedule
|
|
144
|
+
celerybeat.pid
|
|
145
|
+
|
|
146
|
+
# SageMath parsed files
|
|
147
|
+
*.sage.py
|
|
148
|
+
|
|
149
|
+
# Environments
|
|
150
|
+
.env
|
|
151
|
+
.envrc
|
|
152
|
+
.venv
|
|
153
|
+
env/
|
|
154
|
+
venv/
|
|
155
|
+
ENV/
|
|
156
|
+
env.bak/
|
|
157
|
+
venv.bak/
|
|
158
|
+
|
|
159
|
+
# Spyder project settings
|
|
160
|
+
.spyderproject
|
|
161
|
+
.spyproject
|
|
162
|
+
|
|
163
|
+
# Rope project settings
|
|
164
|
+
.ropeproject
|
|
165
|
+
|
|
166
|
+
# mkdocs documentation
|
|
167
|
+
/site
|
|
168
|
+
|
|
169
|
+
# mypy
|
|
170
|
+
.mypy_cache/
|
|
171
|
+
.dmypy.json
|
|
172
|
+
dmypy.json
|
|
173
|
+
|
|
174
|
+
# Pyre type checker
|
|
175
|
+
.pyre/
|
|
176
|
+
|
|
177
|
+
# pytype static type analyzer
|
|
178
|
+
.pytype/
|
|
179
|
+
|
|
180
|
+
# Cython debug symbols
|
|
181
|
+
cython_debug/
|
|
182
|
+
|
|
183
|
+
# PyCharm
|
|
184
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
185
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
186
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
187
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
188
|
+
#.idea/
|
|
189
|
+
|
|
190
|
+
# Abstra
|
|
191
|
+
# Abstra is an AI-powered process automation framework.
|
|
192
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
193
|
+
# Learn more at https://abstra.io/docs
|
|
194
|
+
.abstra/
|
|
195
|
+
|
|
196
|
+
# Visual Studio Code
|
|
197
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
198
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
199
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
200
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
201
|
+
# .vscode/
|
|
202
|
+
|
|
203
|
+
# Ruff stuff:
|
|
204
|
+
.ruff_cache/
|
|
205
|
+
|
|
206
|
+
# PyPI configuration file
|
|
207
|
+
.pypirc
|
|
208
|
+
|
|
209
|
+
# Cursor
|
|
210
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
211
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
212
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
213
|
+
.cursorignore
|
|
214
|
+
.cursorindexingignore
|
|
215
|
+
|
|
216
|
+
# Marimo
|
|
217
|
+
marimo/_static/
|
|
218
|
+
marimo/_lsp/
|
|
219
|
+
__marimo__/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
|
|
10
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
11
|
+
rev: v0.9.1
|
|
12
|
+
hooks:
|
|
13
|
+
- id: ruff
|
|
14
|
+
args: [ --fix ]
|
|
15
|
+
- id: ruff-format
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|