-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: prepare 0.0.8 with Zenodo integration, pre-commit improvements, and bug fixes #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a243222
chore: bump version to 0.0.8 and open changelog for development
MattyB95 f11ab9b
chore: prepare 0.0.8 — Zenodo integration, bug fixes, and code quality
MattyB95 a61c66d
chore: add pre-commit hooks for file integrity and version sync
MattyB95 e643263
fix: address Copilot review feedback for 0.0.8 PR
MattyB95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| { | ||
| "title": "Jabberjay", | ||
| "description": "Jabberjay is a unified Python API and CLI for synthetic voice detection. It brings together state-of-the-art deepfake audio detection models — including ViT, AST, Wav2Vec2, HuBERT, WavLM, RawNet2, and a classical baseline — under a single consistent interface, allowing researchers and practitioners to detect AI-generated speech without wrestling with individual model dependencies and conventions.", | ||
| "upload_type": "software", | ||
| "license": "MIT", | ||
| "creators": [ | ||
| { | ||
| "name": "Boakes, Matthew", | ||
| "affiliation": "The Alan Turing Institute, University of Kent", | ||
| "orcid": "0000-0002-9377-6240" | ||
| } | ||
| ], | ||
| "keywords": [ | ||
| "synthetic voice detection", | ||
| "deepfake detection", | ||
| "anti-spoofing", | ||
| "audio classification", | ||
| "speech", | ||
| "ASVspoof", | ||
| "machine learning", | ||
| "transformers" | ||
| ], | ||
| "related_identifiers": [ | ||
| { | ||
| "identifier": "https://pypi.org/project/Jabberjay/", | ||
| "relation": "isSupplementTo", | ||
| "resource_type": "software", | ||
| "scheme": "url" | ||
| }, | ||
| { | ||
| "identifier": "https://mattyb95.github.io/Jabberjay", | ||
| "relation": "isDocumentedBy", | ||
| "resource_type": "other", | ||
| "scheme": "url" | ||
| }, | ||
| { | ||
| "identifier": "https://github.com/MattyB95/Jabberjay", | ||
| "relation": "isSupplementTo", | ||
| "resource_type": "software", | ||
| "scheme": "url" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| #!/usr/bin/env python3 | ||
| """Sync the version from pyproject.toml into CITATION.cff and README.md. | ||
|
|
||
| Run automatically as a pre-commit hook, or manually via: | ||
| python scripts/sync_version.py | ||
| """ | ||
|
|
||
| import re | ||
| import sys | ||
| from datetime import date | ||
| from pathlib import Path | ||
|
|
||
| ROOT = Path(__file__).parent.parent | ||
|
|
||
|
|
||
| def _read(path: Path) -> str: | ||
| return path.read_text(encoding="utf-8") | ||
|
|
||
|
|
||
| def _write(path: Path, content: str) -> None: | ||
| path.write_text(content, encoding="utf-8") | ||
|
|
||
|
|
||
| def get_version() -> str: | ||
| text = _read(ROOT / "pyproject.toml") | ||
| match = re.search(r'^version\s*=\s*"([^"]+)"', text, re.MULTILINE) | ||
| if not match: | ||
| print("ERROR: Could not find version in pyproject.toml", file=sys.stderr) | ||
| sys.exit(1) | ||
| return match.group(1) | ||
|
|
||
|
|
||
| def sync_citation(version: str) -> bool: | ||
| path = ROOT / "CITATION.cff" | ||
| original = _read(path) | ||
| version_match = re.search(r"^version:\s*(.+)$", original, flags=re.MULTILINE) | ||
| if version_match and version_match.group(1).strip() == version: | ||
| return False | ||
| updated = re.sub( | ||
| r"^version:\s*.+$", f"version: {version}", original, flags=re.MULTILINE | ||
| ) | ||
| updated = re.sub( | ||
| r"^date-released:\s*.+$", | ||
| f'date-released: "{date.today()}"', | ||
| updated, | ||
| flags=re.MULTILINE, | ||
| ) | ||
| if updated != original: | ||
| _write(path, updated) | ||
| print(f" updated CITATION.cff → version {version}, date {date.today()}") | ||
| return True | ||
| return False | ||
|
|
||
|
|
||
| def sync_readme(version: str) -> bool: | ||
| path = ROOT / "README.md" | ||
| original = _read(path) | ||
| updated = re.sub(r"( version\s*=\s*\{)[^}]+(\})", rf"\g<1>{version}\2", original) | ||
| if updated != original: | ||
| _write(path, updated) | ||
| print(f" updated README.md → BibTeX version {version}") | ||
| return True | ||
| return False | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| version = get_version() | ||
| print(f"Syncing version {version} from pyproject.toml...") | ||
| changed = any([sync_citation(version), sync_readme(version)]) | ||
| if changed: | ||
| print("Version sync complete — stage the modified files and re-run.") | ||
| sys.exit(1) # non-zero tells pre-commit files were modified | ||
| else: | ||
| print("All version references already in sync.") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,16 @@ | ||
| optimizer: Adam | ||
| optimizer: Adam | ||
| amsgrad: 1 #for adam optim | ||
|
|
||
|
|
||
|
|
||
| #model-related | ||
| model: | ||
| nb_samp: 64600 | ||
| first_conv: 1024 # no. of filter coefficients | ||
| first_conv: 1024 # no. of filter coefficients | ||
| in_channels: 1 | ||
| filts: [20, [20, 20], [20, 128], [128, 128]] # no. of filters channel in residual blocks | ||
| blocks: [2, 4] | ||
| nb_fc_node: 1024 | ||
| gru_node: 1024 | ||
| nb_gru_layer: 3 | ||
| nb_classes: 2 | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.