Skip to main content

.cirronignore

The .cirronignore file allows you to specify which files and directories should be excluded from Cirron CLI operations like building, testing, and deployment. This is similar to .gitignore but specifically for Cirron operations.

Overview

When you run Cirron CLI commands like cirron build, cirron test, or cirron deploy, the CLI scans your project directory to determine which files to include. The .cirronignore file lets you control this process by specifying patterns for files and directories that should be excluded.

File Location

Place the .cirronignore file in your project root directory (the same directory as your cirron.yaml file):

Syntax

The .cirronignore file uses a simple pattern matching syntax:

Basic Patterns

Pattern Examples

PatternDescriptionExamples
*.logIgnore all files with .log extensionapp.log, error.log
node_modules/Ignore the entire node_modules directorynode_modules/, node_modules/lodash/
data/raw/Ignore the data/raw directorydata/raw/, data/raw/images/
*.tmpIgnore temporary filestemp_123.tmp, backup.tmp
config.*.jsonIgnore config files with environment suffixesconfig.dev.json, config.prod.json

Negation Patterns

Use ! to negate a pattern and explicitly include files that would otherwise be ignored:

Default Patterns

The Cirron CLI automatically ignores common files and directories even without a .cirronignore file:

Version Control

  • .git/
  • .svn/
  • .hg/

Dependencies

  • node_modules/
  • __pycache__/
  • *.pyc
  • .pytest_cache/
  • venv/
  • env/
  • .env

Build Artifacts

  • dist/
  • build/
  • *.log
  • *.tmp
  • *.temp

IDE Files

  • .vscode/
  • .idea/
  • *.swp
  • *.swo
  • *~

OS Files

  • .DS_Store
  • Thumbs.db

Cirron Specific

  • temp_*.py
  • temp_*.sh

Examples

Basic .cirronignore

Advanced .cirronignore

Usage in Commands

The .cirronignore file is automatically used by these CLI commands:

Build Command

Only includes files not ignored by .cirronignore in the container build context.

Test Command

Excludes ignored files when scanning for test files and dependencies.

Deploy Command

Only deploys files that aren’t ignored by .cirronignore.

Info Command

Shows which files are included/excluded based on .cirronignore patterns.

Best Practices

1. Keep it Minimal

Only ignore files that are truly not needed for your ML model or application:

2. Use Specific Patterns

Be specific about what you’re ignoring to avoid accidentally excluding important files:

3. Include Processed Data

If you have data processing pipelines, make sure to include processed data:

4. Consider File Sizes

Use .cirronignore to exclude large files that aren’t needed for deployment:

5. Test Your Patterns

Verify your patterns by running a dry-run build or test to see which files are processed:

Troubleshooting

Files Still Being Included

If files are still being included despite being in .cirronignore:
  1. Check the file path is relative to your project root
  2. Verify the pattern syntax is correct
  3. Make sure there are no negation patterns (!) that override your ignore pattern
  4. Check if the file is being explicitly included by another mechanism

Files Being Excluded Unexpectedly

If important files are being excluded:
  1. Check for overly broad patterns like data/ or models/
  2. Use negation patterns to explicitly include files: !important_file.py
  3. Verify the file path matches your pattern exactly

Pattern Not Working

Common issues with patterns: