Skip to content

Commit 8bf8735

Browse files
authored
Merge branch 'main' into guideline/prevent-os-cmd-injection
2 parents bcac33d + 15063af commit 8bf8735

94 files changed

Lines changed: 33543 additions & 28108 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/auto-pr-tests/README.md renamed to .github/guideline-from-issue-tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## How to Add and Document Tests in `auto-pr-tests`
1+
## How to Add and Document Tests in `guideline-from-issue-tests`
22

3-
The test script `scripts/auto-pr-helper.py` transforms an issue from JSON format into our `.rst` format.
3+
The test script `scripts/guideline-from-issue.py` transforms an issue from JSON format into our `.rst` format.
44

55
This directory contains test issue files in JSON format along with their expected output snapshots. These tests are executed by the script `test_runner.py`.
66

@@ -14,7 +14,7 @@ This directory contains test issue files in JSON format along with their expecte
1414
Run the following command to generate the corresponding `.snapshot` file automatically:
1515

1616
```bash
17-
cat .github/auto-pr-tests/test_issue_XX.json | uv run scripts/auto-pr-helper.py > .github/auto-pr-tests/test_issue_XX.snapshot
17+
cat .github/guideline-from-issue-tests/test_issue_XX.json | uv run python scripts/guideline-from-issue.py > .github/guideline-from-issue-tests/test_issue_XX.snapshot
1818
```
1919
It is better to run this command and manually verify the output, rather than creating the snapshot manually.
2020
3. **Add Test to the Test List**
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

.github/auto-pr-tests/test_runner.py renamed to .github/guideline-from-issue-tests/test_runner.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def compare(issue_json_path: Path, snapshot_path: Path) -> bool:
3030
input_json = issue_json_path.read_text()
3131

3232
result = subprocess.run(
33-
["uv", "run", "python", "scripts/auto-pr-helper.py"],
33+
["uv", "run", "python", "scripts/guideline-from-issue.py"],
3434
input=input_json.encode(),
3535
stdout=subprocess.PIPE,
3636
stderr=subprocess.DEVNULL,
@@ -61,23 +61,23 @@ def compare(issue_json_path: Path, snapshot_path: Path) -> bool:
6161

6262
# to generate snapshot:
6363
# create or change the test_issue_xx file and then use this command after replacing XX with your test number:
64-
## `cat .github/auto-pr-tests/test_issue_XX.json | uv run python scripts/auto-pr-helper.py 2&>/dev/null > .github/auto-pr-tests/test_issue_0XX.snapshot`
64+
## `cat .github/guideline-from-issue-tests/test_issue_XX.json | uv run python scripts/guideline-from-issue.py 2&>/dev/null > .github/guideline-from-issue-tests/test_issue_0XX.snapshot`
6565
tests = {
6666
"test_01": (
67-
Path(".github/auto-pr-tests/test_issue_01.json"),
68-
Path(".github/auto-pr-tests/test_issue_01.snapshot"),
67+
Path(".github/guideline-from-issue-tests/test_issue_01.json"),
68+
Path(".github/guideline-from-issue-tests/test_issue_01.snapshot"),
6969
),
7070
"test_02": (
71-
Path(".github/auto-pr-tests/test_issue_02.json"),
72-
Path(".github/auto-pr-tests/test_issue_02.snapshot"),
71+
Path(".github/guideline-from-issue-tests/test_issue_02.json"),
72+
Path(".github/guideline-from-issue-tests/test_issue_02.snapshot"),
7373
),
7474
"test_03": (
75-
Path(".github/auto-pr-tests/test_issue_03.json"),
76-
Path(".github/auto-pr-tests/test_issue_03.snapshot"),
75+
Path(".github/guideline-from-issue-tests/test_issue_03.json"),
76+
Path(".github/guideline-from-issue-tests/test_issue_03.snapshot"),
7777
),
7878
"test_04_bibliography": (
79-
Path(".github/auto-pr-tests/test_issue_04.json"),
80-
Path(".github/auto-pr-tests/test_issue_04.snapshot"),
79+
Path(".github/guideline-from-issue-tests/test_issue_04.json"),
80+
Path(".github/guideline-from-issue-tests/test_issue_04.snapshot"),
8181
),
8282
}
8383

0 commit comments

Comments
 (0)