Skip to content

Make env config keys consistent #102

@tomschr

Description

@tomschr

Situation

Our code and template in etc/docbuild/env.example.toml uses keys that contain inconsistent names. For example, we have tmp_base_path (suffix "path") and tmp_build_dir (suffix "dir"). But we have also inconsistencies between prefixes like temp_repo_dir (prefix temp) and tmp_base_dir (prefix tmp).

Use Case

Naming things is the hardest part we can do. 😉 Inconsistent names make it difficult to remember and guess the correct key names.

Possible Implementation

To fix this, I would suggest:

  • Decide which suffix we use (path or dir).

  • Decide if the naming is accurate enough.

  • Search for any strings that matches the tmp_*_(dir|path).

     egrep -r "tmp_[a-z_]+(dir|path)" src/docbuild tests/ docs/source/
    

    Then change it accordingly to the new rule.

  • Adapt etc/docbuild/env.example.toml too as this acts as a template.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions