syntax-symphony 0.4.2__tar.gz → 0.4.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.
Files changed (24) hide show
  1. {syntax_symphony-0.4.2/src/syntax_symphony.egg-info → syntax_symphony-0.4.3}/PKG-INFO +1 -1
  2. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/pyproject.toml +3 -2
  3. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3/src/syntax_symphony.egg-info}/PKG-INFO +1 -1
  4. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony.egg-info/SOURCES.txt +1 -0
  5. syntax_symphony-0.4.3/tests/test_release_notes.py +100 -0
  6. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/LICENSE +0 -0
  7. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/README.md +0 -0
  8. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/setup.cfg +0 -0
  9. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony/__init__.py +0 -0
  10. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony/cli.py +0 -0
  11. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony/derivation_tree.py +0 -0
  12. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony/fuzzer.py +0 -0
  13. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony/grammar.py +0 -0
  14. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony/py.typed +0 -0
  15. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony.egg-info/dependency_links.txt +0 -0
  16. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony.egg-info/entry_points.txt +0 -0
  17. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony.egg-info/requires.txt +0 -0
  18. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/src/syntax_symphony.egg-info/top_level.txt +0 -0
  19. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/tests/test_cli.py +0 -0
  20. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/tests/test_derivation_tree.py +0 -0
  21. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/tests/test_fuzzer.py +0 -0
  22. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/tests/test_grammar.py +0 -0
  23. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/tests/test_public_api.py +0 -0
  24. {syntax_symphony-0.4.2 → syntax_symphony-0.4.3}/tests/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syntax_symphony
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Efficient grammar-based fuzzer.
5
5
  Author-email: Stanimir Iglev <iglev.stanimir@gmail.com>
6
6
  Maintainer-email: Stanimir Iglev <iglev.stanimir@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "syntax_symphony"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  description = "Efficient grammar-based fuzzer."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -45,7 +45,7 @@ ssfuzz = "syntax_symphony.cli:ssfuzz"
45
45
  where = ["src"]
46
46
 
47
47
  [tool.pytest.ini_options]
48
- pythonpath = ["src"]
48
+ pythonpath = ["src", "scripts"]
49
49
  testpaths = ["tests"]
50
50
  addopts = "--cov=syntax_symphony --cov-report=term-missing:skip-covered"
51
51
 
@@ -73,6 +73,7 @@ select = ["E", "F", "I", "UP", "B", "SIM", "RUF", "PT", "T20", "RET", "ARG"]
73
73
 
74
74
  [tool.ruff.lint.per-file-ignores]
75
75
  "src/syntax_symphony/cli.py" = ["T20"]
76
+ "scripts/*.py" = ["T20"]
76
77
 
77
78
  [tool.ruff.lint.isort]
78
79
  known-first-party = ["syntax_symphony"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syntax_symphony
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Efficient grammar-based fuzzer.
5
5
  Author-email: Stanimir Iglev <iglev.stanimir@gmail.com>
6
6
  Maintainer-email: Stanimir Iglev <iglev.stanimir@gmail.com>
@@ -18,4 +18,5 @@ tests/test_derivation_tree.py
18
18
  tests/test_fuzzer.py
19
19
  tests/test_grammar.py
20
20
  tests/test_public_api.py
21
+ tests/test_release_notes.py
21
22
  tests/test_validation.py
@@ -0,0 +1,100 @@
1
+ from pathlib import Path
2
+
3
+ import pytest
4
+ from extract_release_notes import extract_release_notes, tag_to_version
5
+
6
+ SAMPLE_CHANGELOG = """\
7
+ # Changelog
8
+
9
+ ## [0.4.2] - 2026-09-02
10
+
11
+ ### Added
12
+
13
+ - First item
14
+
15
+ ## [0.4.1] - 2026-09-02
16
+
17
+ ### Fixed
18
+
19
+ - Older item
20
+
21
+ ## [0.4.0] - 2026-09-02
22
+
23
+ ### Added
24
+
25
+ - Oldest item
26
+ """
27
+
28
+
29
+ @pytest.fixture
30
+ def sample_changelog(tmp_path: Path) -> Path:
31
+ path = tmp_path / "CHANGELOG.md"
32
+ path.write_text(SAMPLE_CHANGELOG, encoding="utf-8")
33
+ return path
34
+
35
+
36
+ def test_tag_to_version_strips_v_prefix() -> None:
37
+ assert tag_to_version("v0.4.2") == "0.4.2"
38
+
39
+
40
+ def test_tag_to_version_without_prefix() -> None:
41
+ assert tag_to_version("0.4.2") == "0.4.2"
42
+
43
+
44
+ def test_extracts_first_section(sample_changelog: Path) -> None:
45
+ notes = extract_release_notes(sample_changelog, "0.4.2")
46
+
47
+ assert notes == "### Added\n\n- First item"
48
+ assert "0.4.1" not in notes
49
+
50
+
51
+ def test_extracts_middle_section(sample_changelog: Path) -> None:
52
+ notes = extract_release_notes(sample_changelog, "0.4.1")
53
+
54
+ assert notes == "### Fixed\n\n- Older item"
55
+ assert "0.4.2" not in notes
56
+ assert "0.4.0" not in notes
57
+
58
+
59
+ def test_extracts_last_section(sample_changelog: Path) -> None:
60
+ notes = extract_release_notes(sample_changelog, "0.4.0")
61
+
62
+ assert notes == "### Added\n\n- Oldest item"
63
+
64
+
65
+ def test_missing_version_raises(sample_changelog: Path) -> None:
66
+ with pytest.raises(ValueError, match="No CHANGELOG section found"):
67
+ extract_release_notes(sample_changelog, "9.9.9")
68
+
69
+
70
+ def test_empty_section_raises(tmp_path: Path) -> None:
71
+ path = tmp_path / "CHANGELOG.md"
72
+ path.write_text(
73
+ "## [0.1.0] - 2026-01-01\n\n## [0.0.1] - 2025-12-01\n\n### Added\n\n- x\n",
74
+ encoding="utf-8",
75
+ )
76
+
77
+ with pytest.raises(ValueError, match="is empty"):
78
+ extract_release_notes(path, "0.1.0")
79
+
80
+
81
+ def test_duplicate_version_raises(tmp_path: Path) -> None:
82
+ path = tmp_path / "CHANGELOG.md"
83
+ path.write_text(
84
+ "## [0.1.0] - 2026-01-01\n\n### Added\n\n- one\n\n"
85
+ "## [0.1.0] - 2026-01-02\n\n### Fixed\n\n- two\n",
86
+ encoding="utf-8",
87
+ )
88
+
89
+ with pytest.raises(ValueError, match="multiple sections"):
90
+ extract_release_notes(path, "0.1.0")
91
+
92
+
93
+ def test_extracts_from_project_changelog() -> None:
94
+ changelog = Path(__file__).resolve().parents[1] / "CHANGELOG.md"
95
+
96
+ notes = extract_release_notes(changelog, "0.4.2")
97
+
98
+ assert "### Added" in notes
99
+ assert "pre-commit" in notes.lower()
100
+ assert "[0.4.1]" not in notes
File without changes