# Lingbot-Map Class Naming Convention: From snake_case Files to PascalCase Classes

> Explore the Lingbot-Map class naming convention. Discover how snake_case files translate to PascalCase classes in Python, adhering to PEP 8 for clarity.

- Repository: [Robbyant/lingbot-map](https://github.com/Robbyant/lingbot-map)
- Tags: best-practices
- Published: 2026-07-02

---

**The Robbyant/lingbot-map repository adheres to a strict Python class naming convention where module filenames use snake_case and class definitions use PascalCase, following PEP 8 guidelines to create clear separation between file structure and object types.**

The Robbyant/lingbot-map codebase implements a consistent class naming convention that maps snake_case module names to PascalCase class definitions. This pattern appears across all architectural layers—including models, heads, layers, and utilities—making the codebase immediately navigable for Python developers. Understanding this snake_case to PascalCase relationship is essential for correctly importing and extending the project's components.

## The Snake_Case to PascalCase Pattern

The repository separates concerns at the file level by using distinct casing conventions for modules versus classes.

### Module Names Use snake_case

All Python files in the repository use lowercase letters with underscores separating words. This convention applies uniformly across packages:

- [`lingbot_map/models/gct_stream_window_v2.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/models/gct_stream_window_v2.py)
- [`lingbot_map/heads/camera_head.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/heads/camera_head.py)
- [`lingbot_map/layers/vision_transformer.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/layers/vision_transformer.py)
- [`lingbot_map/utils/rotation.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/utils/rotation.py)

### Class Names Use PascalCase

Classes defined within these modules follow PascalCase (UpperCamelCase), where each word starts with a capital letter and no underscores separate words. The actual class names are semantic rather than mechanical transformations of the filenames:

- `class GCTStream` in [`gct_stream_window_v2.py`](https://github.com/Robbyant/lingbot-map/blob/main/gct_stream_window_v2.py)
- `class CameraHead` in [`camera_head.py`](https://github.com/Robbyant/lingbot-map/blob/main/camera_head.py)
- `class DinoVisionTransformer` in [`vision_transformer.py`](https://github.com/Robbyant/lingbot-map/blob/main/vision_transformer.py)

## Source Code Evidence

The pattern is consistent across the entire repository. In [`lingbot_map/models/gct_stream_window_v2.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/models/gct_stream_window_v2.py), the module uses snake_case while the class definition follows PascalCase:

```python

# In lingbot_map/models/gct_stream_window_v2.py

class GCTStream(GCTBase):
    def forward(self, ...):
        # Implementation details

        pass

```

Similarly, [`lingbot_map/heads/camera_head.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/heads/camera_head.py) defines:

```python

# In lingbot_map/heads/camera_head.py

class CameraHead(nn.Module):
    def __init__(self, ...):
        super().__init__()
        # Implementation details

```

And in [`lingbot_map/layers/vision_transformer.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/layers/vision_transformer.py):

```python

# In lingbot_map/layers/vision_transformer.py

class DinoVisionTransformer(nn.Module):
    def __init__(self, ...):
        super().__init__()
        # Implementation details

```

## Why This Convention Matters

This class naming convention provides three critical benefits:

- **Readability** – Imports like `from lingbot_map.models.gct_stream_window_v2 import GCTStream` instantly distinguish the module (file) from the class (object)
- **PEP 8 Compliance** – The repository follows the official Python style guide recommendation that modules use short lowercase names and classes use CapWords
- **IDE Navigation** – Developers can search by snake_case filenames or PascalCase class names without ambiguity

## Practical Implementation Guide

When importing components, the distinction between snake_case modules and PascalCase classes creates readable, self-documenting code:

```python
from lingbot_map.models.gct_stream_window_v2 import GCTStream
from lingbot_map.heads.camera_head import CameraHead

model = GCTStream()
head = CameraHead()

```

### Adding a New Component

To create a new component following this convention:

1. Create the module file using snake_case:

```bash
touch lingbot_map/heads/my_new_head.py

```

2. Define the class using PascalCase:

```python

# lingbot_map/heads/my_new_head.py

import torch.nn as nn

class MyNewHead(nn.Module):
    def __init__(self, ...):
        super().__init__()
        # Implementation details

```

3. Import using the standard pattern:

```python
from lingbot_map.heads.my_new_head import MyNewHead

```

## Summary

- **Module files** in Robbyant/lingbot-map always use **snake_case** (e.g., [`gct_stream_window_v2.py`](https://github.com/Robbyant/lingbot-map/blob/main/gct_stream_window_v2.py), [`camera_head.py`](https://github.com/Robbyant/lingbot-map/blob/main/camera_head.py))
- **Class definitions** always use **PascalCase** (e.g., `GCTStream`, `CameraHead`, `DinoVisionTransformer`)
- This pattern appears consistently across `models/`, `heads/`, `layers/`, and `utils/` directories
- The convention aligns with PEP 8 and improves code readability by distinguishing file structure from instantiated objects
- Import statements follow the pattern: `from snake_case_module import PascalCaseClass`

## Frequently Asked Questions

### Does Lingbot-Map use snake_case for all filenames?

Yes, every Python module in the repository follows snake_case naming, including [`lingbot_map/models/gct_stream_window_v2.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/models/gct_stream_window_v2.py), [`lingbot_map/utils/rotation.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/utils/rotation.py), and [`lingbot_map/layers/vision_transformer.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/layers/vision_transformer.py). This applies universally regardless of whether the file contains classes, functions, or only constants.

### How do I convert a snake_case filename to its corresponding class name?

While filenames use snake_case and class names use PascalCase, they are not always direct mechanical conversions. For example, [`gct_stream_window_v2.py`](https://github.com/Robbyant/lingbot-map/blob/main/gct_stream_window_v2.py) contains `class GCTStream`, not `GctStreamWindowV2`. The repository prefers semantic class names that describe the component's purpose rather than mirroring the exact filename structure.

### Are there any exceptions to the PascalCase class naming rule?

No, the Robbyant/lingbot-map source code maintains strict consistency. All class definitions found in `lingbot_map/models/`, `lingbot_map/heads/`, and `lingbot_map/layers/` follow PascalCase without exception, including `GCTStream`, `CameraHead`, and `DinoVisionTransformer`.

### Does this convention apply to utility modules without classes?

Yes, even utility modules like [`lingbot_map/utils/rotation.py`](https://github.com/Robbyant/lingbot-map/blob/main/lingbot_map/utils/rotation.py) follow snake_case file naming, even when they only expose functions rather than classes. The file naming convention applies universally across all modules, while PascalCase is reserved specifically for class definitions.