Skip to content

Commit 5a16eae

Browse files
committed
chore: added AGENTS.md
1 parent 6a54da9 commit 5a16eae

2 files changed

Lines changed: 28 additions & 11 deletions

File tree

.github/workflows/semantic.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# type: docs, feat, fix, refactor, style or test
55
# scope (optional): any extra info, (like DMS or whatever)
66

7-
name: 'Commit Message Check'
7+
name: "Commit Message Check"
88
on: pull_request
99

1010
jobs:
@@ -15,19 +15,19 @@ jobs:
1515
- name: Check Commit Format
1616
uses: gsactions/commit-message-checker@v2
1717
with:
18-
pattern: '^((docs|feat|fix|refactor|style|test|sweep)( ?\(.*\))?: .+|Revert ".+")$'
19-
excludeDescription: 'true' # optional: this excludes the description body of a pull request
20-
excludeTitle: 'true' # optional: this excludes the title of a pull request
21-
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
18+
pattern: '^((docs|feat|fix|chore|refactor|style|test|sweep)( ?\(.*\))?: .+|Revert ".+")$'
19+
excludeDescription: "true" # optional: this excludes the description body of a pull request
20+
excludeTitle: "true" # optional: this excludes the title of a pull request
21+
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
2222
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true
23-
flags: 'gim'
23+
flags: "gim"
2424
error: 'Your commit has to follow the format "<type>(<scope>): <subject>"".'
2525
- name: Check Commit Length
2626
uses: gsactions/commit-message-checker@v2
2727
with:
28-
pattern: '^.{20,150}$'
29-
error: 'Commit messages should be between 20 and 150 chars'
30-
excludeDescription: 'true' # optional: this excludes the description body of a pull request
31-
excludeTitle: 'true' # optional: this excludes the title of a pull request
32-
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
28+
pattern: "^.{20,150}$"
29+
error: "Commit messages should be between 20 and 150 chars"
30+
excludeDescription: "true" # optional: this excludes the description body of a pull request
31+
excludeTitle: "true" # optional: this excludes the title of a pull request
32+
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
3333
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true

AGENTS.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# DIRAC Agent Guidelines
2+
3+
## Build/Lint/Test Commands
4+
- **Build**: `pip install -e .`
5+
- **Lint**: `ruff check src/ && pylint src/`
6+
- **Test**: `pytest tests/`
7+
- **Single test**: `pytest src/DIRAC/path/to/test.py::test_function`
8+
9+
## Code Style Guidelines
10+
- **Formatting**: Use `black` with line length 120 (configured in pyproject.toml)
11+
- **Imports**: Absolute imports only; sort with `isort` (black profile)
12+
- **Naming**: CamelCase for classes, snake_case for functions/variables
13+
- **Types**: Use type hints; run `mypy` for strict checking
14+
- **Error handling**: Return `S_OK(result)` or `S_ERROR(message)` from DIRAC.Core.Utilities.ReturnValues
15+
- **Logging**: Use `gLogger.info/warn/error` (from DIRAC import gLogger)
16+
- **Docstrings**: Follow Google/NumPy style where present
17+
- **Security**: Never log secrets; validate inputs

0 commit comments

Comments
 (0)