Datasets:
Fix wrapper scripts to use correct library version
Browse files- Removed debug output from wrapper scripts
- Added developer notes about using 'python' for local development
- Confirmed --overwrite flag works correctly when calling library
The issue was that 'uv run --script' uses cached PyPI versions
instead of local editable installs. For development, run with
'python tools/04_generate_parquet.py' to use local library changes.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
tools/04_generate_parquet.py
CHANGED
|
@@ -21,6 +21,13 @@ Usage:
|
|
| 21 |
--test: Only process 3 test treebanks (fr_gsd, en_ewt, it_isdt)
|
| 22 |
--treebanks: Comma-separated list of treebank names to process
|
| 23 |
--overwrite: Overwrite existing parquet files (default: skip existing)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
"""
|
| 25 |
|
| 26 |
import argparse
|
|
@@ -79,11 +86,6 @@ def main():
|
|
| 79 |
elif args.verbose:
|
| 80 |
tool_args.append("--verbose")
|
| 81 |
|
| 82 |
-
# Debug: Print the command being called (can be removed later)
|
| 83 |
-
if args.verbose and not args.quiet:
|
| 84 |
-
print(f"Calling: {' '.join(tool_args)}")
|
| 85 |
-
print()
|
| 86 |
-
|
| 87 |
# Replace sys.argv and call the library's main function
|
| 88 |
original_argv = sys.argv
|
| 89 |
try:
|
|
|
|
| 21 |
--test: Only process 3 test treebanks (fr_gsd, en_ewt, it_isdt)
|
| 22 |
--treebanks: Comma-separated list of treebank names to process
|
| 23 |
--overwrite: Overwrite existing parquet files (default: skip existing)
|
| 24 |
+
|
| 25 |
+
Note for developers:
|
| 26 |
+
If you're modifying the ud-hf-parquet-tools library locally, run this script
|
| 27 |
+
with 'python' directly instead of relying on the shebang, to ensure it uses
|
| 28 |
+
your local editable install rather than the PyPI version:
|
| 29 |
+
|
| 30 |
+
python tools/04_generate_parquet.py [options]
|
| 31 |
"""
|
| 32 |
|
| 33 |
import argparse
|
|
|
|
| 86 |
elif args.verbose:
|
| 87 |
tool_args.append("--verbose")
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
# Replace sys.argv and call the library's main function
|
| 90 |
original_argv = sys.argv
|
| 91 |
try:
|
tools/05_validate_parquet.py
CHANGED
|
@@ -41,6 +41,13 @@ Examples:
|
|
| 41 |
|
| 42 |
# Validate all treebanks from main branch
|
| 43 |
python 05_validate_parquet.py --revision main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
"""
|
| 45 |
|
| 46 |
import argparse
|
|
|
|
| 41 |
|
| 42 |
# Validate all treebanks from main branch
|
| 43 |
python 05_validate_parquet.py --revision main
|
| 44 |
+
|
| 45 |
+
Note for developers:
|
| 46 |
+
If you're modifying the ud-hf-parquet-tools library locally, run this script
|
| 47 |
+
with 'python' directly instead of relying on the shebang, to ensure it uses
|
| 48 |
+
your local editable install rather than the PyPI version:
|
| 49 |
+
|
| 50 |
+
python tools/05_validate_parquet.py [options]
|
| 51 |
"""
|
| 52 |
|
| 53 |
import argparse
|