Scan the Data Code Extension %s package for permissions and dependencies.
Scans Python files in an initialized Data Code Extension package directory to identify required permissions and dependencies. Updates the config.json and requirements.txt files based on the code analysis.
-
Scan a %s package in the current directory:
<%= config.bin %> data-code-extension %s scan
-
Scan with a custom entrypoint file:
<%= config.bin %> data-code-extension %s scan --entrypoint payload/entrypoint.py
-
Perform a dry run to see what would be changed:
<%= config.bin %> data-code-extension %s scan --dry-run
-
Scan without updating the requirements.txt file:
<%= config.bin %> data-code-extension %s scan --no-requirements
Checking Python version...
Python %s found at '%s'
Checking required Python packages...
Package '%s' version %s found
Checking datacustomcode binary...
Datacustomcode binary version %s found
Scanning package for permissions and dependencies...
Package scanned successfully in '%s'
Permission required: %s
Dependency found: %s
Scanned: %s
Package scan completed successfully!
Data Code Extension scan completed successfully!
DRY RUN: No files were modified. Remove --dry-run flag to apply changes.
Failed to scan Data Code Extension package
Config file not found at '%s'
Current directory is not an initialized Data Code Extension package. Run 'init' first.
Permission denied when scanning package at '%s'
Failed to scan package at '%s': %s
- Verify the config file path is correct
- Check if you're in the right directory
- Run 'init' command first if package is not initialized
- Use default entrypoint path: payload/entrypoint.py
- Change to an initialized package directory
- Run 'data-code-extension %s init' first to initialize a package
- Check that config.json exists in the payload directory
- Check that you have read permissions for the directory
- Verify all Python files are readable
- Ensure the config file is writable
- Verify the datacustomcode binary is properly installed
- Check that the package directory contains valid Python files
- Run 'datacustomcode version' to verify the binary works
- Check the error message for specific issues
Path to an alternate config file.
Optional path to an alternate JSON config file to use instead of the package's default config. The file must exist. Useful for testing different configurations without modifying the package's primary config.json.
Path to the entrypoint Python file to scan.
The path to the entrypoint Python file that will be analyzed. Defaults to 'payload/entrypoint.py' in the current directory.
Preview changes without modifying any files.
When set, performs a scan and shows what would be changed but does not modify any files. Useful for reviewing changes before applying them.
Skip updating the requirements.txt file.
When set, only scans for permissions and updates config.json, but doesn't update the requirements.txt file with discovered dependencies.