Skip to content

Commit 2cfcec1

Browse files
authored
Merge branch 'main' into docs/reorganize-readme-installation
2 parents d107d08 + d583d37 commit 2cfcec1

File tree

6 files changed

+155
-47
lines changed

6 files changed

+155
-47
lines changed

.github/dependabot.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
version: 2
3+
updates:
4+
# Python dependencies (uv/pip)
5+
- package-ecosystem: pip
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
day: monday
10+
time: "09:00"
11+
timezone: Europe/London
12+
open-pull-requests-limit: 10
13+
commit-message:
14+
prefix: "chore(deps)"
15+
labels:
16+
- dependencies
17+
- python
18+
groups:
19+
dev-dependencies:
20+
patterns:
21+
- "pytest*"
22+
- "ruff"
23+
- "ty"
24+
- "pre-commit"
25+
update-types:
26+
- minor
27+
- patch
28+
ai-frameworks:
29+
patterns:
30+
- "openai*"
31+
- "langchain*"
32+
- "crewai*"
33+
- "mcp*"
34+
update-types:
35+
- minor
36+
- patch
37+
38+
# GitHub Actions
39+
- package-ecosystem: github-actions
40+
directory: /
41+
schedule:
42+
interval: weekly
43+
day: monday
44+
time: "09:00"
45+
timezone: Europe/London
46+
open-pull-requests-limit: 5
47+
commit-message:
48+
prefix: "chore(deps)"
49+
labels:
50+
- dependencies
51+
- github-actions
52+
groups:
53+
actions:
54+
patterns:
55+
- "*"
56+
update-types:
57+
- minor
58+
- patch

.github/workflows/ci.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,6 @@ jobs:
3030
- name: Run Gitleaks
3131
run: nix develop --command just gitleaks
3232

33-
typos:
34-
runs-on: ubuntu-latest
35-
steps:
36-
- name: Checkout repository
37-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
38-
39-
- name: Setup Nix
40-
uses: ./.github/actions/setup-nix
41-
42-
- name: Run Typo Check
43-
run: nix develop --command just typos
44-
4533
ci:
4634
runs-on: ubuntu-latest
4735
strategy:
@@ -96,7 +84,7 @@ jobs:
9684
run: nix develop --command just coverage
9785

9886
- name: Create Coverage Badge
99-
uses: jaywcjlove/coverage-badges-cli@bd6ccbf422c0ed54c01f283019fd2bc648f58541 # v2.2.0
87+
uses: jaywcjlove/coverage-badges-cli@4e8975aa2628e3329126e7eee36724d07ed86fda # v2.2.0
10088
with:
10189
source: coverage/coverage.json
10290
output: coverage/badges.svg
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "Scheduled: Nix flake update"
2+
3+
on:
4+
schedule:
5+
# Run every Monday at 09:00 UTC (aligns with Dependabot's 09:00 Europe/London schedule in winter; 10:00 Europe/London in summer)
6+
- cron: "0 9 * * 1"
7+
workflow_dispatch: # Allow manual trigger
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
update-flake:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
19+
20+
- name: Setup Nix
21+
uses: ./.github/actions/setup-nix
22+
23+
- name: Update flake.lock
24+
run: nix flake update
25+
26+
- name: Check if flake.lock changed
27+
id: check-changes
28+
run: |
29+
if git diff --quiet flake.lock; then
30+
echo "changed=false" >> $GITHUB_OUTPUT
31+
else
32+
echo "changed=true" >> $GITHUB_OUTPUT
33+
fi
34+
35+
- name: Create Pull Request
36+
id: create-pr
37+
if: steps.check-changes.outputs.changed == 'true'
38+
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
39+
with:
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
commit-message: "chore(deps): update nix flake inputs"
42+
title: "chore(deps): update nix flake inputs"
43+
body: |
44+
## Summary
45+
- Automated update of Nix flake inputs
46+
47+
## Test plan
48+
- [ ] `nix flake check` passes in CI
49+
- [ ] Development shell works correctly
50+
51+
---
52+
🤖 This PR was automatically created by the scheduled Nix flake update workflow.
53+
branch: chore/nix-flake-update
54+
labels: |
55+
dependencies
56+
nix
57+
delete-branch: true
58+
59+
- name: Enable auto-merge
60+
if: steps.create-pr.outputs.pull-request-number
61+
run: gh pr merge --auto --squash "${{ steps.create-pr.outputs.pull-request-url }}"
62+
env:
63+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,26 @@
4242
nixfmt.package = pkgs.nixfmt-rfc-style;
4343
ruff-check.enable = true;
4444
ruff-format.enable = true;
45-
prettier = {
46-
enable = true;
47-
includes = [
48-
"*.md"
49-
"*.yml"
50-
"*.yaml"
51-
"*.json"
52-
];
53-
excludes = [
54-
"CHANGELOG.md"
55-
];
56-
};
5745
typos.enable = true;
46+
typos.configFile = "typos.toml";
47+
};
48+
settings.formatter.oxfmt = {
49+
command = "${pkgs.oxfmt}/bin/oxfmt";
50+
includes = [
51+
"*.md"
52+
"*.yml"
53+
"*.yaml"
54+
"*.json"
55+
"*.ts"
56+
"*.tsx"
57+
"*.js"
58+
"*.jsx"
59+
"*.html"
60+
"*.css"
61+
];
62+
excludes = [
63+
"CHANGELOG.md"
64+
];
5865
};
5966
};
6067

justfile

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
install *extras:
33
uv sync {{ extras }}
44

5-
# Run ruff linting
5+
# Run linting and format check (ruff, typos, nixfmt, oxfmt)
66
lint:
7-
uv run ruff check .
7+
nix fmt -- --fail-on-change
88

9-
# Auto-fix linting issues
10-
lint-fix:
11-
uv run ruff check --fix .
9+
# Format and auto-fix linting issues
10+
format:
11+
nix fmt
1212

1313
# Run all tests
1414
test:
@@ -30,18 +30,10 @@ test-examples:
3030
ty:
3131
uv run ty check stackone_ai
3232

33-
# Run typos spell checker
34-
typos:
35-
typos --config typos.toml .
36-
3733
# Run gitleaks secret detection
3834
gitleaks:
3935
gitleaks detect --source . --config .gitleaks.toml
4036

41-
# Fix typos
42-
typos-fix:
43-
typos --config typos.toml --write-changes .
44-
4537
# Update version in __init__.py
4638
update-version:
4739
uv run scripts/update_version.py

0 commit comments

Comments
 (0)