Skip to content

3.3.3. Glossary of Naming Conventions

Mark Edward M. Gonzales edited this page May 4, 2024 · 1 revision

1️⃣ File names / Folder names

To avoid inconvenience and issues (e.g. importing) due to the file name / folder name, kindly follow the naming convention:

  • Do not use any special characters (e.g. '-', '?') other than the underscore ('_')
  • You may use digits but do not have them at the start of the filename
  • Use lowercase letters
  • Example file name / folder name: lift_over

2️⃣ ID variables

For consistency and easier lookup, make sure that the start of the ID name is the page name

  • Naming:
    • * - wildcard characters
  • Format:
    • page-name-*
    • Example ID: template-submit

3️⃣ Session variables

  • Naming:

    • page-name - the name of the page
    • id - the id of the component / object excluding the page_name
    • * - wildcard characters
  • Format:

    1. page-name-is-submitted

      • 3 possible values: '', True, and False
        • '': No data
        • True: When users enters valid input and clicks the "Run Analysis" button
        • False: When users enters an invalid input and clicks the "Run Analysis" button
    2. page-name-submitted-id

      • Refers to values used in the computations in the analysis
    3. page-name-*-active-*

      • Refers to values used for active state like active tab and active filter.

Note: Should you want to create an ID that does not conform to the naming conventions, make sure that the ID would start with the page-name