Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cirron.com/llms.txt

Use this file to discover all available pages before exploring further.

.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):
my-ml-project/
├── cirron.yaml
├── .cirronignore          ← Place here
├── src/
├── data/
├── models/
└── requirements.txt

Syntax

The .cirronignore file uses a simple pattern matching syntax:

Basic Patterns

# Ignore specific files
config.local.json
secrets.env
*.log

# Ignore directories
node_modules/
__pycache__/
.pytest_cache/
venv/

# Ignore files in specific directories
data/raw/
models/checkpoints/
logs/*.log

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:
# Ignore all .pyc files
*.pyc

# But include this specific one
!important.pyc

# Ignore all data files
data/

# But include the processed data
!data/processed/

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

# Development files
.env.local
.env.development
*.log

# Large data files
data/raw/
data/downloads/
*.csv
*.parquet

# Model checkpoints (too large for deployment)
models/checkpoints/
*.pth
*.h5

# Temporary files
temp/
tmp/
*.tmp

Advanced .cirronignore

# Ignore all data files
data/

# But include processed data
!data/processed/
!data/features/

# Ignore all logs
*.log
logs/

# But include important logs
!logs/important.log

# Ignore development configs
config.dev.json
config.local.json

# Ignore large model files
models/*.pkl
models/*.joblib
models/checkpoints/

# Ignore test data
tests/data/
test_data/

# Ignore documentation
docs/
*.md
!README.md

Usage in Commands

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

Build Command

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

Test Command

cirron test
Excludes ignored files when scanning for test files and dependencies.

Deploy Command

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

Info Command

cirron info
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:
# Good - only ignores unnecessary files
*.log
.env
__pycache__/

# Avoid - too restrictive
*.py
src/

2. Use Specific Patterns

Be specific about what you’re ignoring to avoid accidentally excluding important files:
# Good - specific
data/raw/
models/checkpoints/

# Avoid - too broad
data/
models/

3. Include Processed Data

If you have data processing pipelines, make sure to include processed data:
# Ignore raw data
data/raw/

# Include processed data
!data/processed/
!data/features/

4. Consider File Sizes

Use .cirronignore to exclude large files that aren’t needed for deployment:
# Large model checkpoints
models/checkpoints/
*.pth
*.h5

# Large datasets
data/raw/
*.csv
*.parquet

5. Test Your Patterns

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

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:
# Wrong - missing trailing slash for directory
data

# Correct - trailing slash for directory
data/

# Wrong - incorrect wildcard
*.py*

# Correct - proper wildcard
*.py