CLAWRIM Wiki

The Computational Lab for Advanced Water Resources Informatics and Modeling

User Tools

Site Tools


file_naming_conventions

This is an old revision of the document!


File naming conventions

This page defines the filename and directory naming conventions used in lab repositories.

General principles

  • Use descriptive names.
  • Avoid spaces in filenames and directory names.
  • Use lowercase letters.
  • Use hyphens (-) by default.
  • Use underscores (_) only for software source code files.

Documentation and manuscripts

Documentation files, manuscripts, figures, tables, LaTeX macros, and other document-related files use hyphens to separate words.

Examples:

main.tex
cover-letter.tex
cover-letter.pdf
review-response.tex
response-macros.tex
fig-study-basin.tex
tab-algorithms.tex
software-availability.tex

Hyphens improve readability and match conventions commonly used in documentation, URLs, and open-source repositories.

Command-line tools

Command-line interface (CLI) programs use hyphens in executable names because they are user-facing commands.

Examples:

flow-direction
longest-flow-path
mesh-builder

Workflow scripts

Workflow scripts are treated as command-line tools and therefore also use hyphens.

If the execution order matters, a numeric prefix may be used.

Examples:

1-download-files.sh
2-preprocess-files.sh
3-run-model.sh
4-postprocess-results.sh

Software source code

Software source code files use underscores to separate words. This ensures compatibility with programming identifiers and module imports.

Examples:

flow_direction.py
longest_flow_path.py
mesh_builder.cpp
grid_utils.h

Directory names

Directory names use hyphens, unless the directory represents a software package that must follow programming naming rules.

Examples:

submission-docs/
review-response/
fig-study-area/
build-scripts/

Generated files

Generated files should normally keep the same base name as their source files.

Example:

cover-letter.tex → cover-letter.pdf
file_naming_conventions.1773191230.txt.gz · Last modified: by hcho

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki