This is an old revision of the document!
Table of Contents
File naming conventions
This page defines the file naming conventions used in this repository.
General principles
- Use descriptive filenames.
- Avoid spaces in filenames.
- Use lowercase letters.
- Separate words consistently using hyphens or underscores depending on context.
Documentation and manuscripts
Documentation files, manuscripts, figures, tables, and other human-readable artifacts use hyphens to separate words.
Examples:
cover-letter.tex cover-letter.pdf review-response.tex review-response.pdf fig-study-basin.tex fig-study-basin.pdf tab-algorithms.tex submission-docs/
Hyphens improve readability and match conventions commonly used in documentation, URLs, and open-source repositories.
Source code
Source code files use underscores to separate words.
Examples:
flow_direction.py longest_flow_path.py mesh_builder.cpp grid_utils.h
Underscores are preferred because they are compatible with programming identifiers and module imports.
Command-line tools
Command-line interface (CLI) programs use hyphens in their executable names because they are user-facing commands.
Examples:
flow-direction longest-flow-path mesh-builder
Hyphenated command names improve readability and are consistent with common Unix command naming practices.
Generated files
Generated files should normally keep the same base name as their source files.
Example:
cover-letter.tex → cover-letter.pdf
This avoids unnecessary renaming during the build process.
Exceptions
Some ecosystems have their own naming conventions and should follow those conventions. For example, GRASS modules follow the GRASS naming scheme.
