GoogleCloudPlatform / applied-ai-engineering-samples
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
txt
jsonl
tpl
ini
in
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main15720 LOC (55%) 224 files
test0 LOC (0%) 0 files
generated0 LOC (0%) 0 files
build and deployment5 LOC (<1%) 5 files
other12421 LOC (44%) 142 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
jsonl
tpl
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 224 files match defined criteria (15,720 LOC, 100.0% vs. main code):
    • 19 *.ipynb files (11,211 LOC)
    • 39 *.tf files (1,947 LOC)
    • 17 *.py files (1,149 LOC)
    • 129 *.yaml files (1,136 LOC)
    • 1 *.sql files (113 LOC)
    • 15 *.jsonl files (96 LOC)
    • 2 *.tpl files (41 LOC)
    • 1 *.toml files (25 LOC)
    • 1 *.in files (2 LOC)
  • " *.ipynb" is biggest, containing 71.32% of LOC.
  • " *.in" is smallest, containing 0.01% of LOC.


*.ipynb11211 LOC (71%) 19 files
*.tf1947 LOC (12%) 39 files
*.py1149 LOC (7%) 17 files
*.yaml1136 LOC (7%) 129 files
*.sql113 LOC (<1%) 1 file
*.jsonl96 LOC (<1%) 15 files
*.tpl41 LOC (<1%) 2 files
*.toml25 LOC (<1%) 1 file
*.in2 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 5 files match defined criteria (5 LOC, 0.0% vs. main code). All matches are in *.sh files.


*.sh5 LOC (100%) 5 files
Other Code
txt
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
  • 142 files match defined criteria (12,421 LOC, 79.0% vs. main code):
    • 93 *.txt files (9,864 LOC)
    • 36 *.md files (2,163 LOC)
    • 9 *.yaml files (317 LOC)
    • 1 *.json files (56 LOC)
    • 1 *.ini files (17 LOC)
    • 2 *.sh files (4 LOC)
  • " *.txt" is biggest, containing 79.41% of LOC.
  • " *.sh" is smallest, containing 0.03% of LOC.


*.txt9864 LOC (79%) 93 files
*.md2163 LOC (17%) 36 files
*.yaml317 LOC (2%) 9 files
*.json56 LOC (<1%) 1 file
*.ini17 LOC (<1%) 1 file
*.sh4 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:58